public class

PojoInstantiator

extends Object
implements Serializable Instantiator
java.lang.Object
   ↳ org.hibernate.tuple.PojoInstantiator

Class Overview

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

Summary

Public Constructors
PojoInstantiator(Component component, ReflectionOptimizer.InstantiationOptimizer optimizer)
PojoInstantiator(PersistentClass persistentClass, ReflectionOptimizer.InstantiationOptimizer optimizer)
Public Methods
Object instantiate()
Perform the requested instantiation.
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 or component which this Instantiator instantiates.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.hibernate.tuple.Instantiator

Public Constructors

public PojoInstantiator (Component component, ReflectionOptimizer.InstantiationOptimizer optimizer)

public PojoInstantiator (PersistentClass persistentClass, ReflectionOptimizer.InstantiationOptimizer optimizer)

Public Methods

public Object instantiate ()

Perform the requested instantiation.

Returns
  • The instantiated data structure.

public Object instantiate (Serializable id)

Perform the requested entity instantiation.

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

Parameters
id The id of the entity to be instantiated.
Returns
  • An appropriately instantiated entity.

public boolean isInstance (Object object)

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

Parameters
object The object to be checked.
Returns
  • True is the object does represent an instance of the underlying entity/component.