|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OpenJPAQuery
Interface implemented by OpenJPA queries.
Field Summary | |
---|---|
static int |
FLUSH_FALSE
Deprecated. use the FlushModeType enum instead. |
static int |
FLUSH_TRUE
Deprecated. use the FlushModeType enum instead. |
static int |
FLUSH_WITH_CONNECTION
Deprecated. use the FlushModeType enum instead. |
static String |
HINT_RESULT_COUNT
Hint key for specifying the number of rows to optimize for. |
static int |
OP_DELETE
Deprecated. use the QueryOperationType instead. |
static int |
OP_SELECT
Deprecated. use the QueryOperationType instead. |
static int |
OP_UPDATE
Deprecated. use the QueryOperationType instead. |
Method Summary | |
---|---|
OpenJPAQuery |
addAggregateListener(AggregateListener listener)
Deprecated. cast to QueryImpl instead. This
method pierces the published-API boundary, as does the SPI cast. |
OpenJPAQuery |
addFilterListener(FilterListener listener)
Deprecated. cast to QueryImpl instead. This
method pierces the published-API boundary, as does the SPI cast. |
OpenJPAQuery |
closeAll()
Close all open query results. |
OpenJPAQuery |
compile()
Compile the query. |
Collection |
getCandidateCollection()
Return the candidate collection, or null if an
extent was specified instead of a collection. |
String[] |
getDataStoreActions(Map params)
Returns a description of the commands that will be sent to the datastore in order to execute this query. |
OpenJPAEntityManager |
getEntityManager()
The owning entity manager. |
FetchPlan |
getFetchPlan()
Fetch plan for controlling the loading of results. |
int |
getFirstResult()
Return the 0-based start index for the returned results. |
FlushModeType |
getFlushMode()
Return the current flush mode. |
boolean |
getIgnoreChanges()
Whether to ignore changes in the current transaction. |
String |
getLanguage()
Query language. |
int |
getMaxResults()
Return the maximum number of results to retrieve. |
Map |
getNamedParameters()
The named parameters for the query; empty map if none or if query uses positional parameters. |
QueryOperationType |
getOperation()
Query operation type. |
Object[] |
getPositionalParameters()
The positional parameters for the query; empty array if none or if query uses named parameters. |
String |
getQueryString()
Query string. |
Class |
getResultClass()
Query result element type. |
boolean |
hasPositionalParameters()
Whether this query has positional parameters. |
boolean |
hasSubclasses()
Whether subclasses are included in the query results. |
OpenJPAQuery |
removeAggregateListener(AggregateListener listener)
Deprecated. cast to QueryImpl instead. This
method pierces the published-API boundary, as does the SPI cast. |
OpenJPAQuery |
removeFilterListener(FilterListener listener)
Deprecated. cast to QueryImpl instead. This
method pierces the published-API boundary, as does the SPI cast. |
OpenJPAQuery |
setCandidateCollection(Collection coll)
Set a collection of candidates. |
OpenJPAQuery |
setFirstResult(int startPosition)
|
OpenJPAQuery |
setFlushMode(FlushModeType flushMode)
|
OpenJPAQuery |
setHint(String hintName,
Object value)
|
OpenJPAQuery |
setIgnoreChanges(boolean ignore)
Whether to ignore changes in the current transaction. |
OpenJPAQuery |
setMaxResults(int maxResult)
|
OpenJPAQuery |
setParameter(int position,
Calendar value,
TemporalType temporalType)
|
OpenJPAQuery |
setParameter(int position,
Date value,
TemporalType temporalType)
|
OpenJPAQuery |
setParameter(int position,
Object value)
|
OpenJPAQuery |
setParameter(String name,
Calendar value,
TemporalType temporalType)
|
OpenJPAQuery |
setParameter(String name,
Date value,
TemporalType temporalType)
|
OpenJPAQuery |
setParameter(String name,
Object value)
|
OpenJPAQuery |
setParameters(Map params)
Set parameters. |
OpenJPAQuery |
setParameters(Object... params)
Set parameters. |
OpenJPAQuery |
setResultClass(Class type)
Query result element type. |
OpenJPAQuery |
setSubclasses(boolean subs)
Whether subclasses are included in the query results. |
Field Detail |
---|
static final String HINT_RESULT_COUNT
static final int OP_SELECT
QueryOperationType
instead.static final int OP_DELETE
QueryOperationType
instead.static final int OP_UPDATE
QueryOperationType
instead.static final int FLUSH_TRUE
FlushModeType
enum instead.static final int FLUSH_FALSE
FlushModeType
enum instead.static final int FLUSH_WITH_CONNECTION
FlushModeType
enum instead.Method Detail |
---|
OpenJPAEntityManager getEntityManager()
String getLanguage()
QueryOperationType getOperation()
FetchPlan getFetchPlan()
String getQueryString()
boolean getIgnoreChanges()
OpenJPAQuery setIgnoreChanges(boolean ignore)
Collection getCandidateCollection()
null
if an
extent was specified instead of a collection.
OpenJPAQuery setCandidateCollection(Collection coll)
Class getResultClass()
OpenJPAQuery setResultClass(Class type)
boolean hasSubclasses()
OpenJPAQuery setSubclasses(boolean subs)
int getFirstResult()
int getMaxResults()
Integer.MAX_VALUE
for no limit.
OpenJPAQuery compile()
boolean hasPositionalParameters()
Object[] getPositionalParameters()
Map getNamedParameters()
OpenJPAQuery setParameters(Map params)
OpenJPAQuery setParameters(Object... params)
OpenJPAQuery closeAll()
String[] getDataStoreActions(Map params)
params
- the named parameter map for the query invocationOpenJPAQuery setMaxResults(int maxResult)
OpenJPAQuery setFirstResult(int startPosition)
OpenJPAQuery setHint(String hintName, Object value)
OpenJPAQuery setParameter(String name, Object value)
OpenJPAQuery setParameter(String name, Date value, TemporalType temporalType)
OpenJPAQuery setParameter(String name, Calendar value, TemporalType temporalType)
OpenJPAQuery setParameter(int position, Object value)
OpenJPAQuery setParameter(int position, Date value, TemporalType temporalType)
OpenJPAQuery setParameter(int position, Calendar value, TemporalType temporalType)
OpenJPAQuery setFlushMode(FlushModeType flushMode)
FlushModeType getFlushMode()
OpenJPAQuery addFilterListener(FilterListener listener)
QueryImpl
instead. This
method pierces the published-API boundary, as does the SPI cast.
OpenJPAQuery removeFilterListener(FilterListener listener)
QueryImpl
instead. This
method pierces the published-API boundary, as does the SPI cast.
OpenJPAQuery addAggregateListener(AggregateListener listener)
QueryImpl
instead. This
method pierces the published-API boundary, as does the SPI cast.
OpenJPAQuery removeAggregateListener(AggregateListener listener)
QueryImpl
instead. This
method pierces the published-API boundary, as does the SPI cast.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |