com.force.sdk.jpa.query
Class JDOQLQuery

java.lang.Object
  extended by org.datanucleus.store.query.Query
      extended by org.datanucleus.store.query.AbstractJavaQuery
          extended by org.datanucleus.store.query.AbstractJDOQLQuery
              extended by com.force.sdk.jpa.query.JDOQLQuery
All Implemented Interfaces:
QueryNotifier, Serializable

public class JDOQLQuery
extends org.datanucleus.store.query.AbstractJDOQLQuery
implements QueryNotifier

Extension of AbstractJDOQLQuery to apply result restrictions. Implements QueryNotifier so that listeners can be attached to queries.

Author:
Fiaz Hossain
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.datanucleus.store.query.Query
org.datanucleus.store.query.Query.SubqueryDefinition
 
Field Summary
 
Fields inherited from class org.datanucleus.store.query.AbstractJavaQuery
candidateCollection, candidateExtent, singleString
 
Fields inherited from class org.datanucleus.store.query.Query
BULK_DELETE, BULK_UPDATE, candidateClass, candidateClassName, clr, compilation, ec, explicitParameters, explicitVariables, extensions, filter, from, fromInclNo, fromInclParam, grouping, having, ignoreCache, implicitParameters, imports, LOCALISER, ordering, OTHER, parameterNames, parsedImports, queryResults, range, result, resultClass, resultClassName, resultDistinct, SELECT, subclasses, subqueries, tasks, toExclNo, toExclParam, type, unique, unmodifiable, update
 
Constructor Summary
JDOQLQuery(org.datanucleus.store.ExecutionContext ec)
          construct a JDOQL query with a null query.
JDOQLQuery(org.datanucleus.store.ExecutionContext ec, org.datanucleus.store.query.AbstractJDOQLQuery q)
          construct a JDOQL query.
JDOQLQuery(org.datanucleus.store.ExecutionContext ec, String query)
          construct a JDOQL query with a string query.
 
Method Summary
 void addListener(String name, QueryListener listener)
          add a listener to a query that will be called when the soql query is generated.
protected  Object performExecute(Map parameters)
          Execute the JDOQL query against the Force.com db.
 void removeListener(String name)
          remove a listener with the given name.
 
Methods inherited from class org.datanucleus.store.query.AbstractJDOQLQuery
compileInternal, getLanguage, getSingleStringQuery, setGrouping, setResult
 
Methods inherited from class org.datanucleus.store.query.AbstractJavaQuery
discardCompiled, evaluateInMemory, getCandidateCollection, getCandidateExtent, getSupportedExtensions, performDeletePersistentAll, setCandidates, setCandidates, toString
 
Methods inherited from class org.datanucleus.store.query.Query
addExtension, addSubquery, applyImplicitParameterValueToCompilation, applyRangeChecks, assertIsModifiable, assertSupportsCancel, cancel, cancel, checkParameterTypesAgainstCompilation, checkUnusedParameters, close, closeAll, compile, declareExplicitParameters, declareExplicitVariables, declareImports, deletePersistentAll, deletePersistentAll, deletePersistentAll, equals, execute, executeInSeparateThread, executeQuery, executeWithArray, executeWithMap, getBooleanExtensionProperty, getCandidateClass, getCandidateClassName, getCompilation, getDatastoreReadTimeoutMillis, getDatastoreWriteTimeoutMillis, getExplicitParameters, getExplicitVariables, getExtension, getExtensions, getFetchPlan, getFilter, getFrom, getGrouping, getHaving, getIgnoreCache, getImplicitParameters, getImports, getInputParameters, getObjectManager, getOrdering, getParameterMapForValues, getParsedImports, getQueryManager, getRange, getRangeFromIncl, getRangeFromInclParam, getRangeToExcl, getRangeToExclParam, getResult, getResultClass, getResultClassName, getResultDistinct, getSerializeRead, getStoreManager, getSubqueryForVariable, getType, getUpdate, hashCode, hasSubqueryForVariable, isCompiled, isSubclasses, isUnique, isUnmodifiable, performExecuteInternal, performExecuteTask, prepareDatastore, resolveClassDeclaration, setCandidateClassName, setClass, setCompilation, setDatastoreReadTimeoutMillis, setDatastoreWriteTimeoutMillis, setExtensions, setFetchPlan, setFilter, setFrom, setHaving, setIgnoreCache, setImplicitParameter, setImplicitParameter, setOrdering, setRange, setRange, setResultClass, setResultClassName, setResultDistinct, setResultMetaData, setSerializeRead, setSubclasses, setType, setUnique, setUnmodifiable, setUpdate, shouldReturnSingleRow, supportsTimeout, useCaching, useFetchPlan, useResultsCaching
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDOQLQuery

public JDOQLQuery(org.datanucleus.store.ExecutionContext ec)
construct a JDOQL query with a null query.

Parameters:
ec - the execution context

JDOQLQuery

public JDOQLQuery(org.datanucleus.store.ExecutionContext ec,
                  org.datanucleus.store.query.AbstractJDOQLQuery q)
construct a JDOQL query.

Parameters:
ec - the execution context
q - the JDOQL query object

JDOQLQuery

public JDOQLQuery(org.datanucleus.store.ExecutionContext ec,
                  String query)
construct a JDOQL query with a string query.

Parameters:
ec - the execution context
query - the query in string form
Method Detail

performExecute

protected Object performExecute(Map parameters)
Execute the JDOQL query against the Force.com db.

Specified by:
performExecute in class org.datanucleus.store.query.Query

addListener

public void addListener(String name,
                        QueryListener listener)
Description copied from interface: QueryNotifier
add a listener to a query that will be called when the soql query is generated.

Specified by:
addListener in interface QueryNotifier
Parameters:
name - the name to register the listener with
listener - the query listener to register

removeListener

public void removeListener(String name)
Description copied from interface: QueryNotifier
remove a listener with the given name.

Specified by:
removeListener in interface QueryNotifier
Parameters:
name - the name the listener was registered with


Copyright © 2011. All Rights Reserved.