org.progeeks.hibernate
Class MetaObjectInstantiator

java.lang.Object
  extended by org.progeeks.hibernate.MetaObjectInstantiator
All Implemented Interfaces:
java.io.Serializable, org.hibernate.tuple.Instantiator

public class MetaObjectInstantiator
extends java.lang.Object
implements org.hibernate.tuple.Instantiator

Implemenation of Instantiator for a MetaObject. If the id used to instantiate the object is of type java.util.Map, we make the assumption that this must be a composite id.

Version:
$Revision: 1.4 $
Author:
Matt Veitas
See Also:
Serialized Form

Constructor Summary
MetaObjectInstantiator(org.hibernate.tuple.EntityMetamodel entityMetamodel)
           
 
Method Summary
 java.lang.Object instantiate()
          Perform the requested instantiation (sans any id).
 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 which this Instantiator instantiates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaObjectInstantiator

public MetaObjectInstantiator(org.hibernate.tuple.EntityMetamodel entityMetamodel)
Method Detail

instantiate

public java.lang.Object instantiate(java.io.Serializable id)
Perform the requested entity instantiation.

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

Specified by:
instantiate in interface org.hibernate.tuple.Instantiator
Parameters:
id - The id of the entity to be instantiated.
Returns:
An appropriately instantiated entity.

instantiate

public java.lang.Object instantiate()
Perform the requested instantiation (sans any id).

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

isInstance

public boolean isInstance(java.lang.Object object)
Performs check to see if the given object is an instance of the entity which this Instantiator instantiates.

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


Copyright © 2002-2003 Paul Speed. All Rights Reserved.