01: //$Id: Setter.java 5685 2005-02-12 07:19:50Z steveebersole $
02: package org.hibernate.property;
03:
04: import java.io.Serializable;
05: import java.lang.reflect.Method;
06:
07: import org.hibernate.HibernateException;
08: import org.hibernate.engine.SessionFactoryImplementor;
09:
10: /**
11: * Sets values to a particular property.
12: *
13: * @author Gavin King
14: */
15: public interface Setter extends Serializable {
16: /**
17: * Set the property value from the given instance
18: *
19: * @param target The instance upon which to set the given value.
20: * @param value The value to be set on the target.
21: * @param factory The session factory from which this request originated.
22: * @throws HibernateException
23: */
24: public void set(Object target, Object value,
25: SessionFactoryImplementor factory)
26: throws HibernateException;
27:
28: /**
29: * Optional operation (return null)
30: */
31: public String getMethodName();
32:
33: /**
34: * Optional operation (return null)
35: */
36: public Method getMethod();
37: }
|