| 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 CriteriaEntry implements Serializable | |
Inner Class :public class AtomicCriteriaEntry extends CriteriaEntry | |
Method Summary | |
public void | addAggregate(Criteria criteria) Add another criteria object to indicate a join. | public void | addAtomic(AtomicCriteria atomicCriteria) Add an atomic criteria object. | public void | addCriteria(String name, Object value) Add a criteria entry. | public void | addCriteria(String name, int operator, Object value) Add a criteria entry. | public void | addCriteria(String name, int operator) Add a criteria entry. | public void | addDualCriteria(String name, String name2) Add a dual criteria entry. | public void | addDualCriteria(String name, int operator, String name2) Add a dual criteria entry. | public void | addInnerCriteria(String name, String name2) Add a criteria entry to signify a join condition between 2 persistent classes. | public void | addInnerCriteria(String name, int operator, String name2) Add a criteria entry to signify a join condition between 2 persistent classes. | public void | addOrAtomic(AtomicCriteria atomicCriteria) Add an OR-ed atomic criteria object. | public void | addOrCriteria(String name, Object value) Add an OR criteria entry. | public void | addOrCriteria(String name, int operator, Object value) Add an OR criteria entry. | public void | addOrCriteria(String name, int operator) Add an OR criteria entry. | public void | addOrderBy(String orderByElement, int ordering) Add an order by element, specifying the ordering type to be used. | public void | clearInnerCriteria() Clears the inner criteria entries. | public void | clearOrderBy() Clear the order by entries. | public Collection | getAggregates() Returns a collection of Criteria objects, indicating the joins to be performed. | public Collection | getCriteriaEntries() Returns the criteria entries. | public Collection | getInners() Returns a collection of criteria entries to signify the join conditions. | public int | getLocking() Returns the locking strategy for a query. | public Collection | getOrderBys() Returns a collection of order by elements. | public String | getTable() Returns the name of the persistent class on which the query is to be performed. | public UOW | getUow() Returns the UOW against which the query is to be performed. | public void | setLocking(int locking) Set the locking strategy for a query. | public void | setTable(String table) Set the persistent class name. | void | setUow(UOW uow) Sets the UOW on the criteria. |
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
|
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. |
|
|