Author: arminw Date: Tue Mar 20 19:21:42 2007 New Revision: 520711 URL: http://svn.apache.org/viewvc?view=rev&rev=520711 Log: update javadoc, resort methods
Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/query/Query.java Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/query/Query.java URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/query/Query.java?view=diff&rev=520711&r1=520710&r2=520711 ============================================================================== --- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/query/Query.java (original) +++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/query/Query.java Tue Mar 20 19:21:42 2007 @@ -54,138 +54,163 @@ public static final boolean NOT_SCROLLABLE = false; /** - * return the criteria of the query if present or null. + * Returns the names of Relationships to be prefetched. + * + * @return List of Strings */ - public abstract Criteria getCriteria(); + public List getPrefetchedRelationships(); /** - * return the criteria of the query if present or null. + * Return the criteria of the query if present or <tt>null</tt>. */ - public abstract Criteria getHavingCriteria(); + public Criteria getCriteria(); /** - * return the template Object if present or null + * Return the criteria of the query if present or <tt>null</tt>. */ - public abstract Object getExampleObject(); + public Criteria getHavingCriteria(); /** - * return the target class, representing the extend to be searched + * Return the template Object if present or <tt>null</tt>. */ - public abstract Class getSearchClass(); + public Object getExampleObject(); /** - * return the base class, with respect to which all paths are done + * Return the target class, representing the extend to be searched. */ - public abstract Class getBaseClass(); + public Class getSearchClass(); /** - * return true if select DISTINCT should be used + * Return the base class, with respect to which all paths are done. + */ + public Class getBaseClass(); + + /** + * Return <tt>true</tt> if select DISTINCT should be used. + * + * @return True if distinct is enabled. */ public boolean isDistinct(); /** - * Answer the orderBy of all Criteria and Sub Criteria the elements are of - * class FieldHelper + * Answer the orderBy of all Criteria and Sub Criteria. The elements are of + * type [EMAIL PROTECTED] org.apache.ojb.broker.metadata.FieldHelper}. + * * @return List of FieldHelper */ public List getOrderBy(); /** - * Gets the groupby for ReportQueries of all Criteria and Sub Criteria - * the elements are of class FieldHelper + * Gets the groupby for ReportQueries of all Criteria and Sub Criteria. + * The elements are of type [EMAIL PROTECTED] org.apache.ojb.broker.metadata.FieldHelper}. + * * @return List of FieldHelper */ public List getGroupBy(); /** + * Return the start index of the query result. * * @return the row at which the query should start retrieving results. * If the start at index is 0, then ignore all cursor control. */ - int getStartAtIndex(); + public int getStartAtIndex(); /** * Set the row at which the query should start retrieving results, inclusive - * first row is 1 + * first row is 1. + * * @param startAtIndex starting index, inclusive. */ - void setStartAtIndex(int startAtIndex); + public void setStartAtIndex(int startAtIndex); /** + * Returns the end index of the query result. * * @return the row at which the query should stop retrieving results. * If the end at index is 0, ignore all cursor control */ - int getEndAtIndex(); + public int getEndAtIndex(); /** * Set the row at which the query should stop retrieving results, inclusive. - * first row is 1 + * first row is 1. + * * @param endAtIndex ending index, inclusive */ - void setEndAtIndex(int endAtIndex); + public void setEndAtIndex(int endAtIndex); /** * Answer true if endIndex and/or startIndex is set. + * + * @return True if enabled. */ public boolean usePaging(); /** * Returns <em>true</em> if the [EMAIL PROTECTED] #setEndAtIndex(int)} is set. + * + * @return True if enabled. */ public boolean hasLimit(); /** * Returns <em>true</em> if the [EMAIL PROTECTED] #setStartAtIndex(int)} is set. + * + * @return True if enabled. */ public boolean hasOffset(); /** - * Returns the names of Relationships to be prefetched - * @return List of Strings - */ - public List getPrefetchedRelationships(); - - /** * @deprecated * @param size */ - void fullSize(int size); + public void fullSize(int size); /** * @deprecated use [EMAIL PROTECTED] org.apache.ojb.broker.accesslayer.OJBIterator#fullSize()}. */ - int fullSize(); + public int fullSize(); /** - * Internal used method. + * If set <tt>false</tt> OJB will not include 'extent classes' (mapped subclasses or + * mapped implementation classes). If <tt>true</tt> all mapped 'extents' are included. + * <br/> + * NOTE: It's not possible to perform a query against a class which is not mapped to a + * table with <code>setWithExtents(false)</code>. This will throw a runtime exception. + * + * @param withExtents Include (set <tt>true</tt>) or exclude (set <tt>false</tt>) extents. */ - void setWithExtents(boolean withExtents); + public void setWithExtents(boolean withExtents); /** - * Internal used method. + * Include all extent classes in the query. + * + * @return True if extents should be included. + * @see #setWithExtents(boolean) */ - boolean getWithExtents(); + public boolean getWithExtents(); /** * Set fetchSize hint for this Query. Passed to the JDBC driver on the * Statement level. It is JDBC driver-dependant if this function has * any effect at all, since fetchSize is only a hint. + * * @param fetchSize the fetch size specific to this query */ - void setFetchSize(int fetchSize); + public void setFetchSize(int fetchSize); /** * Returns the fetchSize hint for this Query * @return the fetch size hint specific to this query * (or 0 if not set / using driver default) */ - int getFetchSize(); + public int getFetchSize(); /** * Returns <em>true</em> if a "select .... for update" is enabled * to lock the result set rows by the database. */ - boolean isSelectForUpdate(); + public boolean isSelectForUpdate(); /** * Set <em>true</em> to perform a "select ... for update" query. @@ -194,7 +219,7 @@ * * @param forUpdate Set <tt>true</tt> to enable 'FOR UPDATE' select-query. */ - void setSelectForUpdate(boolean forUpdate); + public void setSelectForUpdate(boolean forUpdate); /** * Set an affix to the end of the query string. This allows to append @@ -203,7 +228,7 @@ * * @param affix The affix string to append at the end of the query string. */ - void setQueryAffix(String affix); + public void setQueryAffix(String affix); /** * Returns the affix string (By default no affix is set, so this method @@ -212,7 +237,7 @@ * @return The query affix string or <em>null</em> if not set. * @see #setQueryAffix(String) */ - String getQueryAffix(); + public String getQueryAffix(); /** * INTERNAL CALLED METHOD! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]