arminw
Tue, 20 Mar 2007 18:24:06 -0800
Author: arminw Date: Tue Mar 20 19:23:44 2007 New Revision: 520712 URL: http://svn.apache.org/viewvc?view=rev&rev=520712 Log: update javadoc, resort methods Modified: db/ojb/trunk/src/java/org/apache/ojb/broker/query/Query.java Modified: db/ojb/trunk/src/java/org/apache/ojb/broker/query/Query.java URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/java/org/apache/ojb/broker/query/Query.java?view=diff&rev=520712&r1=520711&r2=520712 ============================================================================== --- db/ojb/trunk/src/java/org/apache/ojb/broker/query/Query.java (original) +++ db/ojb/trunk/src/java/org/apache/ojb/broker/query/Query.java Tue Mar 20 19:23:44 2007 @@ -53,60 +53,72 @@ public static final boolean NOT_SCROLLABLE = false; /** - * return the target class, representing the extend to be searched + * Return the target class, representing the extend to be searched. */ - public abstract Class getSearchClass(); + public Class getSearchClass(); /** - * return the base class, with respect to which all paths are done + * Return the base class, with respect to which all paths are done. */ - public abstract Class getBaseClass(); + public Class getBaseClass(); /** - * return true if select DISTINCT should be used + * Return <tt>true</tt> if select DISTINCT should be used. + * + * @return True if distinct is enabled. */ public boolean isDistinct(); /** + * Return the start index of the query result. * - * @return the row at which the query should start retrieving results. + * @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(); @@ -114,42 +126,52 @@ * @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. @@ -158,7 +180,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 @@ -167,7 +189,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 @@ -176,7 +198,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]