KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > tuple > Instantiator


1 // $Id: Instantiator.java,v 1.5 2005/07/11 17:31:50 steveebersole Exp $
2
package org.hibernate.tuple;
3
4
5 import java.io.Serializable JavaDoc;
6
7 /**
8  * Contract for implementors responsible for instantiating entity/component instances.
9  *
10  * @author Steve Ebersole
11  */

12 public interface Instantiator extends Serializable JavaDoc {
13
14     /**
15      * Perform the requested entity instantiation.
16      * <p/>
17      * This form is never called for component instantiation, only entity instantiation.
18      *
19      * @param id The id of the entity to be instantiated.
20      * @return An appropriately instantiated entity.
21      */

22     public Object JavaDoc instantiate(Serializable JavaDoc id);
23
24     /**
25      * Perform the requested instantiation.
26      *
27      * @return The instantiated data structure.
28      */

29     public Object JavaDoc instantiate();
30
31     /**
32      * Performs check to see if the given object is an instance of the entity
33      * or component which this Instantiator instantiates.
34      *
35      * @param object The object to be checked.
36      * @return True is the object does respresent an instance of the underlying
37      * entity/component.
38      */

39     public boolean isInstance(Object JavaDoc object);
40 }
41
Popular Tags