Top Description Fields Constructors Methods
org.hibernate.criterion

public Class NaturalIdentifier

extends Object
implements Criterion
Class Inheritance
All Implemented Interfaces
org.hibernate.criterion.Criterion, java.io.Serializable
Imports
java.util.Map, java.util.concurrent.ConcurrentHashMap, org.hibernate.Criteria, .HibernateException, org.hibernate.engine.spi.TypedValue

An expression pertaining to an entity's defined natural identifier
Author
Gavin King
See Also
org.hibernate.Session#byNaturalId(Class), org.hibernate.Session#byNaturalId(String), org.hibernate.Session#bySimpleNaturalId(Class), org.hibernate.Session#bySimpleNaturalId(String)

Field Summary

Modifier and TypeField and Description
private final Conjunction

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Map<String, Object>

Returns:

The value map.
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).

public TypedValue[]
getTypedValues(Criteria
The local criteria
criteria
,
CriteriaQuery
The overall criteria query
criteriaQuery
)

Implements org.hibernate.criterion.Criterion.getTypedValues.

Return typed values for all parameters in the rendered SQL fragment
public NaturalIdentifier

Returns:

this, for method chaining
set
(String
The specific property name
property
,
Object
The value to use
value
)

Set a natural identifier value for this expression

public String
toSqlString(Criteria
The local criteria
criteria
,
CriteriaQuery
The overall criteria query
criteriaQuery
)

Implements org.hibernate.criterion.Criterion.toSqlString.

Render the SQL fragment
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

conjunctionback to summary
private final Conjunction conjunction

Constructor Detail

NaturalIdentifierback to summary
public NaturalIdentifier()

Method Detail

getNaturalIdValuesback to summary
public Map<String, 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:Map<String, Object>

The value map.

getTypedValuesback to summary
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException

Implements org.hibernate.criterion.Criterion.getTypedValues.

Doc from org.hibernate.criterion.Criterion.getTypedValues.

Return typed values for all parameters in the rendered SQL fragment

Parameters
criteria:Criteria

The local criteria

criteriaQuery:CriteriaQuery

The overall criteria query

Returns:TypedValue[]

The types values (for binding)

Annotations
@Override
Exceptions
HibernateException:
Problem determining types.
setback to summary
public NaturalIdentifier set(String property, Object value)

Set a natural identifier value for this expression

Parameters
property:String

The specific property name

value:Object

The value to use

Returns:NaturalIdentifier

this, for method chaining

toSqlStringback to summary
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException

Implements org.hibernate.criterion.Criterion.toSqlString.

Doc from org.hibernate.criterion.Criterion.toSqlString.

Render the SQL fragment

Parameters
criteria:Criteria

The local criteria

criteriaQuery:CriteriaQuery

The overall criteria query

Returns:String

The generated SQL fragment

Annotations
@Override
Exceptions
HibernateException:
Problem during rendering.