KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: ComponentTuplizer.java,v 1.4 2005/07/11 21:46:57 steveebersole Exp $
2
package org.hibernate.tuple;
3
4 import java.io.Serializable JavaDoc;
5 import java.lang.reflect.Method JavaDoc;
6
7 import org.hibernate.engine.SessionFactoryImplementor;
8
9 /**
10  * Defines further responsibilities reagarding tuplization based on
11  * a mapped components.
12  * </p>
13  * ComponentTuplizer implementations should have the following constructor signature:
14  * (org.hibernate.mapping.Component)
15  *
16  * @author Gavin King
17  */

18 public interface ComponentTuplizer extends Tuplizer, Serializable JavaDoc {
19     /**
20      * Retreive the current value of the parent property.
21      *
22      * @param component The component instance from which to extract the parent
23      * property value.
24      * @return The current value of the parent property.
25      */

26     public Object JavaDoc getParent(Object JavaDoc component);
27
28     /**
29      * Set the value of the parent property.
30      *
31      * @param component The component instance on which to set the parent.
32      * @param parent The parent to be set on the comonent.
33      * @param factory The current session factory.
34      */

35     public void setParent(Object JavaDoc component, Object JavaDoc parent, SessionFactoryImplementor factory);
36
37     /**
38      * Does the component managed by this tuuplizer contain a parent property?
39      *
40      * @return True if the component does contain a parent property; false otherwise.
41      */

42     public boolean hasParentProperty();
43
44     /**
45      * Is the given method available via the managed component as a property getter?
46      *
47      * @param method The method which to check against the managed component.
48      * @return True if the managed component is available from the managed component; else false.
49      */

50     public boolean isMethodOf(Method JavaDoc method);
51 }
52
Popular Tags