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