org.hibernate.tuple
Class PojoInstantiator

java.lang.Object
  extended byorg.hibernate.tuple.PojoInstantiator
All Implemented Interfaces:
Instantiator, Serializable

public class PojoInstantiator
extends Object
implements Instantiator, Serializable

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

See Also:
Serialized Form

Constructor Summary
PojoInstantiator(Class mappedClass, Class proxyInterface, net.sf.cglib.reflect.FastClass fastClass, boolean embedded)
           
 
Method Summary
 Object instantiate()
          Perform the requested instantiation (sans any id).
 Object instantiate(Serializable id)
          Perform the requested entity instantiation.
 boolean isInstance(Object object)
          Performs check to see if the given object is an instance of the entity which this Instantiator instantiates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PojoInstantiator

public PojoInstantiator(Class mappedClass,
                        Class proxyInterface,
                        net.sf.cglib.reflect.FastClass fastClass,
                        boolean embedded)
Method Detail

instantiate

public Object instantiate()
Description copied from interface: Instantiator
Perform the requested instantiation (sans any id).

Specified by:
instantiate in interface Instantiator
Returns:
The instantiated data structure.

instantiate

public Object instantiate(Serializable id)
Description copied from interface: Instantiator
Perform the requested entity instantiation.

Specified by:
instantiate in interface Instantiator
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: Instantiator
Performs check to see if the given object is an instance of the entity which this Instantiator instantiates.

Specified by:
isInstance in interface Instantiator
Parameters:
object - The object to be checked.
Returns:
True is the object does respresent an instance of the underlying entity.