Java Doc for Query.java in  » Database-ORM » JPOX » org » jpox » store » query » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » JPOX » org.jpox.store.query 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jpox.store.query.Query

All known Subclasses:   org.jpox.store.query.AbstractJavaQuery,
Query
abstract public class Query implements Serializable(Code)
Abstract implementation for all queries in JPOX. Implementations of JDOQL, SQL, JPQL, etc should extend this.
version:
   $Revision: 1.82 $

Inner Class :public class SubqueryDefinition

Field Summary
final public static  shortBULK_DELETE
    
final public static  shortBULK_UPDATE
    
final protected static  LocaliserLOCALISER
     Localiser for messages.
final public static  shortSELECT
    
protected  ClasscandidateClass
     The candidate class for this query.
protected  StringcandidateClassName
     Name of the candidate class (used when specified via Single-String).
protected  StringexplicitParameters
     Any explicit parameters defined for this query.
protected  StringexplicitVariables
     Any explicit variables defined for this query.
protected  Mapextensions
    
protected  Stringfilter
     The filter for the query.
protected transient  Stringfrom
     From clause of the query (optional).
protected  longfromInclNo
     Query result range start position (included).
protected  Stringgrouping
     Grouping clause for the query, for use with aggregate expressions.
protected  Stringhaving
    
protected  booleanignoreCache
     Whether to ignore dirty instances in the query.
protected transient  HashMapimplicitParameters
     Map of implicit parameters, keyed by the name/number(as String).
protected  Stringimports
     Any import declarations for the types used in the query.
protected transient  booleanisCompiled
    
final protected transient  ObjectManagerom
     Object Manager managing this query.
protected  Stringordering
     Ordering clause for the query, governing the order objects are returned.
protected transient  String[]parameterNames
     Array of (explicit) parameter names.
protected transient  ImportsparsedImports
     The imports definition.
protected transient  HashSetqueryResults
     All query results obtained from this query.
protected  Stringrange
     String form of the query result range.
protected  Stringresult
     Specification of the result of the query e.g aggregates etc.
protected  ClassresultClass
     User-defined class that best represents the results of a query.
protected  StringresultClassName
     Name of user-defined class to use as the result class.
protected  booleansubclasses
     Whether to allow subclasses of the candidate class be returned.
protected  Mapsubqueries
     Any subqueries, keyed by the variable name that they represent.
protected  longtoExclNo
     Query result range end position (excluded).
protected  shorttype
     Type of query.
protected  booleanunique
     Whether to return single value, or collection from the query.
protected  booleanunmodifiable
    

Constructor Summary
public  Query(ObjectManager om)
     Constructs a new query instance that uses the given persistence manager.

Method Summary
public  voidaddExtension(String key, Object value)
     Add a vendor-specific extension this query.
public  voidaddSubquery(Query sub, String variableDecl, String candidateExpr, Map paramMap)
     Method to add a subquery to this query.
protected  booleanapplyRangeChecks()
     Method to return if the query results should have the range checked and unnecessary rows discarded.
protected  voidassertIsModifiable()
     Method to throw a JPOXUserException if the query is currently not modifiable.
public  voidclose(Object queryResult)
     Close a query result and release any resources associated with it.
public  voidcloseAll()
     Close all query results associated with this Query instance, and release all resources associated with them.
public  voidcompile()
     Verify the elements of the query and provide a hint to the query to prepare and optimize an execution plan.
abstract protected  voidcompileInternal(boolean forExecute, Map parameterValues)
     Method to compile the query.
public  voiddeclareExplicitParameters(String parameters)
     Method to define the explicit parameters.
public  voiddeclareExplicitVariables(String variables)
     Method to define the explicit variables for the query.
public  voiddeclareImports(String imports)
     Set the import statements to be used to identify the fully qualified name of variables or parameters.
public  longdeletePersistentAll()
     Method to delete all objects found by this query, catering for cascade changes and updates to in-memory objects.
public  longdeletePersistentAll(Object[] parameters)
     Method to delete all objects found by this query, catering for cascade changes and updates to in-memory objects.
Parameters:
  parameters - the Object array with all of the parameters.
public  longdeletePersistentAll(Map parameters)
     Method to delete all objects found by this query, catering for cascade changes and updates to in-memory objects.
protected  voiddiscardCompiled()
     Utility to remove any previous compilation of this Query.
public  booleanequals(Object obj)
     Equality operator.
public  Objectexecute()
     Execute the query and return the filtered List.
public  Objectexecute(Object p1)
     Execute the query and return the filtered List.
Parameters:
  p1 - the value of the first parameter declared.
public  Objectexecute(Object p1, Object p2)
     Execute the query and return the filtered List.
Parameters:
  p1 - the value of the first parameter declared.
Parameters:
  p2 - the value of the second parameter declared.
public  Objectexecute(Object p1, Object p2, Object p3)
     Execute the query and return the filtered List.
Parameters:
  p1 - the value of the first parameter declared.
Parameters:
  p2 - the value of the second parameter declared.
Parameters:
  p3 - the value of the third parameter declared.
public  ObjectexecuteWithArray(Object[] parameterValues)
     Execute the query and return the filtered List.
Parameters:
  parameterValues - the Object array with all of the parameters.
public  ObjectexecuteWithMap(Map parameters)
     Execute the query and return the filtered result(s).
Parameters:
  parameters - the Map containing all of the parameters.
public  ClassgetCandidateClass()
     Accessor for the class of the candidate instances of the query.
public  StringgetCandidateClassName()
     Accessor for the candidate class name.
public  StringgetExplicitParameters()
     Accessor for the explicit parameters specification.
public  StringgetExplicitVariables()
     Accessor for the explicit variables specification.
public  ObjectgetExtension(String key)
     Accessor for the value of an extension for this query.
public  FetchPlangetFetchPlan()
     This method retrieves the fetch plan associated with the Query.
public  StringgetFilter()
     Accessor for the filter specification.
public  StringgetFrom()
     Accessor for the FROM clause of the query.
public  StringgetGrouping()
     Accessor for the grouping string for the query.
public  StringgetHaving()
     Accessor for the having string for the query.
public  booleangetIgnoreCache()
     Accessor for the ignoreCache option setting.
public  StringgetImports()
     Accessor for the imports specification.
public  ObjectManagergetObjectManager()
     Accessor for the PersistenceManager associated with this Query.
public  StringgetOrdering()
     Accessor for the ordering string for the query.
protected  ImportsgetParsedImports()
     Accessor for the parsed imports.
public  StringgetRange()
     Accessor for the range specification.
public  longgetRangeFromIncl()
     Accessor for the range lower limit (inclusive).
public  longgetRangeToExcl()
     Accessor for the range upper limit (exclusive).
public  StringgetResult()
     Accessor for the result specification string.
public  ClassgetResultClass()
     Accessor for the result class.
public  StringgetResultClassName()
     Accessor for the name of the result class.
public  StoreManagergetStoreManager()
     Accessor for the StoreManager associated with this Query.
public  SubqueryDefinitiongetSubqueryForVariable(String variableName)
     Accessor for the subquery for the supplied variable.
public  shortgetType()
     Accessor for the query type.
public  booleanhasSubqueryForVariable(String variableName)
     Accessor for whether there is a subquery for the specified variable name.
public  inthashCode()
     Hashcode generator.
public  booleanisCompiled()
     Accessor for whether the query is compiled.
public  booleanisSubclasses()
    
public  booleanisUnique()
     Accessor for whether the query results are unique.
public  booleanisUnmodifiable()
     Accessor for unmodifiable.
abstract protected  longperformDeletePersistentAll(Map parameters)
     Method to actually execute the deletion of objects. To be implemented by extending classes.
Parameters:
  parameters - Map containing the parameters.
abstract protected  ObjectperformExecute(Map parameters)
     Method to actually execute the query.
protected  voidprepareDatastore()
     Convenience method that will flush any outstanding updates to the datastore.
public  ClassresolveClassDeclaration(String classDecl)
     Utility to resolve the declaration to a particular class.
public  voidsetCandidateClassName(String candidateClassName)
     Convenience method to set the name of the candidate class.
abstract public  voidsetCandidates(Extent pcs)
     Set the candidate Extent to query.
abstract public  voidsetCandidates(Collection pcs)
     Set the candidate Collection to query.
public  voidsetClass(Class candidateClass)
     Mutator for the class of the candidate instances of the query.
public  voidsetExtensions(Map extensions)
     Set multiple extensions, or use null to clear extensions.
public  voidsetFetchPlan(FetchPlan fp)
     Mutator for the FetchPlan of the query.
public  voidsetFilter(String filter)
     Set the filter for the query.
public  voidsetFrom(String from)
     Set the candidates to the query.
public  voidsetGrouping(String grouping)
     Set the grouping specification for the result Collection.
public  voidsetHaving(String having)
     Set the having specification for the result Collection.
public  voidsetIgnoreCache(boolean ignoreCache)
     Set the ignoreCache option.
public  voidsetImplicitParameter(String name, Object value)
     Method to set the value of a named implicit parameter where known before execution.
public  voidsetImplicitParameter(int position, Object value)
     Method to set the value of a numbered implicit parameter where known before execution.
public  voidsetOrdering(String ordering)
     Set the ordering specification for the result Collection.
public  voidsetRange(long fromIncl, long toExcl)
     Set the range of the results.
public  voidsetRange(String range)
     Set the range of the results.
public  voidsetResult(String result)
     Set the result for the results.
public  voidsetResultClass(Class result_cls)
     Set the result class for the results.
public  voidsetResultClassName(String resultClassName)
     Convenience method to set the name of the result class.
public  voidsetResultMetaData(QueryResultMetaData qrmd)
     Method to set the MetaData defining the result.
public  voidsetSubclasses(boolean subclasses)
    
public  voidsetType(short type)
     Mutator to set the query type.
public  voidsetUnique(boolean unique)
     Set the uniqueness of the results.
public  voidsetUnmodifiable()
     Mutator for unmodifiable.
abstract protected  booleanshouldReturnSingleRow()
     Convenience method to return whether the query should return a single row.

Field Detail
BULK_DELETE
final public static short BULK_DELETE(Code)



BULK_UPDATE
final public static short BULK_UPDATE(Code)



LOCALISER
final protected static Localiser LOCALISER(Code)
Localiser for messages.



SELECT
final public static short SELECT(Code)



candidateClass
protected Class candidateClass(Code)
The candidate class for this query.



candidateClassName
protected String candidateClassName(Code)
Name of the candidate class (used when specified via Single-String).



explicitParameters
protected String explicitParameters(Code)
Any explicit parameters defined for this query.



explicitVariables
protected String explicitVariables(Code)
Any explicit variables defined for this query.



extensions
protected Map extensions(Code)
Any JPOX extensions



filter
protected String filter(Code)
The filter for the query.



from
protected transient String from(Code)
From clause of the query (optional).



fromInclNo
protected long fromInclNo(Code)
Query result range start position (included). Either specified, or compiled from "range".



grouping
protected String grouping(Code)
Grouping clause for the query, for use with aggregate expressions.



having
protected String having(Code)
Having clause for the query



ignoreCache
protected boolean ignoreCache(Code)
Whether to ignore dirty instances in the query.



implicitParameters
protected transient HashMap implicitParameters(Code)
Map of implicit parameters, keyed by the name/number(as String).



imports
protected String imports(Code)
Any import declarations for the types used in the query.



isCompiled
protected transient boolean isCompiled(Code)
State variable for the compilation state



om
final protected transient ObjectManager om(Code)
Object Manager managing this query.



ordering
protected String ordering(Code)
Ordering clause for the query, governing the order objects are returned.



parameterNames
protected transient String[] parameterNames(Code)
Array of (explicit) parameter names.



parsedImports
protected transient Imports parsedImports(Code)
The imports definition.



queryResults
protected transient HashSet queryResults(Code)
All query results obtained from this query. This is required because the query can be executed multiple times changing the input slightly each time for example.



range
protected String range(Code)
String form of the query result range. Only populated if specified via String.



result
protected String result(Code)
Specification of the result of the query e.g aggregates etc.



resultClass
protected Class resultClass(Code)
User-defined class that best represents the results of a query. Populated if specified via setResultClass().



resultClassName
protected String resultClassName(Code)
Name of user-defined class to use as the result class.



subclasses
protected boolean subclasses(Code)
Whether to allow subclasses of the candidate class be returned.



subqueries
protected Map subqueries(Code)
Any subqueries, keyed by the variable name that they represent.



toExclNo
protected long toExclNo(Code)
Query result range end position (excluded). Either specified, or compiled from "range".



type
protected short type(Code)
Type of query.



unique
protected boolean unique(Code)
Whether to return single value, or collection from the query.



unmodifiable
protected boolean unmodifiable(Code)
Whether the query can be modified




Constructor Detail
Query
public Query(ObjectManager om)(Code)
Constructs a new query instance that uses the given persistence manager.
Parameters:
  om - The ObjectManager for this query.




Method Detail
addExtension
public void addExtension(String key, Object value)(Code)
Add a vendor-specific extension this query. The key and value are not standard. An implementation must ignore keys that are not recognized.
Parameters:
  key - the extension key
Parameters:
  value - the extension value
since:
   JDO 2.0



addSubquery
public void addSubquery(Query sub, String variableDecl, String candidateExpr, Map paramMap)(Code)
Method to add a subquery to this query.
Parameters:
  sub - The subquery
Parameters:
  variableDecl - Declaration of variables
Parameters:
  candidateExpr - Candidate expression
Parameters:
  paramMap - Map of parameters for this subquery



applyRangeChecks
protected boolean applyRangeChecks()(Code)
Method to return if the query results should have the range checked and unnecessary rows discarded. This is for where the query language has specified a range but the datastore doesnt allow removal of unnecessary results in the query itself (so has to be done in post-processing). This implementation returns false and so should be overridden by query languages to match their capabilities. Whether to apply range checks in post-processing of results.



assertIsModifiable
protected void assertIsModifiable()(Code)
Method to throw a JPOXUserException if the query is currently not modifiable.
throws:
  JPOXUserException - Thrown when it is unmodifiable



close
public void close(Object queryResult)(Code)
Close a query result and release any resources associated with it.
Parameters:
  queryResult - the result of execute(...) on this Query instance.
See Also:   javax.jdo.Query.close



closeAll
public void closeAll()(Code)
Close all query results associated with this Query instance, and release all resources associated with them.
See Also:   javax.jdo.Query.closeAll



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



compileInternal
abstract protected void compileInternal(boolean forExecute, Map parameterValues)(Code)
Method to compile the query. To be implemented by the query implementation.
Parameters:
  forExecute - Whether to compile the query ready for execution (using any param values)
Parameters:
  parameterValues - Param values keyed by name (when compiling for execution)



declareExplicitParameters
public void declareExplicitParameters(String parameters)(Code)
Method to define the explicit parameters.
Parameters:
  parameters - the list of parameters separated by commas



declareExplicitVariables
public void declareExplicitVariables(String variables)(Code)
Method to define the explicit variables for the query.
Parameters:
  variables - the variables separated by semicolons.



declareImports
public void declareImports(String imports)(Code)
Set the import statements to be used to identify the fully qualified name of variables or parameters.
Parameters:
  imports - import statements separated by semicolons.
See Also:   javax.jdo.Query.declareImports



deletePersistentAll
public long deletePersistentAll()(Code)
Method to delete all objects found by this query, catering for cascade changes and updates to in-memory objects. The number of deleted objects.
See Also:   javax.jdo.Query.deletePersistentAll



deletePersistentAll
public long deletePersistentAll(Object[] parameters)(Code)
Method to delete all objects found by this query, catering for cascade changes and updates to in-memory objects.
Parameters:
  parameters - the Object array with all of the parameters. the filtered Collection.
See Also:   javax.jdo.Query.deletePersistentAll(Object[])



deletePersistentAll
public long deletePersistentAll(Map parameters)(Code)
Method to delete all objects found by this query, catering for cascade changes and updates to in-memory objects.
Parameters:
  parameters - Map of parameters for the query the number of deleted objects
See Also:   javax.jdo.Query.deletePersistentAll(Map)



discardCompiled
protected void discardCompiled()(Code)
Utility to remove any previous compilation of this Query.



equals
public boolean equals(Object obj)(Code)
Equality operator.
Parameters:
  obj - Object to compare against Whether this and the other object are equal.



execute
public Object execute()(Code)
Execute the query and return the filtered List. the filtered List.
See Also:   javax.jdo.Query.execute
See Also:   Query.executeWithArray(Object[] parameters)



execute
public Object execute(Object p1)(Code)
Execute the query and return the filtered List.
Parameters:
  p1 - the value of the first parameter declared. the filtered List.
See Also:   javax.jdo.Query.execute(Object)
See Also:   Query.executeWithArray(Object[] parameters)



execute
public Object execute(Object p1, Object p2)(Code)
Execute the query and return the filtered List.
Parameters:
  p1 - the value of the first parameter declared.
Parameters:
  p2 - the value of the second parameter declared. the filtered List.
See Also:   javax.jdo.Query.execute(ObjectObject)
See Also:   Query.executeWithArray(Object[] parameters)



execute
public Object execute(Object p1, Object p2, Object p3)(Code)
Execute the query and return the filtered List.
Parameters:
  p1 - the value of the first parameter declared.
Parameters:
  p2 - the value of the second parameter declared.
Parameters:
  p3 - the value of the third parameter declared. the filtered List.
See Also:   javax.jdo.Query.execute(ObjectObjectObject)
See Also:   Query.executeWithArray(Object[] parameters)



executeWithArray
public Object executeWithArray(Object[] parameterValues)(Code)
Execute the query and return the filtered List.
Parameters:
  parameterValues - the Object array with all of the parameters. the filtered List.
See Also:   javax.jdo.Query.executeWithArray(Object[])



executeWithMap
public Object executeWithMap(Map parameters)(Code)
Execute the query and return the filtered result(s).
Parameters:
  parameters - the Map containing all of the parameters. the filtered results (List, or Object)
See Also:   javax.jdo.Query.executeWithMap(Map)
See Also:   Query.executeWithArray(Object[] parameters)
throws:
  NoQueryResultsException - Thrown if no results were returned from the query.



getCandidateClass
public Class getCandidateClass()(Code)
Accessor for the class of the candidate instances of the query. the Class of the candidate instances.
See Also:   javax.jdo.Query.setClass



getCandidateClassName
public String getCandidateClassName()(Code)
Accessor for the candidate class name. Name of the candidate class (if any)



getExplicitParameters
public String getExplicitParameters()(Code)
Accessor for the explicit parameters specification. Explicit parameters specification



getExplicitVariables
public String getExplicitVariables()(Code)
Accessor for the explicit variables specification. Explicit variables specification



getExtension
public Object getExtension(String key)(Code)
Accessor for the value of an extension for this query.
Parameters:
  key - The key The value (if this extension is specified)



getFetchPlan
public FetchPlan getFetchPlan()(Code)
This method retrieves the fetch plan associated with the Query. It always returns the identical instance for the same Query instance. Any change made to the fetch plan affects subsequent query execution. Fetch plan is described in Section 12.7 the FetchPlan



getFilter
public String getFilter()(Code)
Accessor for the filter specification. Filter specification



getFrom
public String getFrom()(Code)
Accessor for the FROM clause of the query. From clause



getGrouping
public String getGrouping()(Code)
Accessor for the grouping string for the query. Grouping specification



getHaving
public String getHaving()(Code)
Accessor for the having string for the query. Having specification



getIgnoreCache
public boolean getIgnoreCache()(Code)
Accessor for the ignoreCache option setting. the ignoreCache option setting
See Also:   Query.setIgnoreCache
See Also:   javax.jdo.Query.getIgnoreCache
See Also:   javax.jdo.PersistenceManager.getIgnoreCache



getImports
public String getImports()(Code)
Accessor for the imports specification. Imports specification



getObjectManager
public ObjectManager getObjectManager()(Code)
Accessor for the PersistenceManager associated with this Query. the PersistenceManager associated with this Query.
See Also:   javax.jdo.Query.getPersistenceManager



getOrdering
public String getOrdering()(Code)
Accessor for the ordering string for the query. Ordering specification



getParsedImports
protected Imports getParsedImports()(Code)
Accessor for the parsed imports. If no imports are set then adds candidate class and user imports. Parsed imports



getRange
public String getRange()(Code)
Accessor for the range specification. Range specification



getRangeFromIncl
public long getRangeFromIncl()(Code)
Accessor for the range lower limit (inclusive). Range lower limit



getRangeToExcl
public long getRangeToExcl()(Code)
Accessor for the range upper limit (exclusive). Range upper limit



getResult
public String getResult()(Code)
Accessor for the result specification string. Result specification



getResultClass
public Class getResultClass()(Code)
Accessor for the result class. Result class



getResultClassName
public String getResultClassName()(Code)
Accessor for the name of the result class. Result class name



getStoreManager
public StoreManager getStoreManager()(Code)
Accessor for the StoreManager associated with this Query. the StoreManager associated with this Query.



getSubqueryForVariable
public SubqueryDefinition getSubqueryForVariable(String variableName)(Code)
Accessor for the subquery for the supplied variable.
Parameters:
  variableName - Name of the variable Subquery for the variable (if a subquery exists for this variable)



getType
public short getType()(Code)
Accessor for the query type. The query type



hasSubqueryForVariable
public boolean hasSubqueryForVariable(String variableName)(Code)
Accessor for whether there is a subquery for the specified variable name.
Parameters:
  variableName - Name of the variable Whether there is a subquery defined



hashCode
public int hashCode()(Code)
Hashcode generator. The Hashcode for this object.



isCompiled
public boolean isCompiled()(Code)
Accessor for whether the query is compiled. Whether the query is compiled.



isSubclasses
public boolean isSubclasses()(Code)
Accessor for whether this query includes subclasses Returns whether the query includes subclasses.



isUnique
public boolean isUnique()(Code)
Accessor for whether the query results are unique. Whether it is unique



isUnmodifiable
public boolean isUnmodifiable()(Code)
Accessor for unmodifiable. Returns the unmodifiable.



performDeletePersistentAll
abstract protected long performDeletePersistentAll(Map parameters)(Code)
Method to actually execute the deletion of objects. To be implemented by extending classes.
Parameters:
  parameters - Map containing the parameters. The filtered QueryResult.



performExecute
abstract protected Object performExecute(Map parameters)(Code)
Method to actually execute the query. To be implemented by extending classes for the particular query language.
Parameters:
  parameters - Map containing the parameters. Query result - QueryResult if SELECT, or Long if BULK_UPDATE, BULK_DELETE



prepareDatastore
protected void prepareDatastore()(Code)
Convenience method that will flush any outstanding updates to the datastore. This is intended to be used before execution so that the datastore has all relevant data present for what the query needs.



resolveClassDeclaration
public Class resolveClassDeclaration(String classDecl)(Code)
Utility to resolve the declaration to a particular class. Takes the passed in name, together with the defined import declarations and returns the class represented by the declaration.
Parameters:
  classDecl - The declaration The class it resolves to (if any)
throws:
  JPOXUserException - Thrown if the class cannot be resolved.



setCandidateClassName
public void setCandidateClassName(String candidateClassName)(Code)
Convenience method to set the name of the candidate class.
Parameters:
  candidateClassName - Name of the candidate class



setCandidates
abstract public void setCandidates(Extent pcs)(Code)
Set the candidate Extent to query. To be implemented by extensions.
Parameters:
  pcs - the Candidate Extent.
See Also:   javax.jdo.Query.setCandidates(javax.jdo.Extent)



setCandidates
abstract public void setCandidates(Collection pcs)(Code)
Set the candidate Collection to query. To be implemented by extensions.
Parameters:
  pcs - the Candidate collection.
See Also:   javax.jdo.Query.setCandidates(java.util.Collection)



setClass
public void setClass(Class candidateClass)(Code)
Mutator for the class of the candidate instances of the query.
Parameters:
  candidateClass - the Class of the candidate instances.
See Also:   javax.jdo.Query.setClass



setExtensions
public void setExtensions(Map extensions)(Code)
Set multiple extensions, or use null to clear extensions. Map keys and values are not standard. An implementation must ignore entries that are not recognized.
Parameters:
  extensions -
See Also:   Query.addExtension
since:
   1.1



setFetchPlan
public void setFetchPlan(FetchPlan fp)(Code)
Mutator for the FetchPlan of the query. This is called when applying a named FetchPlan.
Parameters:
  fp - The FetchPlan



setFilter
public void setFilter(String filter)(Code)
Set the filter for the query.
Parameters:
  filter - the query filter.
See Also:   javax.jdo.Query.setFilter



setFrom
public void setFrom(String from)(Code)
Set the candidates to the query.
Parameters:
  from - the candidates



setGrouping
public void setGrouping(String grouping)(Code)
Set the grouping specification for the result Collection.
Parameters:
  grouping - the grouping specification.
See Also:   javax.jdo.Query.setGrouping



setHaving
public void setHaving(String having)(Code)
Set the having specification for the result Collection.
Parameters:
  having - the having specification.



setIgnoreCache
public void setIgnoreCache(boolean ignoreCache)(Code)
Set the ignoreCache option. Currently this simply stores the ignoreCache value, and doesn't necessarily use it. The parameter is a "hint" to the query engine. TODO : Implement this fully.
Parameters:
  ignoreCache - the setting of the ignoreCache option.
See Also:   javax.jdo.Query.setIgnoreCache
See Also:   javax.jdo.PersistenceManager.setIgnoreCache



setImplicitParameter
public void setImplicitParameter(String name, Object value)(Code)
Method to set the value of a named implicit parameter where known before execution.
Parameters:
  name - Name of the parameter
Parameters:
  value - Value of the parameter
throws:
  JPOXQueryInvalidParametersException - if the parameter is invalid



setImplicitParameter
public void setImplicitParameter(int position, Object value)(Code)
Method to set the value of a numbered implicit parameter where known before execution.
Parameters:
  position - Position of the parameter
Parameters:
  value - Value of the parameter
throws:
  JPOXQueryInvalidParametersException - if the parameter is invalid



setOrdering
public void setOrdering(String ordering)(Code)
Set the ordering specification for the result Collection.
Parameters:
  ordering - the ordering specification.
See Also:   javax.jdo.Query.setOrdering



setRange
public void setRange(long fromIncl, long toExcl)(Code)
Set the range of the results. By default all results are returned but this allows specification of a range of elements required. See JDO 2.0 specification section 14.6.8
Parameters:
  fromIncl - From element no (inclusive) to return
Parameters:
  toExcl - To element no (exclusive) to return
See Also:   javax.jdo.Query.setRange(longlong)
since:
   1.1



setRange
public void setRange(String range)(Code)
Set the range of the results. By default all results are returned but this allows specification of a range of elements required. See JDO 2.0 specification section 14.6.8
Parameters:
  range - Range string
See Also:   javax.jdo.Query.setRange(java.lang.String)
since:
   1.1



setResult
public void setResult(String result)(Code)
Set the result for the results. The application might want to get results from a query that are not instances of the candidate class. The results might be fields of persistent instances, instances of classes other than the candidate class, or aggregates of fields.
Parameters:
  result - The result parameter consists of the optional keyworddistinct followed by a commaseparated list of named result expressions ora result class specification.
See Also:   javax.jdo.Query.setResult
since:
   1.1



setResultClass
public void setResultClass(Class result_cls)(Code)
Set the result class for the results. The result class must obey various things as per the JDO 2.0 spec 14.6.12.
Parameters:
  result_cls - The result class
See Also:   javax.jdo.Query.setResultClass
since:
   1.1



setResultClassName
public void setResultClassName(String resultClassName)(Code)
Convenience method to set the name of the result class.
Parameters:
  resultClassName - Name of the result class



setResultMetaData
public void setResultMetaData(QueryResultMetaData qrmd)(Code)
Method to set the MetaData defining the result. If the query doesn't support such a setting will throw a JPOXException.
Parameters:
  qrmd - QueryResultMetaData
since:
   1.2



setSubclasses
public void setSubclasses(boolean subclasses)(Code)
Mutator for whether this query includes subclasses
Parameters:
  subclasses - Where subclasses of the candidate class are to be included.



setType
public void setType(short type)(Code)
Mutator to set the query type.
Parameters:
  type - The query type



setUnique
public void setUnique(boolean unique)(Code)
Set the uniqueness of the results. A value of true will return a single value (or null) where the application knows that there are 0 or 1 objects to be returned. See JDO 2.0 specification section 14.6
Parameters:
  unique - whether the result is unique
See Also:   javax.jdo.Query.setUnique
since:
   1.1



setUnmodifiable
public void setUnmodifiable()(Code)
Mutator for unmodifiable.



shouldReturnSingleRow
abstract protected boolean shouldReturnSingleRow()(Code)
Convenience method to return whether the query should return a single row. Whether a single row should result



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.