/** * Creates an equality restriction. * * @param value The value to check against * * @return The equality restriction. * * @see Restrictions#eq(String, Object) */ public SimpleExpression eq(Object value) { return Restrictions.eq( getPropertyName(), value ); }
/** * Creates a LIKE restriction for this property * * @param value The value to like compare with * * @return The LIKE restriction * * @see Restrictions#like(String, Object) */ public SimpleExpression like(Object value) { return Restrictions.like( getPropertyName(), value ); }
/** * Creates a non-equality restriction. * * @param value The value to check against * * @return The non-equality restriction. * * @see Restrictions#ne(String, Object) */ public SimpleExpression ne(Object value) { return Restrictions.ne( getPropertyName(), value ); }
/** * Creates a property min projection * * @return The projection * * @see Projections#min */ public AggregateProjection min() { return Projections.min( getPropertyName() ); }
/** * Creates an IN restriction for this property based on the given list of literals * * @param values The literal values * * @return The IN restriction * * @see Restrictions#in(String, Object[]) */ public Criterion in(Object... values) { return Restrictions.in( getPropertyName(), values ); }
/** * Create a less-than-or-equal-to restriction based on this property * * @param value The value to check against * * @return The less-than-or-equal-to restriction * * @see Restrictions#le(String, Object) */ public SimpleExpression le(Object value) { return Restrictions.le( getPropertyName(), value ); }
/** * Creates a restriction to check that a collection is not empty * * @return The restriction * * @see Restrictions#isNotEmpty(String) */ public Criterion isNotEmpty() { return Restrictions.isNotEmpty( getPropertyName() ); }
/** * Creates a property max projection * * @return The projection * * @see Projections#max */ public AggregateProjection max() { return Projections.max( getPropertyName() ); }
/** * Creates a descending ordering for this property * * @return The order */ public Order desc() { return Order.desc( getPropertyName() ); }
/** * Creates a sub-query greater-than expression for this property * * @param subselect The sub-query * * @return The expression * * @see Subqueries#propertyGt(String, DetachedCriteria) */ public Criterion gt(DetachedCriteria subselect) { return Subqueries.propertyGt( getPropertyName(), subselect ); }
/** * Creates a sub-query IN expression for this property. I.e., {@code [prop] IN [subquery]} * * @param subselect The sub-query * * @return The expression * * @see Subqueries#propertyIn(String, DetachedCriteria) */ public Criterion in(DetachedCriteria subselect) { return Subqueries.propertyIn( getPropertyName(), subselect ); }
/** * Creates an IN restriction for this property based on the given list of literals * * @param values The literal values * * @return The IN restriction * * @see Restrictions#in(String, Collection) */ public Criterion in(Collection values) { return Restrictions.in( getPropertyName(), values ); }
/** * Create a greater-than restriction based on this property * * @param value The value to check against * * @return The greater-than restriction * * @see Restrictions#gt(String, Object) */ public SimpleExpression gt(Object value) { return Restrictions.gt( getPropertyName(), value ); }
/** * Create a greater-than-or-equal-to restriction based on this property * * @param value The value to check against * * @return The greater-than-or-equal-to restriction * * @see Restrictions#ge(String, Object) */ public SimpleExpression ge(Object value) { return Restrictions.ge( getPropertyName(), value ); }
/** * Creates a projection for this property as a group expression * * @return The group projection * * @see Projections#groupProperty */ public PropertyProjection group() { return Projections.groupProperty( getPropertyName() ); }
/** * Creates a sub-query greater-than-or-equal-to expression for this property * * @param subselect The sub-query * * @return The expression * * @see Subqueries#propertyGe(String, DetachedCriteria) */ public Criterion ge(DetachedCriteria subselect) { return Subqueries.propertyGe( getPropertyName(), subselect ); }
/** * Create a less-than restriction based on this property * * @param value The value to check against * * @return The less-than restriction * * @see Restrictions#lt(String, Object) */ public SimpleExpression lt(Object value) { return Restrictions.lt( getPropertyName(), value ); }
/** * Get a component attribute of this property. * * @param propertyName The sub property name * * @return The property */ public Property getProperty(String propertyName) { return forName( getPropertyName() + '.' + propertyName ); }
/** * Creates a sub-query equality expression for this property * * @param subselect The sub-query * * @return The expression * * @see Subqueries#propertyEq(String, DetachedCriteria) */ public Criterion eq(DetachedCriteria subselect) { return Subqueries.propertyEq( getPropertyName(), subselect ); }
/** * Creates a sub-query less-than-or-equal-to expression for this property * * @param subselect The sub-query * * @return The expression * * @see Subqueries#propertyLe(String, DetachedCriteria) */ public Criterion le(DetachedCriteria subselect) { return Subqueries.propertyLe( getPropertyName(), subselect ); }