KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > jdo > spi > Detachable


1 /*
2  * Copyright 2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 /*
18  * Detachable.java
19  *
20  */

21
22 package javax.jdo.spi;
23
24 /**
25  * This interface is implemented by classes that can be detached from the
26  * persistence context and later attached. The interface includes the
27  * contract by which the StateManager can set the object id and version
28  * so they are preserved while outside the persistence environment.
29  * @version 2.0
30  * @since 2.0
31  */

32 public interface Detachable {
33     
34     /** Replace the object id in the detached object.
35      */

36     void jdoReplaceObjectId();
37     
38     /** Replace the version in the detached object.
39      */

40     void jdoReplaceVersion();
41     
42     /** Provide the loaded field list in the detached object.
43      */

44     void jdoProvideLoadedFieldList();
45     
46     /** Replace the loaded field list in the detached object.
47      */

48     void jdoReplaceLoadedFieldList();
49     
50     /** Provide the modified field list in the detached object.
51      */

52     void jdoProvideModifiedFieldList();
53     
54     /** Replace the modified field list in the detached object.
55      */

56     void jdoReplaceModifiedFieldList();
57 }
58
Popular Tags