Package org.hibernate.criterion
Class NaturalIdentifier
- java.lang.Object
-
- org.hibernate.criterion.NaturalIdentifier
-
-
Constructor Summary
Constructors Constructor Description NaturalIdentifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>getNaturalIdValues()Get a map of set of the natural identifier values set on this criterion (for composite natural identifiers this need not be the full set of properties).TypedValue[]getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)Return typed values for all parameters in the rendered SQL fragmentNaturalIdentifierset(java.lang.String property, java.lang.Object value)Set a natural identifier value for this expressionjava.lang.StringtoSqlString(Criteria criteria, CriteriaQuery criteriaQuery)Render the SQL fragment
-
-
-
Method Detail
-
getTypedValues
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException
Description copied from interface:CriterionReturn typed values for all parameters in the rendered SQL fragment- Specified by:
getTypedValuesin interfaceCriterion- Parameters:
criteria- The local criteriacriteriaQuery- The overall criteria query- Returns:
- The types values (for binding)
- Throws:
HibernateException- Problem determining types.
-
toSqlString
public java.lang.String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException
Description copied from interface:CriterionRender the SQL fragment- Specified by:
toSqlStringin interfaceCriterion- Parameters:
criteria- The local criteriacriteriaQuery- The overall criteria query- Returns:
- The generated SQL fragment
- Throws:
HibernateException- Problem during rendering.
-
getNaturalIdValues
public java.util.Map<java.lang.String,java.lang.Object> getNaturalIdValues()
Get a map of set of the natural identifier values set on this criterion (for composite natural identifiers this need not be the full set of properties).- Returns:
- The value map.
-
set
public NaturalIdentifier set(java.lang.String property, java.lang.Object value)
Set a natural identifier value for this expression- Parameters:
property- The specific property namevalue- The value to use- Returns:
this, for method chaining
-
-