KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > essentials > indirection > ValueHolderInterface


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  */

21 // Copyright (c) 1998, 2005, Oracle. All rights reserved.
22
package oracle.toplink.essentials.indirection;
23
24
25 /**
26  * <b>Purpose</b>: Interface to allow lazy loading of an object's relationships from the database.
27  *
28  * @see ValueHolder
29  * @see oracle.toplink.essentials.internal.indirection.DatabaseValueHolder
30  */

31 public interface ValueHolderInterface {
32
33     /** Can be used to have transparent indirection toString instantiate the objects. */
34     public static boolean shouldToStringInstantiate = false;
35
36     /**
37      * PUBLIC:
38      * Return the value.
39      */

40     public Object JavaDoc getValue();
41
42     /**
43      * PUBLIC:
44      * Return whether the contents have been read from the database.
45      * This is used periodically by the indirection policy to determine whether
46      * to trigger the database read.
47      */

48     public boolean isInstantiated();
49
50     /**
51      * PUBLIC:
52      * Set the value.
53      */

54     public void setValue(Object JavaDoc value);
55 }
56
Popular Tags