com.triactive.jdo.store
Class TJDOSQLQuery

java.lang.Object
  extended by com.triactive.jdo.store.Query
      extended by com.triactive.jdo.store.TJDOSQLQuery
All Implemented Interfaces:
java.io.Serializable, javax.jdo.Query

public class TJDOSQLQuery
extends Query

A JDO query that uses the default JQOQL language.

Author:
Mike Martin
See Also:
Query, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.triactive.jdo.store.Query
Query.ResultObjectFactory
 
Field Summary
 
Fields inherited from class com.triactive.jdo.store.Query
candidateClass, dba, filter, imports, isCompiled, ordering, parameterNames, parameters, parameterTypesByName, parsedImports, pm, queryResults, storeMgr, variableNames, variables, variableTypesByName
 
Constructor Summary
TJDOSQLQuery(PersistenceManager pm, StoreManager storeMgr, java.lang.String tjdoSqlText)
          Constructs a new query instance having the same criteria as the given query.
 
Method Summary
 void compile()
          Verify the elements of the query and provide a hint to the query to prepare and optimize an execution plan.
 void declareVariables(java.lang.String variables)
          Declare the unbound variables to be used in the query.
protected  void discardCompiled()
           
 boolean equals(java.lang.Object obj)
           
 java.lang.Object executeWithMap(java.util.Map parameters)
          Execute the query and return the filtered Collection.
 void setCandidates(java.util.Collection pcs)
          Set the candidate Collection to query.
 void setCandidates(javax.jdo.Extent pcs)
          Set the candidate Extent to query.
 void setFilter(java.lang.String filter)
          Set the filter for the query.
 void setOrdering(java.lang.String ordering)
          Set the ordering specification for the result Collection.
 
Methods inherited from class com.triactive.jdo.store.Query
close, closeAll, declareImports, declareParameters, execute, execute, execute, execute, executeWithArray, getCandidateClass, getIgnoreCache, getPersistenceManager, getStoreManager, hashCode, isValidJavaIdentifier, resolveClassDeclaration, setClass, setIgnoreCache
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TJDOSQLQuery

public TJDOSQLQuery(PersistenceManager pm,
                    StoreManager storeMgr,
                    java.lang.String tjdoSqlText)
Constructs a new query instance having the same criteria as the given query.

Parameters:
q - the query from which to copy criteria.
Method Detail

discardCompiled

protected void discardCompiled()
Overrides:
discardCompiled in class Query

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Query

setCandidates

public void setCandidates(javax.jdo.Extent pcs)
Set the candidate Extent to query.

This implementation always throws a JDOUserException since this concept doesn't apply to TJDOSQL queries.

Specified by:
setCandidates in interface javax.jdo.Query
Specified by:
setCandidates in class Query
Parameters:
pcs - the Candidate Extent.
Throws:
javax.jdo.JDOUserException - Always thrown.
See Also:
Query.setCandidates(javax.jdo.Extent)

setCandidates

public void setCandidates(java.util.Collection pcs)
Set the candidate Collection to query.

This implementation always throws a JDOUserException since this concept doesn't apply to TJDOSQL queries.

Specified by:
setCandidates in interface javax.jdo.Query
Specified by:
setCandidates in class Query
Parameters:
pcs - the Candidate collection.
Throws:
javax.jdo.JDOUserException - Always thrown.
See Also:
Query.setCandidates(java.util.Collection)

setFilter

public void setFilter(java.lang.String filter)
Set the filter for the query.

This implementation always throws a JDOUserException since this concept doesn't apply to TJDOSQL queries.

Specified by:
setFilter in interface javax.jdo.Query
Overrides:
setFilter in class Query
Parameters:
filter - the query filter.
Throws:
javax.jdo.JDOUserException - Always thrown.
See Also:
Query.setFilter(java.lang.String)

declareVariables

public void declareVariables(java.lang.String variables)
Declare the unbound variables to be used in the query.

This implementation always throws a JDOUserException since this concept doesn't apply to TJDOSQL queries.

Specified by:
declareVariables in interface javax.jdo.Query
Overrides:
declareVariables in class Query
Parameters:
variables - the variables separated by semicolons.
Throws:
javax.jdo.JDOUserException - Always thrown.
See Also:
Query.declareVariables(java.lang.String)

setOrdering

public void setOrdering(java.lang.String ordering)
Set the ordering specification for the result Collection.

This implementation always throws a JDOUserException since this concept doesn't apply to TJDOSQL queries.

Specified by:
setOrdering in interface javax.jdo.Query
Overrides:
setOrdering in class Query
Parameters:
ordering - the ordering specification.
Throws:
javax.jdo.JDOUserException - Always thrown.
See Also:
Query.setOrdering(java.lang.String)

compile

public void compile()
Verify the elements of the query and provide a hint to the query to prepare and optimize an execution plan.

Specified by:
compile in interface javax.jdo.Query
Overrides:
compile in class Query
See Also:
Query.compile()

executeWithMap

public java.lang.Object executeWithMap(java.util.Map parameters)
Execute the query and return the filtered Collection.

Specified by:
executeWithMap in interface javax.jdo.Query
Specified by:
executeWithMap in class Query
Parameters:
parameters - the Map containing all of the parameters.
Returns:
the filtered Collection.
See Also:
Query.executeWithMap(Map), Query.executeWithArray(Object[] parameters)


Copyright ? 2001 TriActive, Inc. All Rights Reserved.