|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.persistence.QueryImpl
public class QueryImpl
Implementation of Query
interface.
Field Summary |
---|
Fields inherited from interface org.apache.openjpa.persistence.OpenJPAQuery |
---|
HINT_RESULT_COUNT |
Constructor Summary | |
---|---|
QueryImpl(EntityManagerImpl em,
Query query)
Constructor; supply factory and delegate. |
Method Summary | |
---|---|
OpenJPAQuery |
addAggregateListener(AggregateListener listener)
Register an aggregate listener for the query. |
OpenJPAQuery |
addFilterListener(FilterListener listener)
Register a filter listener for the query. |
OpenJPAQuery |
closeAll()
Close all open query results. |
OpenJPAQuery |
compile()
Compile the query. |
boolean |
equals(Object other)
|
int |
executeUpdate()
|
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. |
Query |
getDelegate()
Delegate. |
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 named 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. |
List |
getResultList()
|
Object |
getSingleResult()
Execute a query that returns a single result. |
int |
hashCode()
|
boolean |
hasPositionalParameters()
Whether this query has positional parameters. |
boolean |
hasSubclasses()
Whether subclasses are included in the query results. |
OpenJPAQuery |
removeAggregateListener(AggregateListener listener)
Remove an aggregate listener from the query. |
OpenJPAQuery |
removeFilterListener(FilterListener listener)
Remove a filter listener from the query. |
OpenJPAQuery |
setCandidateCollection(Collection coll)
Set a collection of candidates. |
OpenJPAQuery |
setFirstResult(int startPosition)
|
OpenJPAQuery |
setFlushMode(FlushModeType flushMode)
|
OpenJPAQuery |
setHint(String key,
Object value)
|
OpenJPAQuery |
setIgnoreChanges(boolean ignore)
Whether to ignore changes in the current transaction. |
OpenJPAQuery |
setMaxResults(int max)
|
OpenJPAQuery |
setParameter(int position,
Calendar value,
TemporalType t)
|
OpenJPAQuery |
setParameter(int position,
Date value,
TemporalType type)
|
OpenJPAQuery |
setParameter(int position,
Object value)
|
OpenJPAQuery |
setParameter(String name,
Calendar value,
TemporalType t)
|
OpenJPAQuery |
setParameter(String name,
Date value,
TemporalType type)
|
OpenJPAQuery |
setParameter(String name,
Object value)
|
OpenJPAQuery |
setParameters(Map params)
Set parameters. |
OpenJPAQuery |
setParameters(Object... params)
Set parameters. |
OpenJPAQuery |
setResultClass(Class cls)
Query result element type. |
OpenJPAQuery |
setSubclasses(boolean subs)
Whether subclasses are included in the query results. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryImpl(EntityManagerImpl em, Query query)
Method Detail |
---|
public Query getDelegate()
public OpenJPAEntityManager getEntityManager()
OpenJPAQuery
getEntityManager
in interface OpenJPAQuery
public String getLanguage()
OpenJPAQuery
getLanguage
in interface OpenJPAQuery
public QueryOperationType getOperation()
OpenJPAQuery
getOperation
in interface OpenJPAQuery
public FetchPlan getFetchPlan()
OpenJPAQuery
getFetchPlan
in interface OpenJPAQuery
public String getQueryString()
OpenJPAQuery
getQueryString
in interface OpenJPAQuery
public boolean getIgnoreChanges()
OpenJPAQuery
getIgnoreChanges
in interface OpenJPAQuery
public OpenJPAQuery setIgnoreChanges(boolean ignore)
OpenJPAQuery
setIgnoreChanges
in interface OpenJPAQuery
public OpenJPAQuery addFilterListener(FilterListener listener)
OpenJPAQuerySPI
addFilterListener
in interface OpenJPAQuerySPI
public OpenJPAQuery removeFilterListener(FilterListener listener)
OpenJPAQuerySPI
removeFilterListener
in interface OpenJPAQuerySPI
public OpenJPAQuery addAggregateListener(AggregateListener listener)
OpenJPAQuerySPI
addAggregateListener
in interface OpenJPAQuerySPI
public OpenJPAQuery removeAggregateListener(AggregateListener listener)
OpenJPAQuerySPI
removeAggregateListener
in interface OpenJPAQuerySPI
public Collection getCandidateCollection()
OpenJPAQuery
null
if an
extent was specified instead of a collection.
getCandidateCollection
in interface OpenJPAQuery
public OpenJPAQuery setCandidateCollection(Collection coll)
OpenJPAQuery
setCandidateCollection
in interface OpenJPAQuery
public Class getResultClass()
OpenJPAQuery
getResultClass
in interface OpenJPAQuery
public OpenJPAQuery setResultClass(Class cls)
OpenJPAQuery
setResultClass
in interface OpenJPAQuery
public boolean hasSubclasses()
OpenJPAQuery
hasSubclasses
in interface OpenJPAQuery
public OpenJPAQuery setSubclasses(boolean subs)
OpenJPAQuery
setSubclasses
in interface OpenJPAQuery
public int getFirstResult()
OpenJPAQuery
getFirstResult
in interface OpenJPAQuery
public OpenJPAQuery setFirstResult(int startPosition)
setFirstResult
in interface Query
setFirstResult
in interface OpenJPAQuery
public int getMaxResults()
OpenJPAQuery
Integer.MAX_VALUE
for no limit.
getMaxResults
in interface OpenJPAQuery
public OpenJPAQuery setMaxResults(int max)
setMaxResults
in interface Query
setMaxResults
in interface OpenJPAQuery
public OpenJPAQuery compile()
OpenJPAQuery
compile
in interface OpenJPAQuery
public List getResultList()
getResultList
in interface Query
public Object getSingleResult()
getSingleResult
in interface Query
public int executeUpdate()
executeUpdate
in interface Query
public FlushModeType getFlushMode()
OpenJPAQuery
getFlushMode
in interface OpenJPAQuery
public OpenJPAQuery setFlushMode(FlushModeType flushMode)
setFlushMode
in interface Query
setFlushMode
in interface OpenJPAQuery
public OpenJPAQuery setHint(String key, Object value)
setHint
in interface Query
setHint
in interface OpenJPAQuery
public OpenJPAQuery setParameter(int position, Calendar value, TemporalType t)
setParameter
in interface Query
setParameter
in interface OpenJPAQuery
public OpenJPAQuery setParameter(int position, Date value, TemporalType type)
setParameter
in interface Query
setParameter
in interface OpenJPAQuery
public OpenJPAQuery setParameter(int position, Object value)
setParameter
in interface Query
setParameter
in interface OpenJPAQuery
public OpenJPAQuery setParameter(String name, Calendar value, TemporalType t)
setParameter
in interface Query
setParameter
in interface OpenJPAQuery
public OpenJPAQuery setParameter(String name, Date value, TemporalType type)
setParameter
in interface Query
setParameter
in interface OpenJPAQuery
public OpenJPAQuery setParameter(String name, Object value)
setParameter
in interface Query
setParameter
in interface OpenJPAQuery
public boolean hasPositionalParameters()
OpenJPAQuery
hasPositionalParameters
in interface OpenJPAQuery
public Object[] getPositionalParameters()
OpenJPAQuery
getPositionalParameters
in interface OpenJPAQuery
public OpenJPAQuery setParameters(Object... params)
OpenJPAQuery
setParameters
in interface OpenJPAQuery
public Map getNamedParameters()
OpenJPAQuery
getNamedParameters
in interface OpenJPAQuery
public OpenJPAQuery setParameters(Map params)
OpenJPAQuery
setParameters
in interface OpenJPAQuery
public OpenJPAQuery closeAll()
OpenJPAQuery
closeAll
in interface OpenJPAQuery
public String[] getDataStoreActions(Map params)
OpenJPAQuery
getDataStoreActions
in interface OpenJPAQuery
params
- the named parameter map for the query invocationpublic int hashCode()
hashCode
in class Object
public boolean equals(Object other)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |