Author: steve.ebersole@(protected)
Date: 2008-10-08 00:55:29 -0400 (Wed, 08 Oct 2008)
New Revision: 15275
Modified:
core/branches/Branch_3_3/core/src/main/java/org/hibernate/criterion/Projection.java
Log:
javadoc
Modified: core/branches/Branch_3_3/core/src/main/java/org/hibernate/criterion/Projection.java
===================================================================
--- core/branches/Branch_3_3/core/src/main/java/org/hibernate/criterion/Projection.java 2008-10-08 04:55:07 UTC (rev 15274)
+++ core/branches/Branch_3_3/core/src/main/java/org/hibernate/criterion/Projection.java 2008-10-08 04:55:29 UTC (rev 15275)
@@(protected) @@
import
org.hibernate.type.Type;
/**
- * An object-oriented representation of a query result set projection
- * in a <tt>Criteria</tt> query. Built-in projection types are provided
- * by the <tt>Projections</tt> factory class.
- * This interface might be implemented by application classes that
- * define custom projections.
+ * An object-oriented representation of a query result set projection in a {@(protected).
+ * Built-in projection types are provided by the {@(protected)
+ * implemented by application classes that define custom projections.
*
+ * @author Gavin King
+ * @author Steve Ebersole
* @see Projections
- * @see
org.hibernate.Criteria- * @author Gavin King
+ * @see Criteria
*/
public interface Projection extends Serializable {
/**
- * Render the SQL fragment
- * @param criteriaQuery
- * @param columnAlias
- * @return String
- * @throws HibernateException
+ * Render the SQL fragment to be used in the <tt>SELECT</tt> clause.
+ *
+ * @param criteria The local criteria to which this project is attached (for resolution).
+ * @param position The number of columns rendered in the <tt>SELECT</tt> clause before this projection. Generally
+ * speaking this is useful to ensure uniqueness of the individual columns aliases.
+ * @param criteriaQuery The overall criteria query instance.
+ * @return The SQL fragment to plug into the <tt>SELECT</tt>
+ * @throws HibernateException Indicates a problem performing the rendering
*/
- public String toSqlString(Criteria criteria, int position, CriteriaQuery criteriaQuery)
- throws HibernateException;
-
+ public String toSqlString(Criteria criteria, int position, CriteriaQuery criteriaQuery)
+ throws HibernateException;
+
/**
- * Render the SQL fragment to be used in the group by clause
- * @param criteriaQuery
- * @param columnAlias
- * @return String
- * @throws HibernateException
+ * Render the SQL fragment to be used in the <tt>GROUP BY</tt> clause
+ *
+ * @param criteria The local criteria to which this project is attached (for resolution).
+ * @param criteriaQuery The overall criteria query instance.
+ * @return The SQL fragment to plug into the <tt>GROUP BY</tt>
+ * @throws HibernateException Indicates a problem performing the rendering
*/
- public String toGroupSqlString(Criteria criteria, CriteriaQuery criteriaQuery)
- throws HibernateException;
-
+ public String toGroupSqlString(Criteria criteria, CriteriaQuery criteriaQuery)
+ throws HibernateException;
+
/**
- * Return types returned by the rendered SQL fragment
- * @param criteria
- * @param criteriaQuery
- * @return Type[]
- * @throws HibernateException
+ * Types returned by the rendered SQL {@(protected)
+ * that would represent the values this projection asked to be pulled into the result set?
+ *
+ * @param criteria The local criteria to which this project is attached (for resolution).
+ * @param criteriaQuery The overall criteria query instance.
+ * @return The return types.
+ * @throws HibernateException Indicates a problem resolving the types
*/
- public Type[] getTypes(Criteria criteria, CriteriaQuery criteriaQuery)
- throws HibernateException;
+ public Type[] getTypes(Criteria criteria, CriteriaQuery criteriaQuery)
+ throws HibernateException;
+
/**
- * Return types for a particular user-visible alias
+ * Get the return types for a particular user-visible alias.
+ * <p/>
+ * Differs from {@(protected)
+ * the types related to the given criteria-level alias.
+ *
+ * @param alias The criteria-level alias for which to find types.
+ * @param criteria The local criteria to which this project is attached (for resolution).
+ * @param criteriaQuery The overall criteria query instance.
+ * @return The return types; expected to return null if this projection does not understand this alias.
+ * @throws HibernateException Indicates a problem resolving the types
*/
- public Type[] getTypes(String alias, Criteria criteria, CriteriaQuery criteriaQuery)
- throws HibernateException;
-
+ public Type[] getTypes(String alias, Criteria criteria, CriteriaQuery criteriaQuery)
+ throws HibernateException;
+
+
/**
- * Get the SQL select clause column aliases
+ * Get the SQL column aliases used by this projection for the columns it writes for inclusion into the
+ * <tt>SELECT</tt> clause ({@(protected)
+ * JDBC {@(protected)
+ * Hibernate to be able to extract these val;ues correctly.
+ *
+ * @param position Just as in {@(protected)
+ * prior to this projection.
+ * @return The columns aliases.
*/
- public String[] getColumnAliases(int loc);
+ public String[] getColumnAliases(int position);
+
/**
- * Get the SQL select clause column aliases for a particular
- * user-visible alias
+ * Get the SQL column aliases used by this projection for the columns it writes for inclusion into the
+ * <tt>SELECT</tt> clause ({@(protected)>.
+ *
+ * @param alias The criteria-level alias
+ * @param position Just as in {@(protected)
+ * prior to this projection.
+ * @return The columns aliases pertaining to a particular criteria-level alias; expected to return null if
+ * this projection does not understand this alias.
*/
- public String[] getColumnAliases(String alias, int loc);
-
+ public String[] getColumnAliases(String alias, int position);
+
/**
- * Get the user-visible aliases for this projection
- * (ie. the ones that will be passed to the
- * <tt>ResultTransformer</tt>)
+ * Get the criteria-level aliases for this projection (ie. the ones that will be passed to the
+ * {@(protected)})
+ *
+ * @return The aliases
*/
public String[] getAliases();
-
+
/**
- * Does this projection specify grouping attributes?
+ * Is this projection fragment (<tt>SELECT</tt> clause) also part of the <tt>GROUP BY</tt>
+ *
+ * @return True if the projection is also part of the <tt>GROUP BY</tt>; false otherwise.
*/
public boolean isGrouped();
-
+
}
_______________________________________________
hibernate-commits mailing list
hibernate-commits@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-commits