Package org.hibernate.tuple
Class PojoInstantiator
- java.lang.Object
-
- org.hibernate.tuple.PojoInstantiator
-
- All Implemented Interfaces:
java.io.Serializable
,Instantiator
- Direct Known Subclasses:
PojoEntityInstantiator
public class PojoInstantiator extends java.lang.Object implements Instantiator, java.io.Serializable
Defines a POJO-based instantiator for use from the tuplizers.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PojoInstantiator(java.lang.Class componentClass, ReflectionOptimizer.InstantiationOptimizer optimizer)
PojoInstantiator(java.lang.Class mappedClass, ReflectionOptimizer.InstantiationOptimizer optimizer, boolean embeddedIdentifier)
PojoInstantiator(Component component, ReflectionOptimizer.InstantiationOptimizer optimizer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Object
applyInterception(java.lang.Object entity)
java.lang.Object
instantiate()
Perform the requested instantiation.java.lang.Object
instantiate(java.io.Serializable id)
Perform the requested entity instantiation.boolean
isInstance(java.lang.Object object)
Performs check to see if the given object is an instance of the entity or component which this Instantiator instantiates.
-
-
-
Constructor Detail
-
PojoInstantiator
public PojoInstantiator(java.lang.Class mappedClass, ReflectionOptimizer.InstantiationOptimizer optimizer, boolean embeddedIdentifier)
-
PojoInstantiator
public PojoInstantiator(Component component, ReflectionOptimizer.InstantiationOptimizer optimizer)
-
PojoInstantiator
public PojoInstantiator(java.lang.Class componentClass, ReflectionOptimizer.InstantiationOptimizer optimizer)
-
-
Method Detail
-
instantiate
public java.lang.Object instantiate()
Description copied from interface:Instantiator
Perform the requested instantiation.- Specified by:
instantiate
in interfaceInstantiator
- Returns:
- The instantiated data structure.
-
applyInterception
protected java.lang.Object applyInterception(java.lang.Object entity)
-
instantiate
public java.lang.Object instantiate(java.io.Serializable id)
Description copied from interface:Instantiator
Perform the requested entity instantiation. This form is never called for component instantiation, only entity instantiation.- Specified by:
instantiate
in interfaceInstantiator
- Parameters:
id
- The id of the entity to be instantiated.- Returns:
- An appropriately instantiated entity.
-
isInstance
public boolean isInstance(java.lang.Object object)
Description copied from interface:Instantiator
Performs check to see if the given object is an instance of the entity or component which this Instantiator instantiates.- Specified by:
isInstance
in interfaceInstantiator
- Parameters:
object
- The object to be checked.- Returns:
- True is the object does represent an instance of the underlying entity/component.
-
-