Top Description Fields Constructors Methods
org.hibernate.tuple

public Class PojoInstantiator

extends Object
implements Instantiator, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.hibernate.tuple.Instantiator
Known Direct Subclasses
org.hibernate.tuple.entity.PojoEntityInstantiator
Imports
java.io.IOException, .Serializable, java.lang.reflect.Constructor, org.hibernate.InstantiationException, .PropertyNotFoundException, org.hibernate.bytecode.spi.ReflectionOptimizer, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.util.ReflectHelper, org.hibernate.mapping.Component

Defines a POJO-based instantiator for use from the tuplizers.

Field Summary

Modifier and TypeField and Description
private transient Constructor<T>
private final boolean
private final boolean
private static final CoreMessageLogger
private final Class<T>
private final transient ReflectionOptimizer.InstantiationOptimizer

Constructor Summary

AccessConstructor and Description
public
PojoInstantiator(Class<T> mappedClass, ReflectionOptimizer.InstantiationOptimizer optimizer, boolean embeddedIdentifier)

public
public

Method Summary

Modifier and TypeMethod and Description
protected Object
public Object
instantiate()

Implements org.hibernate.tuple.Instantiator.instantiate.

Perform the requested instantiation.
public Object
instantiate(Serializable
The id of the entity to be instantiated.
id
)

Implements org.hibernate.tuple.Instantiator.instantiate.

Perform the requested entity instantiation.
public boolean
isInstance(Object
The object to be checked.
object
)

Implements org.hibernate.tuple.Instantiator.isInstance.

Performs check to see if the given object is an instance of the entity or component which this Instantiator instantiates.
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

constructorback to summary
private transient Constructor<T> constructor
embeddedIdentifierback to summary
private final boolean embeddedIdentifier
isAbstractback to summary
private final boolean isAbstract
LOGback to summary
private static final CoreMessageLogger LOG
mappedClassback to summary
private final Class<T> mappedClass
optimizerback to summary
private final transient ReflectionOptimizer.InstantiationOptimizer optimizer

Constructor Detail

PojoInstantiatorback to summary
public PojoInstantiator(Class<T> mappedClass, ReflectionOptimizer.InstantiationOptimizer optimizer, boolean embeddedIdentifier)
PojoInstantiatorback to summary
public PojoInstantiator(Component component, ReflectionOptimizer.InstantiationOptimizer optimizer)
PojoInstantiatorback to summary
public PojoInstantiator(Class<T> componentClass, ReflectionOptimizer.InstantiationOptimizer optimizer)

Method Detail

applyInterceptionback to summary
protected Object applyInterception(Object entity)
instantiateback to summary
public Object instantiate()

Implements org.hibernate.tuple.Instantiator.instantiate.

Doc from org.hibernate.tuple.Instantiator.instantiate.

Perform the requested instantiation.

Returns:Object

The instantiated data structure.

instantiateback to summary
public Object instantiate(Serializable id)

Implements org.hibernate.tuple.Instantiator.instantiate.

Doc from org.hibernate.tuple.Instantiator.instantiate.

Perform the requested entity instantiation.

This form is never called for component instantiation, only entity instantiation.

Parameters
id:Serializable

The id of the entity to be instantiated.

Returns:Object

An appropriately instantiated entity.

isInstanceback to summary
public boolean isInstance(Object object)

Implements org.hibernate.tuple.Instantiator.isInstance.

Doc from org.hibernate.tuple.Instantiator.isInstance.

Performs check to see if the given object is an instance of the entity or component which this Instantiator instantiates.

Parameters
object:Object

The object to be checked.

Returns:boolean

True is the object does represent an instance of the underlying entity/component.

readObjectback to summary
private void readObject(ObjectInputStream stream) throws ClassNotFoundException, IOException