org.ofbiz.entity.util
Class EntityFindOptions

java.lang.Object
  extended by org.ofbiz.entity.util.EntityFindOptions
All Implemented Interfaces:
java.io.Serializable

public class EntityFindOptions
extends java.lang.Object
implements java.io.Serializable

Contains a number of variables used to select certain advanced finding options.

See Also:
Serialized Form

Field Summary
static int CONCUR_READ_ONLY
          Concurrency constant from the java.sql.ResultSet object for convenience
static int CONCUR_UPDATABLE
          Concurrency constant from the java.sql.ResultSet object for convenience
protected  boolean distinct
           
protected  int fetchSize
           
protected  int maxRows
           
protected  int resultSetConcurrency
           
protected  int resultSetType
           
protected  boolean specifyTypeAndConcur
           
static int TYPE_FORWARD_ONLY
          Type constant from the java.sql.ResultSet object for convenience
static int TYPE_SCROLL_INSENSITIVE
          Type constant from the java.sql.ResultSet object for convenience
static int TYPE_SCROLL_SENSITIVE
          Type constant from the java.sql.ResultSet object for convenience
 
Constructor Summary
EntityFindOptions()
          Default constructor.
EntityFindOptions(boolean specifyTypeAndConcur, int resultSetType, int resultSetConcurrency, boolean distinct)
           
EntityFindOptions(boolean specifyTypeAndConcur, int resultSetType, int resultSetConcurrency, int fetchSize, int maxRows, boolean distinct)
           
 
Method Summary
 boolean getDistinct()
          Specifies whether the values returned should be filtered to remove duplicate values.
 int getFetchSize()
          Specifies the fetch size for this query.
 int getMaxRows()
          Specifies the max number of rows to return, 0 means all rows.
 int getResultSetConcurrency()
          Specifies whether or not the ResultSet can be updated.
 int getResultSetType()
          Specifies how the ResultSet will be traversed.
 boolean getSpecifyTypeAndConcur()
          If true the following two parameters (resultSetType and resultSetConcurrency) will be used to specify how the results will be used; if false the default values for the JDBC driver will be used
 void setDistinct(boolean distinct)
          Specifies whether the values returned should be filtered to remove duplicate values.
 void setFetchSize(int fetchSize)
          Specifies the fetch size for this query.
 void setMaxRows(int maxRows)
          Specifies the max number of rows to return, 0 means all rows.
 void setResultSetConcurrency(int resultSetConcurrency)
          Specifies whether or not the ResultSet can be updated.
 void setResultSetType(int resultSetType)
          Specifies how the ResultSet will be traversed.
 void setSpecifyTypeAndConcur(boolean specifyTypeAndConcur)
          If true the following two parameters (resultSetType and resultSetConcurrency) will be used to specify how the results will be used; if false the default values for the JDBC driver will be used
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_FORWARD_ONLY

public static final int TYPE_FORWARD_ONLY
Type constant from the java.sql.ResultSet object for convenience

See Also:
Constant Field Values

TYPE_SCROLL_INSENSITIVE

public static final int TYPE_SCROLL_INSENSITIVE
Type constant from the java.sql.ResultSet object for convenience

See Also:
Constant Field Values

TYPE_SCROLL_SENSITIVE

public static final int TYPE_SCROLL_SENSITIVE
Type constant from the java.sql.ResultSet object for convenience

See Also:
Constant Field Values

CONCUR_READ_ONLY

public static final int CONCUR_READ_ONLY
Concurrency constant from the java.sql.ResultSet object for convenience

See Also:
Constant Field Values

CONCUR_UPDATABLE

public static final int CONCUR_UPDATABLE
Concurrency constant from the java.sql.ResultSet object for convenience

See Also:
Constant Field Values

specifyTypeAndConcur

protected boolean specifyTypeAndConcur

resultSetType

protected int resultSetType

resultSetConcurrency

protected int resultSetConcurrency

fetchSize

protected int fetchSize

maxRows

protected int maxRows

distinct

protected boolean distinct
Constructor Detail

EntityFindOptions

public EntityFindOptions()
Default constructor. Defaults are as follows: specifyTypeAndConcur = true resultSetType = TYPE_FORWARD_ONLY resultSetConcurrency = CONCUR_READ_ONLY distinct = false maxRows = 0 (all rows)


EntityFindOptions

public EntityFindOptions(boolean specifyTypeAndConcur,
                         int resultSetType,
                         int resultSetConcurrency,
                         int fetchSize,
                         int maxRows,
                         boolean distinct)

EntityFindOptions

public EntityFindOptions(boolean specifyTypeAndConcur,
                         int resultSetType,
                         int resultSetConcurrency,
                         boolean distinct)
Method Detail

getSpecifyTypeAndConcur

public boolean getSpecifyTypeAndConcur()
If true the following two parameters (resultSetType and resultSetConcurrency) will be used to specify how the results will be used; if false the default values for the JDBC driver will be used


setSpecifyTypeAndConcur

public void setSpecifyTypeAndConcur(boolean specifyTypeAndConcur)
If true the following two parameters (resultSetType and resultSetConcurrency) will be used to specify how the results will be used; if false the default values for the JDBC driver will be used


getResultSetType

public int getResultSetType()
Specifies how the ResultSet will be traversed. Available values: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_SCROLL_SENSITIVE. See the java.sql.ResultSet JavaDoc for more information. If you want it to be fast, use the common default: ResultSet.TYPE_FORWARD_ONLY.


setResultSetType

public void setResultSetType(int resultSetType)
Specifies how the ResultSet will be traversed. Available values: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE or ResultSet.TYPE_SCROLL_SENSITIVE. See the java.sql.ResultSet JavaDoc for more information. If you want it to be fast, use the common default: ResultSet.TYPE_FORWARD_ONLY.


getResultSetConcurrency

public int getResultSetConcurrency()
Specifies whether or not the ResultSet can be updated. Available values: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE. Should pretty much always be ResultSet.CONCUR_READ_ONLY with the Entity Engine.


setResultSetConcurrency

public void setResultSetConcurrency(int resultSetConcurrency)
Specifies whether or not the ResultSet can be updated. Available values: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE. Should pretty much always be ResultSet.CONCUR_READ_ONLY with the Entity Engine.


getFetchSize

public int getFetchSize()
Specifies the fetch size for this query. -1 will fall back to datasource settings.


setFetchSize

public void setFetchSize(int fetchSize)
Specifies the fetch size for this query. -1 will fall back to datasource settings.


getMaxRows

public int getMaxRows()
Specifies the max number of rows to return, 0 means all rows.


setMaxRows

public void setMaxRows(int maxRows)
Specifies the max number of rows to return, 0 means all rows.


getDistinct

public boolean getDistinct()
Specifies whether the values returned should be filtered to remove duplicate values.


setDistinct

public void setDistinct(boolean distinct)
Specifies whether the values returned should be filtered to remove duplicate values.