Java Doc for Query.java in  » Database-DBMS » db4o-6.4 » com » db4o » 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 DBMS » db4o 6.4 » com.db4o.query 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.db4o.query.Query

All known Subclasses:   com.db4o.internal.query.processor.QQuery,  com.db4o.internal.cluster.ClusterQuery,
Query
public interface Query (Code)
handle to a node in a S.O.D.A. query graph.

A node in the query graph can represent multiple classes, one class or an attribute of a class.

The graph is automatically extended with attributes of added constraints (see Query.constrain(java.lang.Object) ) and upon calls to Query.descend(java.lang.String) that request nodes that do not yet exist.

References to joined nodes in the query graph can be obtained by "walking" along the nodes of the graph with the method Query.descend(java.lang.String) .

Query.execute() evaluates the entire graph against all persistent objects.

Query.execute() can be called from any Query node of the graph. It will return an ObjectSet filled with objects of the class/classes that the node, it was called from, represents.

Note:
Predicate Native queries are the recommended main query interface of db4o.




Method Summary
public  Constraintconstrain(Object constraint)
     adds a constraint to this node.

If the constraint contains attributes that are not yet present in the query graph, the query graph is extended accordingly.

Special behaviour for:
  • class Class : confine the result to objects of one class or to objects implementing an interface.
  • interface Evaluation : run evaluation callbacks against all candidates.

Parameters:
  constraint - the constraint to be added to this Query.
public  Constraintsconstraints()
     returns a Constraints object that holds an array of all constraints on this node.
public  Querydescend(String fieldName)
     returns a reference to a descendant node in the query graph.

If the node does not exist, it will be created.

All classes represented in the query node are tested, whether they contain a field with the specified field name.
public  ObjectSetexecute()
     executes the Query .
public  QueryorderAscending()
     adds an ascending ordering criteria to this node of the query graph.
public  QueryorderDescending()
     adds a descending order criteria to this node of the query graph.
public  QuerysortBy(QueryComparator comparator)
     Sort the resulting ObjectSet by the given comparator.
Parameters:
  comparator - The comparator to apply.
public  QuerysortBy(Comparator comparator)
     Sort the resulting ObjectSet by the given comparator.
Parameters:
  comparator - The comparator to apply.



Method Detail
constrain
public Constraint constrain(Object constraint)(Code)
adds a constraint to this node.

If the constraint contains attributes that are not yet present in the query graph, the query graph is extended accordingly.

Special behaviour for:
  • class Class : confine the result to objects of one class or to objects implementing an interface.
  • interface Evaluation : run evaluation callbacks against all candidates.

Parameters:
  constraint - the constraint to be added to this Query. Constraint a new Constraint for thisquery node or null for objects implementing the Evaluation interface.



constraints
public Constraints constraints()(Code)
returns a Constraints object that holds an array of all constraints on this node. Constraints on this query node.



descend
public Query descend(String fieldName)(Code)
returns a reference to a descendant node in the query graph.

If the node does not exist, it will be created.

All classes represented in the query node are tested, whether they contain a field with the specified field name. The descendant Query node will be created from all possible candidate classes.
Parameters:
  fieldName - path to the descendant. descendant Query node



execute
public ObjectSet execute()(Code)
executes the Query . ObjectSet - the result of the Query.



orderAscending
public Query orderAscending()(Code)
adds an ascending ordering criteria to this node of the query graph.

If multiple ordering criteria are applied, the chronological order of method calls is relevant: criteria created by 'earlier' calls are considered more significant, i.e. 'later' criteria only have an effect for elements that are considered equal by all 'earlier' criteria.

As an example, consider a type with two int fields, and an instance set {(a:1,b:3),(a:2,b:2),(a:1,b:2),(a:2,b:3)}. The call sequence [orderAscending(a), orderDescending(b)] will result in [(a:1,b:3),(a:1,b:2),(a:2,b:3),(a:2,b:2)]. this Query object to allow the chaining of method calls.




orderDescending
public Query orderDescending()(Code)
adds a descending order criteria to this node of the query graph.

For semantics of multiple calls setting ordering criteria, see Query.orderAscending() . this Query object to allow the chaining of method calls.



sortBy
public Query sortBy(QueryComparator comparator)(Code)
Sort the resulting ObjectSet by the given comparator.
Parameters:
  comparator - The comparator to apply. this Query object to allow the chaining of method calls.



sortBy
public Query sortBy(Comparator comparator)(Code)
Sort the resulting ObjectSet by the given comparator.
Parameters:
  comparator - The comparator to apply. this Query object to allow the chaining of method calls.



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