Methods Summary |
---|
public static Criterion | allEq(java.util.Map propertyNameValues)Apply an "equals" constraint to each property in the
key set of a Map
Conjunction conj = conjunction();
Iterator iter = propertyNameValues.entrySet().iterator();
while ( iter.hasNext() ) {
Map.Entry me = (Map.Entry) iter.next();
conj.add( eq( (String) me.getKey(), me.getValue() ) );
}
return conj;
|
public static LogicalExpression | and(Criterion lhs, Criterion rhs)Return the conjuction of two expressions
return new LogicalExpression(lhs, rhs, "and");
|
public static Criterion | between(java.lang.String propertyName, java.lang.Object lo, java.lang.Object hi)Apply a "between" constraint to the named property
return new BetweenExpression(propertyName, lo, hi);
|
public static Conjunction | conjunction()Group expressions together in a single conjunction (A and B and C...)
return new Conjunction();
|
public static Disjunction | disjunction()Group expressions together in a single disjunction (A or B or C...)
return new Disjunction();
|
public static SimpleExpression | eq(java.lang.String propertyName, java.lang.Object value)Apply an "equal" constraint to the named property
return new SimpleExpression(propertyName, value, "=");
|
public static PropertyExpression | eqProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Apply an "equal" constraint to two properties
return new PropertyExpression(propertyName, otherPropertyName, "=");
|
public static SimpleExpression | ge(java.lang.String propertyName, java.lang.Object value)Apply a "greater than or equal" constraint to the named property
return new SimpleExpression(propertyName, value, ">=");
|
public static PropertyExpression | geProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Apply a "greater than or equal" constraint to two properties
return new PropertyExpression(propertyName, otherPropertyName, ">=");
|
public static SimpleExpression | gt(java.lang.String propertyName, java.lang.Object value)Apply a "greater than" constraint to the named property
return new SimpleExpression(propertyName, value, ">");
|
public static PropertyExpression | gtProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Apply a "greater than" constraint to two properties
return new PropertyExpression(propertyName, otherPropertyName, ">");
|
public static Criterion | idEq(java.lang.Object value)Apply an "equal" constraint to the identifier property
return new IdentifierEqExpression(value);
|
public static Criterion | ilike(java.lang.String propertyName, java.lang.String value, MatchMode matchMode)A case-insensitive "like", similar to Postgres ilike
operator
return new IlikeExpression(propertyName, value, matchMode);
|
public static Criterion | ilike(java.lang.String propertyName, java.lang.Object value)A case-insensitive "like", similar to Postgres ilike
operator
return new IlikeExpression(propertyName, value);
|
public static Criterion | in(java.lang.String propertyName, java.lang.Object[] values)Apply an "in" constraint to the named property
return new InExpression(propertyName, values);
|
public static Criterion | in(java.lang.String propertyName, java.util.Collection values)Apply an "in" constraint to the named property
return new InExpression( propertyName, values.toArray() );
|
public static Criterion | isEmpty(java.lang.String propertyName)Constrain a collection valued property to be empty
return new EmptyExpression(propertyName);
|
public static Criterion | isNotEmpty(java.lang.String propertyName)Constrain a collection valued property to be non-empty
return new NotEmptyExpression(propertyName);
|
public static Criterion | isNotNull(java.lang.String propertyName)Apply an "is not null" constraint to the named property
return new NotNullExpression(propertyName);
|
public static Criterion | isNull(java.lang.String propertyName)Apply an "is null" constraint to the named property
return new NullExpression(propertyName);
|
public static SimpleExpression | le(java.lang.String propertyName, java.lang.Object value)Apply a "less than or equal" constraint to the named property
return new SimpleExpression(propertyName, value, "<=");
|
public static PropertyExpression | leProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Apply a "less than or equal" constraint to two properties
return new PropertyExpression(propertyName, otherPropertyName, "<=");
|
public static SimpleExpression | like(java.lang.String propertyName, java.lang.Object value)Apply a "like" constraint to the named property
return new SimpleExpression(propertyName, value, " like ");
|
public static SimpleExpression | like(java.lang.String propertyName, java.lang.String value, MatchMode matchMode)Apply a "like" constraint to the named property
return new SimpleExpression(propertyName, matchMode.toMatchString(value), " like " );
|
public static SimpleExpression | lt(java.lang.String propertyName, java.lang.Object value)Apply a "less than" constraint to the named property
return new SimpleExpression(propertyName, value, "<");
|
public static PropertyExpression | ltProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Apply a "less than" constraint to two properties
return new PropertyExpression(propertyName, otherPropertyName, "<");
|
public static NaturalIdentifier | naturalId()
return new NaturalIdentifier();
|
public static SimpleExpression | ne(java.lang.String propertyName, java.lang.Object value)Apply a "not equal" constraint to the named property
return new SimpleExpression(propertyName, value, "<>");
|
public static PropertyExpression | neProperty(java.lang.String propertyName, java.lang.String otherPropertyName)Apply a "not equal" constraint to two properties
return new PropertyExpression(propertyName, otherPropertyName, "<>");
|
public static Criterion | not(Criterion expression)Return the negation of an expression
return new NotExpression(expression);
|
public static LogicalExpression | or(Criterion lhs, Criterion rhs)Return the disjuction of two expressions
return new LogicalExpression(lhs, rhs, "or");
|
public static Criterion | sizeEq(java.lang.String propertyName, int size)Constrain a collection valued property by size
return new SizeExpression(propertyName, size, "=");
|
public static Criterion | sizeGe(java.lang.String propertyName, int size)Constrain a collection valued property by size
return new SizeExpression(propertyName, size, "<=");
|
public static Criterion | sizeGt(java.lang.String propertyName, int size)Constrain a collection valued property by size
return new SizeExpression(propertyName, size, "<");
|
public static Criterion | sizeLe(java.lang.String propertyName, int size)Constrain a collection valued property by size
return new SizeExpression(propertyName, size, ">=");
|
public static Criterion | sizeLt(java.lang.String propertyName, int size)Constrain a collection valued property by size
return new SizeExpression(propertyName, size, ">");
|
public static Criterion | sizeNe(java.lang.String propertyName, int size)Constrain a collection valued property by size
return new SizeExpression(propertyName, size, "<>");
|
public static Criterion | sqlRestriction(java.lang.String sql, java.lang.Object[] values, org.hibernate.type.Type[] types)Apply a constraint expressed in SQL, with the given JDBC
parameters. Any occurrences of {alias} will be
replaced by the table alias.
return new SQLCriterion(sql, values, types);
|
public static Criterion | sqlRestriction(java.lang.String sql, java.lang.Object value, org.hibernate.type.Type type)Apply a constraint expressed in SQL, with the given JDBC
parameter. Any occurrences of {alias} will be replaced
by the table alias.
return new SQLCriterion(sql, new Object[] { value }, new Type[] { type } );
|
public static Criterion | sqlRestriction(java.lang.String sql)Apply a constraint expressed in SQL. Any occurrences of {alias}
will be replaced by the table alias.
return new SQLCriterion(sql, ArrayHelper.EMPTY_OBJECT_ARRAY, ArrayHelper.EMPTY_TYPE_ARRAY);
|