类 Property
- java.lang.Object
-
- org.hibernate.criterion.SimpleProjection
-
- org.hibernate.criterion.PropertyProjection
-
- org.hibernate.criterion.Property
-
- 所有已实现的接口:
Serializable,EnhancedProjection,Projection
public class Property extends PropertyProjection
A factory for property-specific criterion and projection instances- 作者:
- Gavin King, Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 Orderasc()Creates an ascending ordering for this propertyAggregateProjectionavg()Creates a property avg projectionCriterionbetween(Object min, Object max)Creates a BETWEEN restriction for this property between the given min and maxCountProjectioncount()Creates a property count projectionOrderdesc()Creates a descending ordering for this propertySimpleExpressioneq(Object value)Creates an equality restriction.Criterioneq(DetachedCriteria subselect)Creates a sub-query equality expression for this propertyCriterioneqAll(DetachedCriteria subselect)Creates a equals-all sub-query expression for this property.CriterioneqOrIsNull(Object value)Creates an equality restriction capable of also rendering as IS NULL if the given value isnullPropertyExpressioneqProperty(String other)Creates an equality restriction between 2 propertiesPropertyExpressioneqProperty(Property other)Creates an equality restriction between 2 propertiesstatic PropertyforName(String propertyName)Factory for Property instances.SimpleExpressionge(Object value)Create a greater-than-or-equal-to restriction based on this propertyCriterionge(DetachedCriteria subselect)Creates a sub-query greater-than-or-equal-to expression for this propertyCriteriongeAll(DetachedCriteria subselect)Creates a greater-than-or-equal-to-all sub-query expression for this property.PropertyExpressiongeProperty(String other)Creates a greater-than-or-equal-to restriction between 2 propertiesPropertyExpressiongeProperty(Property other)Creates a greater-than-or-equal-to restriction between 2 propertiesCriteriongeSome(DetachedCriteria subselect)Creates a greater-than-or-equal-to-some sub-query expression for this property.PropertygetProperty(String propertyName)Get a component attribute of this property.PropertyProjectiongroup()Creates a projection for this property as a group expressionSimpleExpressiongt(Object value)Create a greater-than restriction based on this propertyCriteriongt(DetachedCriteria subselect)Creates a sub-query greater-than expression for this propertyCriteriongtAll(DetachedCriteria subselect)Creates a greater-than-all sub-query expression for this property.PropertyExpressiongtProperty(String other)Creates a greater-than restriction between 2 propertiesPropertyExpressiongtProperty(Property other)Creates a greater-than restriction between 2 propertiesCriteriongtSome(DetachedCriteria subselect)Creates a greater-than-some sub-query expression for this property.Criterionin(Object... values)Creates an IN restriction for this property based on the given list of literalsCriterionin(Collection values)Creates an IN restriction for this property based on the given list of literalsCriterionin(DetachedCriteria subselect)Creates a sub-query IN expression for this property.CriterionisEmpty()Creates a restriction to check that a collection is emptyCriterionisNotEmpty()Creates a restriction to check that a collection is not emptyCriterionisNotNull()Creates a NOT NULL restrictionCriterionisNull()Creates a NULL restrictionSimpleExpressionle(Object value)Create a less-than-or-equal-to restriction based on this propertyCriterionle(DetachedCriteria subselect)Creates a sub-query less-than-or-equal-to expression for this propertyCriterionleAll(DetachedCriteria subselect)Creates a less-than-or-equal-to-all sub-query expression for this property.PropertyExpressionleProperty(String other)Creates a less-than-or-equal-to restriction between 2 propertiesPropertyExpressionleProperty(Property other)Creates a less-than-or-equal-to restriction between 2 propertiesCriterionleSome(DetachedCriteria subselect)Creates a less-than-or-equal-to-some sub-query expression for this property.SimpleExpressionlike(Object value)Creates a LIKE restriction for this propertySimpleExpressionlike(String value, MatchMode matchMode)Creates a LIKE restriction for this propertySimpleExpressionlt(Object value)Create a less-than restriction based on this propertyCriterionlt(DetachedCriteria subselect)Creates a sub-query less-than expression for this propertyCriterionltAll(DetachedCriteria subselect)Creates a less-than-all sub-query expression for this property.PropertyExpressionltProperty(String other)Creates a less-than restriction between 2 propertiesPropertyExpressionltProperty(Property other)Creates a less-than restriction between 2 propertiesCriterionltSome(DetachedCriteria subselect)Creates a less-than-some sub-query expression for this property.AggregateProjectionmax()Creates a property max projectionAggregateProjectionmin()Creates a property min projectionSimpleExpressionne(Object value)Creates a non-equality restriction.Criterionne(DetachedCriteria subselect)Creates a sub-query non-equality expression for this propertyCriterionneOrIsNotNull(Object value)Creates a non-equality restriction capable of also rendering as IS NOT NULL if the given value isnullPropertyExpressionneProperty(String other)Creates a non-equality restriction between 2 propertiesPropertyExpressionneProperty(Property other)Creates a non-equality restriction between 2 propertiesCriterionnotIn(DetachedCriteria subselect)Creates a sub-query NOT IN expression for this property.-
从类继承的方法 org.hibernate.criterion.PropertyProjection
getPropertyName, getTypes, isGrouped, toGroupSqlString, toSqlString, toString
-
从类继承的方法 org.hibernate.criterion.SimpleProjection
as, getAliases, getColumnAliases, getColumnAliases, getColumnAliases, getColumnAliases, getColumnCount, getTypes
-
-
-
-
构造器详细资料
-
Property
protected Property(String propertyName)
Constructs a Property. non-private to allow subclassing.- 参数:
propertyName- The property name.
-
-
方法详细资料
-
forName
public static Property forName(String propertyName)
Factory for Property instances.- 参数:
propertyName- The name of the property.- 返回:
- The Property instance
-
between
public Criterion between(Object min, Object max)
Creates a BETWEEN restriction for this property between the given min and max- 参数:
min- The minimummax- The maximum- 返回:
- The BETWEEN restriction
- 另请参阅:
Restrictions.between(String, Object, Object)
-
in
public Criterion in(Collection values)
Creates an IN restriction for this property based on the given list of literals- 参数:
values- The literal values- 返回:
- The IN restriction
- 另请参阅:
Restrictions.in(String, Collection)
-
in
public Criterion in(Object... values)
Creates an IN restriction for this property based on the given list of literals- 参数:
values- The literal values- 返回:
- The IN restriction
- 另请参阅:
Restrictions.in(String, Object[])
-
like
public SimpleExpression like(Object value)
Creates a LIKE restriction for this property- 参数:
value- The value to like compare with- 返回:
- The LIKE restriction
- 另请参阅:
Restrictions.like(String, Object)
-
like
public SimpleExpression like(String value, MatchMode matchMode)
Creates a LIKE restriction for this property- 参数:
value- The value to like compare withmatchMode- The match mode to apply to the LIKE- 返回:
- The LIKE restriction
- 另请参阅:
Restrictions.like(String, String, MatchMode)
-
eq
public SimpleExpression eq(Object value)
Creates an equality restriction.- 参数:
value- The value to check against- 返回:
- The equality restriction.
- 另请参阅:
Restrictions.eq(String, Object)
-
eqOrIsNull
public Criterion eqOrIsNull(Object value)
Creates an equality restriction capable of also rendering as IS NULL if the given value isnull- 参数:
value- The value to check against- 返回:
- The equality restriction.
- 另请参阅:
Restrictions.eqOrIsNull(String, Object),eq(java.lang.Object),isNull()
-
ne
public SimpleExpression ne(Object value)
Creates a non-equality restriction.- 参数:
value- The value to check against- 返回:
- The non-equality restriction.
- 另请参阅:
Restrictions.ne(String, Object)
-
neOrIsNotNull
public Criterion neOrIsNotNull(Object value)
Creates a non-equality restriction capable of also rendering as IS NOT NULL if the given value isnull- 参数:
value- The value to check against- 返回:
- The non-equality restriction.
- 另请参阅:
Restrictions.neOrIsNotNull(String, Object),ne(java.lang.Object),isNotNull()
-
gt
public SimpleExpression gt(Object value)
Create a greater-than restriction based on this property- 参数:
value- The value to check against- 返回:
- The greater-than restriction
- 另请参阅:
Restrictions.gt(String, Object)
-
lt
public SimpleExpression lt(Object value)
Create a less-than restriction based on this property- 参数:
value- The value to check against- 返回:
- The less-than restriction
- 另请参阅:
Restrictions.lt(String, Object)
-
le
public SimpleExpression le(Object value)
Create a less-than-or-equal-to restriction based on this property- 参数:
value- The value to check against- 返回:
- The less-than-or-equal-to restriction
- 另请参阅:
Restrictions.le(String, Object)
-
ge
public SimpleExpression ge(Object value)
Create a greater-than-or-equal-to restriction based on this property- 参数:
value- The value to check against- 返回:
- The greater-than-or-equal-to restriction
- 另请参阅:
Restrictions.ge(String, Object)
-
eqProperty
public PropertyExpression eqProperty(Property other)
Creates an equality restriction between 2 properties- 参数:
other- The other property to compare against- 返回:
- The restriction
- 另请参阅:
Restrictions.eqProperty(String, String)
-
eqProperty
public PropertyExpression eqProperty(String other)
Creates an equality restriction between 2 properties- 参数:
other- The other property to compare against- 返回:
- The restriction
- 另请参阅:
Restrictions.eqProperty(String, String)
-
neProperty
public PropertyExpression neProperty(Property other)
Creates a non-equality restriction between 2 properties- 参数:
other- The other property to compare against- 返回:
- The restriction
- 另请参阅:
Restrictions.neProperty(String, String)
-
neProperty
public PropertyExpression neProperty(String other)
Creates a non-equality restriction between 2 properties- 参数:
other- The other property to compare against- 返回:
- The restriction
- 另请参阅:
Restrictions.neProperty(String, String)
-
leProperty
public PropertyExpression leProperty(Property other)
Creates a less-than-or-equal-to restriction between 2 properties- 参数:
other- The other property to compare against- 返回:
- The restriction
- 另请参阅:
Restrictions.leProperty(String, String)
-
leProperty
public PropertyExpression leProperty(String other)
Creates a less-than-or-equal-to restriction between 2 properties- 参数:
other- The other property to compare against- 返回:
- The restriction
- 另请参阅:
Restrictions.leProperty(String, String)
-
geProperty
public PropertyExpression geProperty(Property other)
Creates a greater-than-or-equal-to restriction between 2 properties- 参数:
other- The other property to compare against- 返回:
- The restriction
- 另请参阅:
Restrictions.geProperty(String, String)
-
geProperty
public PropertyExpression geProperty(String other)
Creates a greater-than-or-equal-to restriction between 2 properties- 参数:
other- The other property to compare against- 返回:
- The restriction
- 另请参阅:
Restrictions.geProperty(String, String)
-
ltProperty
public PropertyExpression ltProperty(Property other)
Creates a less-than restriction between 2 properties- 参数:
other- The other property to compare against- 返回:
- The restriction
- 另请参阅:
Restrictions.ltProperty(String, String)
-
ltProperty
public PropertyExpression ltProperty(String other)
Creates a less-than restriction between 2 properties- 参数:
other- The other property to compare against- 返回:
- The restriction
- 另请参阅:
Restrictions.ltProperty(String, String)
-
gtProperty
public PropertyExpression gtProperty(Property other)
Creates a greater-than restriction between 2 properties- 参数:
other- The other property to compare against- 返回:
- The restriction
- 另请参阅:
Restrictions.geProperty(String, String)
-
gtProperty
public PropertyExpression gtProperty(String other)
Creates a greater-than restriction between 2 properties- 参数:
other- The other property to compare against- 返回:
- The restriction
- 另请参阅:
Restrictions.geProperty(String, String)
-
isNull
public Criterion isNull()
Creates a NULL restriction- 返回:
- The restriction
- 另请参阅:
Restrictions.isNull(String)
-
isNotNull
public Criterion isNotNull()
Creates a NOT NULL restriction- 返回:
- The restriction
- 另请参阅:
Restrictions.isNotNull(String)
-
isEmpty
public Criterion isEmpty()
Creates a restriction to check that a collection is empty- 返回:
- The restriction
- 另请参阅:
Restrictions.isEmpty(String)
-
isNotEmpty
public Criterion isNotEmpty()
Creates a restriction to check that a collection is not empty- 返回:
- The restriction
- 另请参阅:
Restrictions.isNotEmpty(String)
-
count
public CountProjection count()
Creates a property count projection- 返回:
- The projection
- 另请参阅:
Projections.count(java.lang.String)
-
max
public AggregateProjection max()
Creates a property max projection- 返回:
- The projection
- 另请参阅:
Projections.max(java.lang.String)
-
min
public AggregateProjection min()
Creates a property min projection- 返回:
- The projection
- 另请参阅:
Projections.min(java.lang.String)
-
avg
public AggregateProjection avg()
Creates a property avg projection- 返回:
- The projection
- 另请参阅:
Projections.avg(java.lang.String)
-
group
public PropertyProjection group()
Creates a projection for this property as a group expression- 返回:
- The group projection
- 另请参阅:
Projections.groupProperty(java.lang.String)
-
asc
public Order asc()
Creates an ascending ordering for this property- 返回:
- The order
-
desc
public Order desc()
Creates a descending ordering for this property- 返回:
- The order
-
getProperty
public Property getProperty(String propertyName)
Get a component attribute of this property.- 参数:
propertyName- The sub property name- 返回:
- The property
-
eq
public Criterion eq(DetachedCriteria subselect)
Creates a sub-query equality expression for this property- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyEq(String, DetachedCriteria)
-
ne
public Criterion ne(DetachedCriteria subselect)
Creates a sub-query non-equality expression for this property- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyNe(String, DetachedCriteria)
-
lt
public Criterion lt(DetachedCriteria subselect)
Creates a sub-query less-than expression for this property- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyLt(String, DetachedCriteria)
-
le
public Criterion le(DetachedCriteria subselect)
Creates a sub-query less-than-or-equal-to expression for this property- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyLe(String, DetachedCriteria)
-
gt
public Criterion gt(DetachedCriteria subselect)
Creates a sub-query greater-than expression for this property- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyGt(String, DetachedCriteria)
-
ge
public Criterion ge(DetachedCriteria subselect)
Creates a sub-query greater-than-or-equal-to expression for this property- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyGe(String, DetachedCriteria)
-
notIn
public Criterion notIn(DetachedCriteria subselect)
Creates a sub-query NOT IN expression for this property. I.e.,[prop] NOT IN [subquery]- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyNotIn(String, DetachedCriteria)
-
in
public Criterion in(DetachedCriteria subselect)
Creates a sub-query IN expression for this property. I.e.,[prop] IN [subquery]- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyIn(String, DetachedCriteria)
-
eqAll
public Criterion eqAll(DetachedCriteria subselect)
Creates a equals-all sub-query expression for this property. I.e.,[prop] = ALL [subquery]- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyEqAll(String, DetachedCriteria)
-
gtAll
public Criterion gtAll(DetachedCriteria subselect)
Creates a greater-than-all sub-query expression for this property. I.e.,[prop] > ALL [subquery]- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyGtAll(String, DetachedCriteria)
-
ltAll
public Criterion ltAll(DetachedCriteria subselect)
Creates a less-than-all sub-query expression for this property. I.e.,[prop] < ALL [subquery]- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyLtAll(String, DetachedCriteria)
-
leAll
public Criterion leAll(DetachedCriteria subselect)
Creates a less-than-or-equal-to-all sub-query expression for this property. I.e.,[prop] <= ALL [subquery]- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyLeAll(String, DetachedCriteria)
-
geAll
public Criterion geAll(DetachedCriteria subselect)
Creates a greater-than-or-equal-to-all sub-query expression for this property. I.e.,[prop] >= ALL [subquery]- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyGeAll(String, DetachedCriteria)
-
gtSome
public Criterion gtSome(DetachedCriteria subselect)
Creates a greater-than-some sub-query expression for this property. I.e.,[prop] > SOME [subquery]- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyGtSome(String, DetachedCriteria)
-
ltSome
public Criterion ltSome(DetachedCriteria subselect)
Creates a less-than-some sub-query expression for this property. I.e.,[prop] < SOME [subquery]- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyLtSome(String, DetachedCriteria)
-
leSome
public Criterion leSome(DetachedCriteria subselect)
Creates a less-than-or-equal-to-some sub-query expression for this property. I.e.,[prop] <= SOME [subquery]- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyLeSome(String, DetachedCriteria)
-
geSome
public Criterion geSome(DetachedCriteria subselect)
Creates a greater-than-or-equal-to-some sub-query expression for this property. I.e.,[prop] >= SOME [subquery]- 参数:
subselect- The sub-query- 返回:
- The expression
- 另请参阅:
Subqueries.propertyGeSome(String, DetachedCriteria)
-
-