Kodo 4.0.0 generated on May 15 2006

kodo.persistence
Interface KodoQuery

All Superinterfaces:
Query, kodo.kernel.QueryFlushModes, kodo.kernel.QueryLanguages, kodo.kernel.QueryOperations

public interface KodoQuery
extends Query, kodo.kernel.QueryOperations, kodo.kernel.QueryFlushModes, kodo.kernel.QueryLanguages

Interface implemented by Kodo queries.

Since:
4.0

Field Summary
 
Fields inherited from interface kodo.kernel.QueryOperations
OP_DELETE, OP_SELECT, OP_UPDATE
 
Fields inherited from interface kodo.kernel.QueryFlushModes
FLUSH_FALSE, FLUSH_TRUE, FLUSH_WITH_CONNECTION
 
Fields inherited from interface kodo.kernel.QueryLanguages
LANG_JDOQL, LANG_JPQL, LANG_METHODQL, LANG_SQL
 
Method Summary
 KodoQuery addAggregateListener(kodo.kernel.exps.AggregateListener listener)
          Register an aggregate listener for the query.
 KodoQuery addFilterListener(kodo.kernel.exps.FilterListener listener)
          Register a filter listener for the query.
 KodoQuery closeAll()
          Close all open query results.
 KodoQuery 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.
 KodoEntityManager getEntityManager()
          The owning entity manage.
 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.
 int 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.
 KodoQuery removeAggregateListener(kodo.kernel.exps.AggregateListener listener)
          Remove an aggregate listener from the query.
 KodoQuery removeFilterListener(kodo.kernel.exps.FilterListener listener)
          Remove a filter listener from the query.
 KodoQuery setCandidateCollection(Collection coll)
          Set a collection of candidates.
 KodoQuery setFirstResult(int startPosition)
           
 KodoQuery setFlushMode(FlushModeType flushMode)
           
 KodoQuery setHint(String hintName, Object value)
           
 KodoQuery setIgnoreChanges(boolean ignore)
          Whether to ignore changes in the current transaction.
 KodoQuery setMaxResults(int maxResult)
           
 KodoQuery setParameter(int position, Calendar value, TemporalType temporalType)
           
 KodoQuery setParameter(int position, Date value, TemporalType temporalType)
           
 KodoQuery setParameter(int position, Object value)
           
 KodoQuery setParameter(String name, Calendar value, TemporalType temporalType)
           
 KodoQuery setParameter(String name, Date value, TemporalType temporalType)
           
 KodoQuery setParameter(String name, Object value)
           
 KodoQuery setParameters(Map params)
          Set parameters.
 KodoQuery setParameters(Object... params)
          Set parameters.
 KodoQuery setResultClass(Class type)
          Query result element type.
 KodoQuery setSubclasses(boolean subs)
          Whether subclasses are included in the query results.
 
Methods inherited from interface javax.persistence.Query
executeUpdate, getResultList, getSingleResult
 

Method Detail

getEntityManager

KodoEntityManager getEntityManager()
The owning entity manage.


getLanguage

String getLanguage()
Query language.


getOperation

int getOperation()
Query operation type.


getFetchPlan

FetchPlan getFetchPlan()
Fetch plan for controlling the loading of results.


getQueryString

String getQueryString()
Query string.


getIgnoreChanges

boolean getIgnoreChanges()
Whether to ignore changes in the current transaction.


setIgnoreChanges

KodoQuery setIgnoreChanges(boolean ignore)
Whether to ignore changes in the current transaction.


addFilterListener

KodoQuery addFilterListener(kodo.kernel.exps.FilterListener listener)
Register a filter listener for the query.


removeFilterListener

KodoQuery removeFilterListener(kodo.kernel.exps.FilterListener listener)
Remove a filter listener from the query.


addAggregateListener

KodoQuery addAggregateListener(kodo.kernel.exps.AggregateListener listener)
Register an aggregate listener for the query.


removeAggregateListener

KodoQuery removeAggregateListener(kodo.kernel.exps.AggregateListener listener)
Remove an aggregate listener from the query.


getCandidateCollection

Collection getCandidateCollection()
Return the candidate collection, or null if an extent was specified instead of a collection.


setCandidateCollection

KodoQuery setCandidateCollection(Collection coll)
Set a collection of candidates.


getResultClass

Class getResultClass()
Query result element type.


setResultClass

KodoQuery setResultClass(Class type)
Query result element type.


hasSubclasses

boolean hasSubclasses()
Whether subclasses are included in the query results.


setSubclasses

KodoQuery setSubclasses(boolean subs)
Whether subclasses are included in the query results.


getFirstResult

int getFirstResult()
Return the 0-based start index for the returned results.


getMaxResults

int getMaxResults()
Return the maximum number of results to retrieve. or Integer.MAX_VALUE for no limit.


compile

KodoQuery compile()
Compile the query.


hasPositionalParameters

boolean hasPositionalParameters()
Whether this query has positional parameters.


getPositionalParameters

Object[] getPositionalParameters()
The positional parameters for the query; empty array if none or if query uses named parameters.


getNamedParameters

Map getNamedParameters()
The named parameters for the query; empty map if none or if query uses named parameters.


setParameters

KodoQuery setParameters(Map params)
Set parameters.


setParameters

KodoQuery setParameters(Object... params)
Set parameters.


closeAll

KodoQuery closeAll()
Close all open query results.


getDataStoreActions

String[] getDataStoreActions(Map params)
Returns a description of the commands that will be sent to the datastore in order to execute this query. This will typically be in the native query language of the database (e.g., SQL).

Parameters:
params - the named parameter map for the query invocation

setMaxResults

KodoQuery setMaxResults(int maxResult)
Specified by:
setMaxResults in interface Query

setFirstResult

KodoQuery setFirstResult(int startPosition)
Specified by:
setFirstResult in interface Query

setHint

KodoQuery setHint(String hintName,
                  Object value)
Specified by:
setHint in interface Query

setParameter

KodoQuery setParameter(String name,
                       Object value)
Specified by:
setParameter in interface Query

setParameter

KodoQuery setParameter(String name,
                       Date value,
                       TemporalType temporalType)
Specified by:
setParameter in interface Query

setParameter

KodoQuery setParameter(String name,
                       Calendar value,
                       TemporalType temporalType)
Specified by:
setParameter in interface Query

setParameter

KodoQuery setParameter(int position,
                       Object value)
Specified by:
setParameter in interface Query

setParameter

KodoQuery setParameter(int position,
                       Date value,
                       TemporalType temporalType)
Specified by:
setParameter in interface Query

setParameter

KodoQuery setParameter(int position,
                       Calendar value,
                       TemporalType temporalType)
Specified by:
setParameter in interface Query

setFlushMode

KodoQuery setFlushMode(FlushModeType flushMode)
Specified by:
setFlushMode in interface Query

getFlushMode

FlushModeType getFlushMode()
Return the current flush mode.


Kodo 4.0.0 generated on May 15 2006

Copyright 2001-2006 BEA Systems, Inc. All Rights Reserved.