Top Description Methods
org.hibernate.tuple

public Interface Tuplizer

Known Direct Subinterfaces
org.hibernate.tuple.component.ComponentTuplizer, org.hibernate.tuple.entity.EntityTuplizer
Imports
org.hibernate.property.access.spi.Getter

A tuplizer defines the contract for things which know how to manage a particular representation of a piece of data, given that representation's org.hibernate.EntityMode (the entity-mode essentially defining which representation).

If that given piece of data is thought of as a data structure, then a tuplizer is the thing which knows how to

For example, a given piece of data might be represented as a POJO class. Here, it's representation and entity-mode is POJO. Well a tuplizer for POJO entity-modes would know how to

Author
Steve Ebersole
See Also
org.hibernate.tuple.entity.EntityTuplizer, org.hibernate.tuple.component.ComponentTuplizer

Method Summary

Modifier and TypeMethod and Description
public Getter

Returns:

The property getter.
getGetter
(int
The property index.
i
)

Retrieve the getter for the specified property.

public Class<T>

Returns:

The persistent class.
getMappedClass
()

Return the pojo class managed by this tuplizer.

public Object

Returns:

The current value of the given property on the given entity.
getPropertyValue
(Object
The entity from which to extract the property value.
entity
,
int
The index of the property for which to extract the value.
i
)

Extract the value of a particular property from the given entity.

public Object[]

Returns:

The current property values.
getPropertyValues
(Object
The entity from which to extract values.
entity
)

Extract the current values contained on the given entity.

public Object

Returns:

The new, empty entity instance.
instantiate
()

Generate a new, empty entity.

public boolean

Returns:

True if the object is considered as an instance of this entity within the given mode.
isInstance
(Object
The object to be checked.
object
)

Is the given object considered an instance of the the entity (accounting for entity-mode) managed by this tuplizer.

public void
setPropertyValues(Object
The entity.
entity
,
Object[]
The values to be injected.
values
)

Inject the given values into the given entity.

Method Detail

getGetterback to summary
public Getter getGetter(int i)

Retrieve the getter for the specified property.

Parameters
i:int

The property index.

Returns:Getter

The property getter.

getMappedClassback to summary
public Class<T> getMappedClass()

Return the pojo class managed by this tuplizer.

Need to determine how to best handle this for the Tuplizers for EntityModes other than POJO.

todo : be really nice to not have this here since it is essentially pojo specific...
Returns:Class<T>

The persistent class.

getPropertyValueback to summary
public Object getPropertyValue(Object entity, int i)

Extract the value of a particular property from the given entity.

Parameters
entity:Object

The entity from which to extract the property value.

i:int

The index of the property for which to extract the value.

Returns:Object

The current value of the given property on the given entity.

getPropertyValuesback to summary
public Object[] getPropertyValues(Object entity)

Extract the current values contained on the given entity.

Parameters
entity:Object

The entity from which to extract values.

Returns:Object[]

The current property values.

instantiateback to summary
public Object instantiate()

Generate a new, empty entity.

Returns:Object

The new, empty entity instance.

isInstanceback to summary
public boolean isInstance(Object object)

Is the given object considered an instance of the the entity (accounting for entity-mode) managed by this tuplizer.

Parameters
object:Object

The object to be checked.

Returns:boolean

True if the object is considered as an instance of this entity within the given mode.

setPropertyValuesback to summary
public void setPropertyValues(Object entity, Object[] values)

Inject the given values into the given entity.

Parameters
entity:Object

The entity.

values:Object[]

The values to be injected.