Package org.apache.ofbiz.entity.util
Class EntityFindOptions
java.lang.Object
org.apache.ofbiz.entity.util.EntityFindOptions
- All Implemented Interfaces:
Serializable
Contains a number of variables used to select certain advanced finding options.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Concurrency constant from the java.sql.ResultSet object for conveniencestatic final int
Concurrency constant from the java.sql.ResultSet object for conveniencestatic final int
Type constant from the java.sql.ResultSet object for conveniencestatic final int
Type constant from the java.sql.ResultSet object for conveniencestatic final int
Type constant from the java.sql.ResultSet object for convenience -
Constructor Summary
ConstructorDescriptionDefault 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
Modifier and TypeMethodDescriptionboolean
Specifies whether the values returned should be filtered to remove duplicate values.int
Specifies the fetch size for this query.int
getLimit()
Get the LIMIT number.int
Specifies the max number of rows to return, 0 means all rows.int
Get the OFFSET number.int
Specifies whether or not the ResultSet can be updated.int
Specifies how the ResultSet will be traversed.boolean
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 usedvoid
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
setLimit
(int limit) Specifies the LIMIT number.void
setMaxRows
(int maxRows) Specifies the max number of rows to return, 0 means all rows.void
setOffset
(int offset) Specifies the OFFSET number.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
-
Field Details
-
TYPE_FORWARD_ONLY
public static final int TYPE_FORWARD_ONLYType constant from the java.sql.ResultSet object for convenience- See Also:
-
TYPE_SCROLL_INSENSITIVE
public static final int TYPE_SCROLL_INSENSITIVEType constant from the java.sql.ResultSet object for convenience- See Also:
-
TYPE_SCROLL_SENSITIVE
public static final int TYPE_SCROLL_SENSITIVEType constant from the java.sql.ResultSet object for convenience- See Also:
-
CONCUR_READ_ONLY
public static final int CONCUR_READ_ONLYConcurrency constant from the java.sql.ResultSet object for convenience- See Also:
-
CONCUR_UPDATABLE
public static final int CONCUR_UPDATABLEConcurrency constant from the java.sql.ResultSet object for convenience- See Also:
-
-
Constructor Details
-
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 Details
-
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. -
getLimit
public int getLimit()Get the LIMIT number. -
setLimit
public void setLimit(int limit) Specifies the LIMIT number. -
getOffset
public int getOffset()Get the OFFSET number. -
setOffset
public void setOffset(int offset) Specifies the OFFSET number.
-