Package org.apache.ofbiz.entity.util
Class EntityFindOptions
- java.lang.Object
-
- org.apache.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
Fields Modifier and Type Field Description static int
CONCUR_READ_ONLY
Concurrency constant from the java.sql.ResultSet object for conveniencestatic int
CONCUR_UPDATABLE
Concurrency constant from the java.sql.ResultSet object for convenienceprotected boolean
distinct
protected int
fetchSize
protected int
limit
LIMIT optionprotected int
maxRows
protected int
offset
OFFSET optionprotected int
resultSetConcurrency
protected int
resultSetType
protected boolean
specifyTypeAndConcur
static int
TYPE_FORWARD_ONLY
Type constant from the java.sql.ResultSet object for conveniencestatic int
TYPE_SCROLL_INSENSITIVE
Type constant from the java.sql.ResultSet object for conveniencestatic int
TYPE_SCROLL_SENSITIVE
Type constant from the java.sql.ResultSet object for convenience
-
Constructor Summary
Constructors Constructor Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getDistinct()
Specifies whether the values returned should be filtered to remove duplicate values.int
getFetchSize()
Specifies the fetch size for this query.int
getLimit()
Get the LIMIT number.int
getMaxRows()
Specifies the max number of rows to return, 0 means all rows.int
getOffset()
Get the OFFSET number.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 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 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
-
limit
protected int limit
LIMIT option
-
offset
protected int offset
OFFSET option
-
-
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.
-
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.
-
-