Java Doc for Criteria.java in  » J2EE » Jaffa » org » jaffa » persistence » 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 » J2EE » Jaffa » org.jaffa.persistence 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jaffa.persistence.Criteria

All known Subclasses:   org.jaffa.persistence.AtomicCriteria,
Criteria
public class Criteria implements Serializable(Code)
This object is used by the persistence layer to query the underlying store.

Inner Class :public class OrderBy implements Serializable
Inner Class :public class CriteriaEntry implements Serializable
Inner Class :public class AtomicCriteriaEntry extends CriteriaEntry

Field Summary
final public static  intLOCKING_OPTIMISTIC
     Use this static to indicate optimistic locking on a query.
final public static  intLOCKING_PARANOID
     Use this static to indicate paranoid locking on a query.
final public static  intLOCKING_PESSIMISTIC
     Use this static to indicate pessimistic locking on a query.
final public static  intLOCKING_READ_ONLY
     Use this static to indicate that the persistent object cannot be modified.
final public static  intORDER_BY_ASC
    
final public static  intORDER_BY_DESC
    
final public static  intRELATIONAL_BEGINS_WITH
    
final public static  intRELATIONAL_ENDS_WITH
    
final public static  intRELATIONAL_EQUALS
    
final public static  intRELATIONAL_GREATER_THAN
    
final public static  intRELATIONAL_GREATER_THAN_EQUAL_TO
    
final public static  intRELATIONAL_IS_NOT_NULL
    
final public static  intRELATIONAL_IS_NULL
    
final public static  intRELATIONAL_LIKE
    
final public static  intRELATIONAL_NOT_EQUALS
    
final public static  intRELATIONAL_SMALLER_THAN
    
final public static  intRELATIONAL_SMALLER_THAN_EQUAL_TO
    


Method Summary
public  voidaddAggregate(Criteria criteria)
     Add another criteria object to indicate a join.
public  voidaddAtomic(AtomicCriteria atomicCriteria)
     Add an atomic criteria object.
public  voidaddCriteria(String name, Object value)
     Add a criteria entry.
public  voidaddCriteria(String name, int operator, Object value)
     Add a criteria entry.
public  voidaddCriteria(String name, int operator)
     Add a criteria entry.
public  voidaddDualCriteria(String name, String name2)
     Add a dual criteria entry.
public  voidaddDualCriteria(String name, int operator, String name2)
     Add a dual criteria entry.
public  voidaddInnerCriteria(String name, String name2)
     Add a criteria entry to signify a join condition between 2 persistent classes.
public  voidaddInnerCriteria(String name, int operator, String name2)
     Add a criteria entry to signify a join condition between 2 persistent classes.
public  voidaddOrAtomic(AtomicCriteria atomicCriteria)
     Add an OR-ed atomic criteria object.
public  voidaddOrCriteria(String name, Object value)
     Add an OR criteria entry.
public  voidaddOrCriteria(String name, int operator, Object value)
     Add an OR criteria entry.
public  voidaddOrCriteria(String name, int operator)
     Add an OR criteria entry.
public  voidaddOrderBy(String orderByElement, int ordering)
     Add an order by element, specifying the ordering type to be used.
public  voidclearInnerCriteria()
     Clears the inner criteria entries.
public  voidclearOrderBy()
     Clear the order by entries.
public  CollectiongetAggregates()
     Returns a collection of Criteria objects, indicating the joins to be performed.
public  CollectiongetCriteriaEntries()
     Returns the criteria entries.
public  CollectiongetInners()
     Returns a collection of criteria entries to signify the join conditions.
public  intgetLocking()
     Returns the locking strategy for a query.
public  CollectiongetOrderBys()
     Returns a collection of order by elements.
public  StringgetTable()
     Returns the name of the persistent class on which the query is to be performed.
public  UOWgetUow()
     Returns the UOW against which the query is to be performed.
public  voidsetLocking(int locking)
     Set the locking strategy for a query.
public  voidsetTable(String table)
     Set the persistent class name.
 voidsetUow(UOW uow)
     Sets the UOW on the criteria.

Field Detail
LOCKING_OPTIMISTIC
final public static int LOCKING_OPTIMISTIC(Code)
Use this static to indicate optimistic locking on a query. The record in the database will be locked, only when the persistent object is added to the database. This is the default locking strategy.



LOCKING_PARANOID
final public static int LOCKING_PARANOID(Code)
Use this static to indicate paranoid locking on a query. The record in the database will be locked, at the instant it is read.



LOCKING_PESSIMISTIC
final public static int LOCKING_PESSIMISTIC(Code)
Use this static to indicate pessimistic locking on a query. The record in the database will be locked, whenever a field is updated on the object.



LOCKING_READ_ONLY
final public static int LOCKING_READ_ONLY(Code)
Use this static to indicate that the persistent object cannot be modified.



ORDER_BY_ASC
final public static int ORDER_BY_ASC(Code)
The static to be used in OrderBy declarations to indicate an ascending sort



ORDER_BY_DESC
final public static int ORDER_BY_DESC(Code)
The static to be used in OrderBy declarations to indicate an descending sort



RELATIONAL_BEGINS_WITH
final public static int RELATIONAL_BEGINS_WITH(Code)
The static to be used in criteria declarations to create a construct of the type "like 'Abc%'"



RELATIONAL_ENDS_WITH
final public static int RELATIONAL_ENDS_WITH(Code)
The static to be used in criteria declarations to create a construct of the type "like '%Abc'"



RELATIONAL_EQUALS
final public static int RELATIONAL_EQUALS(Code)
The static to be used in criteria declarations to indicate an = operator



RELATIONAL_GREATER_THAN
final public static int RELATIONAL_GREATER_THAN(Code)
The static to be used in criteria declarations to indicate an > operator



RELATIONAL_GREATER_THAN_EQUAL_TO
final public static int RELATIONAL_GREATER_THAN_EQUAL_TO(Code)
The static to be used in criteria declarations to indicate an >= operator



RELATIONAL_IS_NOT_NULL
final public static int RELATIONAL_IS_NOT_NULL(Code)
The static to be used in criteria declarations to indicate an 'is not null' operator



RELATIONAL_IS_NULL
final public static int RELATIONAL_IS_NULL(Code)
The static to be used in criteria declarations to indicate an 'is null' operator



RELATIONAL_LIKE
final public static int RELATIONAL_LIKE(Code)
The static to be used in criteria declarations to create a construct of the type "like '%Abc%'"



RELATIONAL_NOT_EQUALS
final public static int RELATIONAL_NOT_EQUALS(Code)
The static to be used in criteria declarations to indicate a != operator



RELATIONAL_SMALLER_THAN
final public static int RELATIONAL_SMALLER_THAN(Code)
The static to be used in criteria declarations to indicate an < operator



RELATIONAL_SMALLER_THAN_EQUAL_TO
final public static int RELATIONAL_SMALLER_THAN_EQUAL_TO(Code)
The static to be used in criteria declarations to indicate an <= operator





Method Detail
addAggregate
public void addAggregate(Criteria criteria)(Code)
Add another criteria object to indicate a join.
Parameters:
  criteria - The criteria object.



addAtomic
public void addAtomic(AtomicCriteria atomicCriteria)(Code)
Add an atomic criteria object. This is used to create combinations of AND/OR clauses.
Parameters:
  atomicCriteria - The atomic criteria object



addCriteria
public void addCriteria(String name, Object value)(Code)
Add a criteria entry. The operator '=' is used.
Parameters:
  name - The name of the field.
Parameters:
  value - The value to be assigned to the field.



addCriteria
public void addCriteria(String name, int operator, Object value)(Code)
Add a criteria entry.
Parameters:
  name - The name of the field.
Parameters:
  operator - The operator to be used in the assignment.
Parameters:
  value - The value to be assigned to the field.



addCriteria
public void addCriteria(String name, int operator)(Code)
Add a criteria entry. This method is to be used for unary operator like 'null' and 'not null'.
Parameters:
  name - The name of the field.
Parameters:
  operator - The operator to be used in the assignment.



addDualCriteria
public void addDualCriteria(String name, String name2)(Code)
Add a dual criteria entry. The operator '=' is used.
Parameters:
  name - The name of the first field.
Parameters:
  name2 - The name of the second field.



addDualCriteria
public void addDualCriteria(String name, int operator, String name2)(Code)
Add a dual criteria entry.
Parameters:
  name - The name of the first field.
Parameters:
  operator - The operator to be used in the assignment.
Parameters:
  name2 - The name of the second field.



addInnerCriteria
public void addInnerCriteria(String name, String name2)(Code)
Add a criteria entry to signify a join condition between 2 persistent classes. The operator '=' is used.
Parameters:
  name - The field of the persistent class which corresponds to this Criteria object.
Parameters:
  name2 - The field of the persistent class, against which the join is to be made.



addInnerCriteria
public void addInnerCriteria(String name, int operator, String name2)(Code)
Add a criteria entry to signify a join condition between 2 persistent classes.
Parameters:
  name - The field of the persistent class which corresponds to this Criteria object.
Parameters:
  operator - The operator to be used in the assignment.
Parameters:
  name2 - The field of the persistent class, against which the join is to be made.



addOrAtomic
public void addOrAtomic(AtomicCriteria atomicCriteria)(Code)
Add an OR-ed atomic criteria object. This is used to create combinations of AND/OR clauses.
Parameters:
  atomicCriteria - The atomic criteria object



addOrCriteria
public void addOrCriteria(String name, Object value)(Code)
Add an OR criteria entry. The operator '=' is used.
Parameters:
  name - The name of the field.
Parameters:
  value - The value to be assigned to the field.



addOrCriteria
public void addOrCriteria(String name, int operator, Object value)(Code)
Add an OR criteria entry.
Parameters:
  name - The name of the field.
Parameters:
  operator - The operator to be used in the assignment.
Parameters:
  value - The value to be assigned to the field.



addOrCriteria
public void addOrCriteria(String name, int operator)(Code)
Add an OR criteria entry. This method is to be used for unary operator like 'null' and 'not null'.
Parameters:
  name - The name of the field.
Parameters:
  operator - The operator to be used in the assignment.



addOrderBy
public void addOrderBy(String orderByElement, int ordering)(Code)
Add an order by element, specifying the ordering type to be used.
Parameters:
  orderByElement - The name of the field to be used in the order by clause.
Parameters:
  ordering - indicates an ascending or a descending sort.



clearInnerCriteria
public void clearInnerCriteria()(Code)
Clears the inner criteria entries.



clearOrderBy
public void clearOrderBy()(Code)
Clear the order by entries.



getAggregates
public Collection getAggregates()(Code)
Returns a collection of Criteria objects, indicating the joins to be performed. A collection of Criteria objects.



getCriteriaEntries
public Collection getCriteriaEntries()(Code)
Returns the criteria entries. A collection of Criteria.CriteriaEntry objects.



getInners
public Collection getInners()(Code)
Returns a collection of criteria entries to signify the join conditions. A collection of Criteria.CriteriaEntry objects.



getLocking
public int getLocking()(Code)
Returns the locking strategy for a query. the locking strategy for a query.



getOrderBys
public Collection getOrderBys()(Code)
Returns a collection of order by elements. A collection of Criteria.OrderBy objects.



getTable
public String getTable()(Code)
Returns the name of the persistent class on which the query is to be performed. the name of the persistent class.



getUow
public UOW getUow()(Code)
Returns the UOW against which the query is to be performed. the UOW against which the query is to be performed.



setLocking
public void setLocking(int locking)(Code)
Set the locking strategy for a query.
Parameters:
  locking - the locking strategy.



setTable
public void setTable(String table)(Code)
Set the persistent class name. This will determine the database-table on which the query is to be performed.
Parameters:
  table - The name of the persistent class.



setUow
void setUow(UOW uow)(Code)
Sets the UOW on the criteria. This is mainly used by the DataSource to assign the UOW on the persistent objects.
Parameters:
  uow - The UOW.



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.