Save This Page
Home » hibernate-distribution-3.3.1.GA-dist » org.hibernate » criterion » [javadoc | source]
org.hibernate.criterion
public class: Restrictions [javadoc | source]
java.lang.Object
   org.hibernate.criterion.Restrictions

Direct Known Subclasses:
    Expression

The criterion package may be used by applications as a framework for building new kinds of Criterion. However, it is intended that most applications will simply use the built-in criterion types via the static factory methods of this class.
Constructor:
 Restrictions() 
Method from org.hibernate.criterion.Restrictions Summary:
allEq,   and,   between,   conjunction,   disjunction,   eq,   eqProperty,   ge,   geProperty,   gt,   gtProperty,   idEq,   ilike,   ilike,   in,   in,   isEmpty,   isNotEmpty,   isNotNull,   isNull,   le,   leProperty,   like,   like,   lt,   ltProperty,   naturalId,   ne,   neProperty,   not,   or,   sizeEq,   sizeGe,   sizeGt,   sizeLe,   sizeLt,   sizeNe,   sqlRestriction,   sqlRestriction,   sqlRestriction
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.criterion.Restrictions Detail:
 public static Criterion allEq(Map propertyNameValues) 
    Apply an "equals" constraint to each property in the key set of a Map
 public static LogicalExpression and(Criterion lhs,
    Criterion rhs) 
    Return the conjuction of two expressions
 public static Criterion between(String propertyName,
    Object lo,
    Object hi) 
    Apply a "between" constraint to the named property
 public static Conjunction conjunction() 
    Group expressions together in a single conjunction (A and B and C...)
 public static Disjunction disjunction() 
    Group expressions together in a single disjunction (A or B or C...)
 public static SimpleExpression eq(String propertyName,
    Object value) 
    Apply an "equal" constraint to the named property
 public static PropertyExpression eqProperty(String propertyName,
    String otherPropertyName) 
    Apply an "equal" constraint to two properties
 public static SimpleExpression ge(String propertyName,
    Object value) 
    Apply a "greater than or equal" constraint to the named property
 public static PropertyExpression geProperty(String propertyName,
    String otherPropertyName) 
    Apply a "greater than or equal" constraint to two properties
 public static SimpleExpression gt(String propertyName,
    Object value) 
    Apply a "greater than" constraint to the named property
 public static PropertyExpression gtProperty(String propertyName,
    String otherPropertyName) 
    Apply a "greater than" constraint to two properties
 public static Criterion idEq(Object value) 
    Apply an "equal" constraint to the identifier property
 public static Criterion ilike(String propertyName,
    Object value) 
    A case-insensitive "like", similar to Postgres ilike operator
 public static Criterion ilike(String propertyName,
    String value,
    MatchMode matchMode) 
    A case-insensitive "like", similar to Postgres ilike operator
 public static Criterion in(String propertyName,
    Object[] values) 
    Apply an "in" constraint to the named property
 public static Criterion in(String propertyName,
    Collection values) 
    Apply an "in" constraint to the named property
 public static Criterion isEmpty(String propertyName) 
    Constrain a collection valued property to be empty
 public static Criterion isNotEmpty(String propertyName) 
    Constrain a collection valued property to be non-empty
 public static Criterion isNotNull(String propertyName) 
    Apply an "is not null" constraint to the named property
 public static Criterion isNull(String propertyName) 
    Apply an "is null" constraint to the named property
 public static SimpleExpression le(String propertyName,
    Object value) 
    Apply a "less than or equal" constraint to the named property
 public static PropertyExpression leProperty(String propertyName,
    String otherPropertyName) 
    Apply a "less than or equal" constraint to two properties
 public static SimpleExpression like(String propertyName,
    Object value) 
    Apply a "like" constraint to the named property
 public static SimpleExpression like(String propertyName,
    String value,
    MatchMode matchMode) 
    Apply a "like" constraint to the named property
 public static SimpleExpression lt(String propertyName,
    Object value) 
    Apply a "less than" constraint to the named property
 public static PropertyExpression ltProperty(String propertyName,
    String otherPropertyName) 
    Apply a "less than" constraint to two properties
 public static NaturalIdentifier naturalId() 
 public static SimpleExpression ne(String propertyName,
    Object value) 
    Apply a "not equal" constraint to the named property
 public static PropertyExpression neProperty(String propertyName,
    String otherPropertyName) 
    Apply a "not equal" constraint to two properties
 public static Criterion not(Criterion expression) 
    Return the negation of an expression
 public static LogicalExpression or(Criterion lhs,
    Criterion rhs) 
    Return the disjuction of two expressions
 public static Criterion sizeEq(String propertyName,
    int size) 
    Constrain a collection valued property by size
 public static Criterion sizeGe(String propertyName,
    int size) 
    Constrain a collection valued property by size
 public static Criterion sizeGt(String propertyName,
    int size) 
    Constrain a collection valued property by size
 public static Criterion sizeLe(String propertyName,
    int size) 
    Constrain a collection valued property by size
 public static Criterion sizeLt(String propertyName,
    int size) 
    Constrain a collection valued property by size
 public static Criterion sizeNe(String propertyName,
    int size) 
    Constrain a collection valued property by size
 public static Criterion sqlRestriction(String sql) 
    Apply a constraint expressed in SQL. Any occurrences of {alias} will be replaced by the table alias.
 public static Criterion sqlRestriction(String sql,
    Object[] values,
    Type[] types) 
    Apply a constraint expressed in SQL, with the given JDBC parameters. Any occurrences of {alias} will be replaced by the table alias.
 public static Criterion sqlRestriction(String sql,
    Object value,
    Type type) 
    Apply a constraint expressed in SQL, with the given JDBC parameter. Any occurrences of {alias} will be replaced by the table alias.