站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.4 正式版 API 英文文档

Instantiator (Hibernate API Documentation) - Hibernate 3.2.4 正式版 API 英文文档


org.hibernate.tuple
Interface Instantiator

All Superinterfaces:
Serializable
All Known Implementing Classes:
Dom4jInstantiator, DynamicMapInstantiator, PojoInstantiator

public interface Instantiator
extends Serializable

Contract for implementors responsible for instantiating entity/component instances.

Author:
Steve Ebersole

Method Summary
 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.
 

Method Detail

instantiate

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.

instantiate

public Object instantiate()
Perform the requested instantiation.

Returns:
The instantiated data structure.

isInstance

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 respresent an instance of the underlying entity/component.