public class

PojoEntityTuplizer

extends AbstractEntityTuplizer
java.lang.Object
   ↳ org.hibernate.tuple.entity.AbstractEntityTuplizer
     ↳ org.hibernate.tuple.entity.PojoEntityTuplizer

Class Overview

An EntityTuplizer specific to the pojo entity mode.

Summary

[Expand]
Inherited Fields
From class org.hibernate.tuple.entity.AbstractEntityTuplizer
Public Constructors
PojoEntityTuplizer(EntityMetamodel entityMetamodel, PersistentClass mappedEntity)
Public Methods
void afterInitialize(Object entity, boolean lazyPropertiesAreUnfetched, SessionImplementor session)
Called just after the entities properties have been initialized.
String determineConcreteSubclassEntityName(Object entityInstance, SessionFactoryImplementor factory)
Class getConcreteProxyClass()
EntityMode getEntityMode()
EntityNameResolver[] getEntityNameResolvers()
Class getMappedClass()
Object[] getPropertyValues(Object entity)
Extract the current values contained on the given entity.
Object[] getPropertyValuesToInsert(Object entity, Map mergeMap, SessionImplementor session)
Extract the values of the insertable properties of the entity (including backrefs)
boolean hasUninitializedLazyProperties(Object entity)
Does the given entity instance have any currently uninitialized lazy properties?
boolean isInstrumented()
boolean isLifecycleImplementor()
Does the class managed by this tuplizer implement the Lifecycle interface.
boolean isValidatableImplementor()
Does the class managed by this tuplizer implement the Validatable interface.
void setPropertyValues(Object entity, Object[] values)
Inject the given values into the given entity.
Protected Methods
Instantiator buildInstantiator(PersistentClass persistentClass)
Build an appropriate Instantiator for the given mapped entity.
Getter buildPropertyGetter(Property mappedProperty, PersistentClass mappedEntity)
Build an appropriate Getter for the given property.
Setter buildPropertySetter(Property mappedProperty, PersistentClass mappedEntity)
Build an appropriate Setter for the given property.
ProxyFactory buildProxyFactory(PersistentClass persistentClass, Getter idGetter, Setter idSetter)
Build an appropriate ProxyFactory for the given mapped entity.
ProxyFactory buildProxyFactoryInternal(PersistentClass persistentClass, Getter idGetter, Setter idSetter)
Object[] getPropertyValuesWithOptimizer(Object object)
void setPropertyValuesWithOptimizer(Object object, Object[] values)
[Expand]
Inherited Methods
From class org.hibernate.tuple.entity.AbstractEntityTuplizer
From class java.lang.Object
From interface org.hibernate.tuple.Tuplizer
From interface org.hibernate.tuple.entity.EntityTuplizer

Public Constructors

public PojoEntityTuplizer (EntityMetamodel entityMetamodel, PersistentClass mappedEntity)

Public Methods

public void afterInitialize (Object entity, boolean lazyPropertiesAreUnfetched, SessionImplementor session)

Called just after the entities properties have been initialized.

Parameters
entity The entity being initialized.
lazyPropertiesAreUnfetched Are defined lazy properties currently unfecthed
session The session initializing this entity.

public String determineConcreteSubclassEntityName (Object entityInstance, SessionFactoryImplementor factory)

public Class getConcreteProxyClass ()

public EntityMode getEntityMode ()

public EntityNameResolver[] getEntityNameResolvers ()

public Class getMappedClass ()

public Object[] getPropertyValues (Object entity)

Extract the current values contained on the given entity.

Parameters
entity The entity from which to extract values.
Returns
  • The current property values.

public Object[] getPropertyValuesToInsert (Object entity, Map mergeMap, SessionImplementor session)

Extract the values of the insertable properties of the entity (including backrefs)

Parameters
entity The entity from which to extract.
mergeMap a map of instances being merged to merged instances
session The session in which the resuest is being made.
Returns
  • The insertable property values.

public boolean hasUninitializedLazyProperties (Object entity)

Does the given entity instance have any currently uninitialized lazy properties?

Parameters
entity The entity to be check for uninitialized lazy properties.
Returns
  • True if uninitialized lazy properties were found; false otherwise.

public boolean isInstrumented ()

public boolean isLifecycleImplementor ()

Does the class managed by this tuplizer implement the Lifecycle interface.

Returns
  • True if the Lifecycle interface is implemented; false otherwise.

public boolean isValidatableImplementor ()

Does the class managed by this tuplizer implement the Validatable interface.

Returns
  • True if the Validatable interface is implemented; false otherwise.

public void setPropertyValues (Object entity, Object[] values)

Inject the given values into the given entity.

Parameters
entity The entity.
values The values to be injected.

Protected Methods

protected Instantiator buildInstantiator (PersistentClass persistentClass)

Build an appropriate Instantiator for the given mapped entity.

Parameters
persistentClass The mapping information regarding the mapped entity.
Returns
  • An appropriate Instantiator instance.

protected Getter buildPropertyGetter (Property mappedProperty, PersistentClass mappedEntity)

Build an appropriate Getter for the given property.

Parameters
mappedProperty The property to be accessed via the built Getter.
mappedEntity The entity information regarding the mapped entity owning this property.
Returns
  • An appropriate Getter instance.

protected Setter buildPropertySetter (Property mappedProperty, PersistentClass mappedEntity)

Build an appropriate Setter for the given property.

Parameters
mappedProperty The property to be accessed via the built Setter.
mappedEntity The entity information regarding the mapped entity owning this property.
Returns
  • An appropriate Setter instance.

protected ProxyFactory buildProxyFactory (PersistentClass persistentClass, Getter idGetter, Setter idSetter)

Build an appropriate ProxyFactory for the given mapped entity.

Parameters
persistentClass The mapping information regarding the mapped entity.
idGetter The constructed Getter relating to the entity's id property.
idSetter The constructed Setter relating to the entity's id property.
Returns
  • An appropriate ProxyFactory instance.

protected ProxyFactory buildProxyFactoryInternal (PersistentClass persistentClass, Getter idGetter, Setter idSetter)

protected Object[] getPropertyValuesWithOptimizer (Object object)

protected void setPropertyValuesWithOptimizer (Object object, Object[] values)