KickJava   Java API By Example, From Geeks To Geeks.

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


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>:
27  * Define an interface for a Container that can also act as a TopLink
28  * "indirection" object; i.e. the Container will only read its contents from
29  * the database when necessary (typically, on receipt of the first
30  * Container-related message).
31  * <p>
32  *
33  * @see oracle.toplink.essentials.internal.indirection.TransparentIndirectionPolicy
34  * @author Big Country
35  * @since TOPLink/Java 2.5
36  */

37 public interface IndirectContainer {
38
39     /**
40      * PUBLIC:
41      * This is used by the indirection policy to build the
42      * UOW clone of the container.
43      * @return oracle.toplink.essentials.indirection.ValueHolderInterface A representation of the valueholder * which this container uses
44      */

45     public ValueHolderInterface getValueHolder();
46
47     /**
48      * PUBLIC:
49      * Return whether the contents have been read from the database.
50      * This is used periodically by the indirection policy to determine whether
51      * to trigger the database read.
52      */

53     public boolean isInstantiated();
54
55     /**
56      * PUBLIC:
57      * Set the valueHolder.
58      * This is used by the indirection policy to build the
59      * UOW clone of the container.
60      */

61     public void setValueHolder(ValueHolderInterface valueHolder);
62 }
63
Popular Tags