KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > intercept > LazyPropertyInitializer


1 //$Id: LazyPropertyInitializer.java,v 1.2 2004/08/13 01:20:04 oneovthafew Exp $
2
package org.hibernate.intercept;
3
4 import java.io.Serializable JavaDoc;
5
6 import org.hibernate.HibernateException;
7 import org.hibernate.engine.SessionImplementor;
8
9 /**
10  * @author Gavin King
11  */

12 public interface LazyPropertyInitializer {
13     
14     /**
15      * Marker value for uninitialized properties
16      */

17     public static final Serializable JavaDoc UNFETCHED_PROPERTY = new Serializable JavaDoc() {
18         public String JavaDoc toString() { return "<lazy>"; }
19         public Object JavaDoc readResolve() {
20             return UNFETCHED_PROPERTY;
21         }
22     };
23
24     /**
25      * Initialize the property, and return its new value
26      */

27     public Object JavaDoc initializeLazyProperty(String JavaDoc fieldName, Object JavaDoc entity, SessionImplementor session)
28     throws HibernateException;
29
30 }
31
Popular Tags