| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.persistence.Criteria
This object is used by the persistence layer to query the underlying store.
| Nested Class Summary | |
|  class | Criteria.AtomicCriteriaEntryThe class is used by the Criteria to add an AtomicCriteria object to its collection of criteria entries. | 
|  class | Criteria.CriteriaEntryThis class is used by the Criteria for each criteria entry. | 
|  class | Criteria.OrderByThis class is used by the Criteria for each order by element. | 
| Field Summary | |
| static int | LOCKING_OPTIMISTICUse this static to indicate optimistic locking on a query. | 
| static int | LOCKING_PARANOIDUse this static to indicate paranoid locking on a query. | 
| static int | LOCKING_PESSIMISTICUse this static to indicate pessimistic locking on a query. | 
| static int | LOCKING_READ_ONLYUse this static to indicate that the persistent object cannot be modified. | 
| static int | ORDER_BY_ASCThe static to be used in OrderBy declarations to indicate an ascending sort | 
| static int | ORDER_BY_DESCThe static to be used in OrderBy declarations to indicate an descending sort | 
| static int | RELATIONAL_BEGINS_WITHThe static to be used in criteria declarations to create a construct of the type "like 'Abc%'" | 
| static int | RELATIONAL_ENDS_WITHThe static to be used in criteria declarations to create a construct of the type "like '%Abc'" | 
| static int | RELATIONAL_EQUALSThe static to be used in criteria declarations to indicate an = operator | 
| static int | RELATIONAL_GREATER_THANThe static to be used in criteria declarations to indicate an > operator | 
| static int | RELATIONAL_GREATER_THAN_EQUAL_TOThe static to be used in criteria declarations to indicate an >= operator | 
| static int | RELATIONAL_IS_NOT_NULLThe static to be used in criteria declarations to indicate an 'is not null' operator | 
| static int | RELATIONAL_IS_NULLThe static to be used in criteria declarations to indicate an 'is null' operator | 
| static int | RELATIONAL_LIKEThe static to be used in criteria declarations to create a construct of the type "like '%Abc%'" | 
| static int | RELATIONAL_NOT_EQUALSThe static to be used in criteria declarations to indicate a ! | 
| static int | RELATIONAL_SMALLER_THANThe static to be used in criteria declarations to indicate an < operator | 
| static int | RELATIONAL_SMALLER_THAN_EQUAL_TOThe static to be used in criteria declarations to indicate an <= operator | 
| Constructor Summary | |
| Criteria() | |
| Method Summary | |
|  void | addAggregate(Criteria criteria)Add another criteria object to indicate a join. | 
|  void | addAtomic(AtomicCriteria atomicCriteria)Add an atomic criteria object. | 
|  void | addCriteria(String name,
                       int operator)Add a criteria entry. | 
|  void | addCriteria(String name,
                       int operator,
                       Object value)Add a criteria entry. | 
|  void | addCriteria(String name,
                       Object value)Add a criteria entry. | 
|  void | addDualCriteria(String name,
                               int operator,
                               String name2)Add a dual criteria entry. | 
|  void | addDualCriteria(String name,
                               String name2)Add a dual criteria entry. | 
|  void | addInnerCriteria(String name,
                                 int operator,
                                 String name2)Add a criteria entry to signify a join condition between 2 persistent classes. | 
|  void | addInnerCriteria(String name,
                                 String name2)Add a criteria entry to signify a join condition between 2 persistent classes. | 
|  void | addOrAtomic(AtomicCriteria atomicCriteria)Add an OR-ed atomic criteria object. | 
|  void | addOrCriteria(String name,
                           int operator)Add an OR criteria entry. | 
|  void | addOrCriteria(String name,
                           int operator,
                           Object value)Add an OR criteria entry. | 
|  void | addOrCriteria(String name,
                           Object value)Add an OR criteria entry. | 
|  void | addOrderBy(String orderByElement,
                     int ordering)Add an order by element, specifying the ordering type to be used. | 
|  void | clearInnerCriteria()Clears the inner criteria entries. | 
|  void | clearOrderBy()Clear the order by entries. | 
|  Collection | getAggregates()Returns a collection of Criteria objects, indicating the joins to be performed. | 
|  Collection | getCriteriaEntries()Returns the criteria entries. | 
|  Collection | getInners()Returns a collection of criteria entries to signify the join conditions. | 
|  int | getLocking()Returns the locking strategy for a query. | 
|  Collection | getOrderBys()Returns a collection of order by elements. | 
|  String | getTable()Returns the name of the persistent class on which the query is to be performed. | 
|  UOW | getUow()Returns the UOW against which the query is to be performed. | 
|  void | setLocking(int locking)Set the locking strategy for a query. | 
|  void | setTable(String table)Set the persistent class name. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final int ORDER_BY_ASC
public static final int ORDER_BY_DESC
public static final int RELATIONAL_EQUALS
public static final int RELATIONAL_NOT_EQUALS
public static final int RELATIONAL_GREATER_THAN
public static final int RELATIONAL_SMALLER_THAN
public static final int RELATIONAL_GREATER_THAN_EQUAL_TO
public static final int RELATIONAL_SMALLER_THAN_EQUAL_TO
public static final int RELATIONAL_IS_NOT_NULL
public static final int RELATIONAL_IS_NULL
public static final int RELATIONAL_BEGINS_WITH
public static final int RELATIONAL_ENDS_WITH
public static final int RELATIONAL_LIKE
public static final int LOCKING_OPTIMISTIC
public static final int LOCKING_PESSIMISTIC
public static final int LOCKING_PARANOID
public static final int LOCKING_READ_ONLY
| Constructor Detail | 
public Criteria()
| Method Detail | 
public UOW getUow()
public String getTable()
public void setTable(String table)
table - The name of the persistent class.public int getLocking()
public void setLocking(int locking)
locking - the locking strategy.
public void addCriteria(String name,
                        Object value)
name - The name of the field.value - The value to be assigned to the field.
public void addCriteria(String name,
                        int operator,
                        Object value)
name - The name of the field.operator - The operator to be used in the assignment.value - The value to be assigned to the field.
public void addCriteria(String name,
                        int operator)
name - The name of the field.operator - The operator to be used in the assignment.
public void addOrCriteria(String name,
                          Object value)
name - The name of the field.value - The value to be assigned to the field.
public void addOrCriteria(String name,
                          int operator,
                          Object value)
name - The name of the field.operator - The operator to be used in the assignment.value - The value to be assigned to the field.
public void addOrCriteria(String name,
                          int operator)
name - The name of the field.operator - The operator to be used in the assignment.
public void addDualCriteria(String name,
                            String name2)
name - The name of the first field.name2 - The name of the second field.
public void addDualCriteria(String name,
                            int operator,
                            String name2)
name - The name of the first field.operator - The operator to be used in the assignment.name2 - The name of the second field.
public void addInnerCriteria(String name,
                             String name2)
name - The field of the persistent class which corresponds to this Criteria object.name2 - The field of the persistent class, against which the join is to be made.
public void addInnerCriteria(String name,
                             int operator,
                             String name2)
name - The field of the persistent class which corresponds to this Criteria object.operator - The operator to be used in the assignment.name2 - The field of the persistent class, against which the join is to be made.public void clearInnerCriteria()
public void addAggregate(Criteria criteria)
criteria - The criteria object.public void addAtomic(AtomicCriteria atomicCriteria)
atomicCriteria - The atomic criteria objectpublic void addOrAtomic(AtomicCriteria atomicCriteria)
atomicCriteria - The atomic criteria object
public void addOrderBy(String orderByElement,
                       int ordering)
orderByElement - The name of the field to be used in the order by clause.ordering - indicates an ascending or a descending sort.public void clearOrderBy()
public Collection getCriteriaEntries()
public Collection getAggregates()
public Collection getInners()
public Collection getOrderBys()
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||