KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > property > Getter


1 //$Id: Getter.java,v 1.6 2005/07/16 22:20:47 oneovthafew Exp $
2
package org.hibernate.property;
3
4 import java.io.Serializable JavaDoc;
5 import java.lang.reflect.Method JavaDoc;
6 import java.util.Map JavaDoc;
7
8 import org.hibernate.HibernateException;
9 import org.hibernate.engine.SessionImplementor;
10
11 /**
12  * Gets values of a particular property
13  *
14  * @author Gavin King
15  */

16 public interface Getter extends Serializable JavaDoc {
17     /**
18      * Get the property value from the given instance .
19      * @param owner The instance containing the value to be retreived.
20      * @return The extracted value.
21      * @throws HibernateException
22      */

23     public Object JavaDoc get(Object JavaDoc owner) throws HibernateException;
24
25     /**
26      * Get the property value from the given owner instance.
27      *
28      * @param owner The instance containing the value to be retreived.
29      * @param mergeMap a map of merged persistent instances to detached instances
30      * @param session The session from which this request originated.
31      * @return The extracted value.
32      * @throws HibernateException
33      */

34     public Object JavaDoc getForInsert(Object JavaDoc owner, Map JavaDoc mergeMap, SessionImplementor session)
35     throws HibernateException;
36
37     /**
38      * Get the declared Java type
39      */

40     public Class JavaDoc getReturnType();
41
42     /**
43      * Optional operation (return null)
44      */

45     public String JavaDoc getMethodName();
46
47     /**
48      * Optional operation (return null)
49      */

50     public Method JavaDoc getMethod();
51 }
52
Popular Tags