KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > jdo > spi > persistence > support > sqlstore > PersistenceStore


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 in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
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 Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * PersistenceStore.java
26  *
27  * Created on March 3, 2000
28  *
29  */

30
31 package com.sun.jdo.spi.persistence.support.sqlstore;
32
33
34 import java.util.Collection JavaDoc;
35
36 /**
37  * <P>This interface represents a Persistence store
38  * that knows how to create, find, modify and delete persistence
39  * capable objects from a backing store such as a database.
40  */

41 public interface PersistenceStore {
42
43     /**
44      */

45     public void execute(PersistenceManager pm, Collection JavaDoc actions);
46
47     /**
48      */

49     public void executeBatch(PersistenceManager pm, UpdateObjectDesc request, boolean forceFlush);
50
51     /**
52      */

53     public Object JavaDoc retrieve(PersistenceManager pm,
54                                RetrieveDesc action,
55                                ValueFetcher parameters);
56
57     /**
58      */

59     public Class JavaDoc getClassByOidClass(Class JavaDoc oidType);
60
61     /**
62      */

63     public StateManager getStateManager(Class JavaDoc classType);
64
65     /**
66      * Returns a new retrieve descriptor for an external (user) query.
67      *
68      * @param classType Type of the persistence capable class to be queried.
69      * @return A new retrieve descriptor for an external (user) query.
70      */

71     public RetrieveDesc getRetrieveDesc(Class JavaDoc classType);
72
73     /**
74      * Returns a new retrieve descriptor for an external (user) query.
75      * This retrieve descriptor can be used to query for the foreign
76      * field <code>name</code>.
77      *
78      * @param fieldName Name of the foreign field to be queried.
79      * @param classType Persistence capable class including <code>fieldName</code>.
80      * @return A new retrieve descriptor for an external (user) query.
81      */

82     public RetrieveDesc getRetrieveDesc(String JavaDoc fieldName, Class JavaDoc classType);
83
84     /**
85      */

86     public UpdateObjectDesc getUpdateObjectDesc(Class JavaDoc classType);
87
88
89     /**
90      */

91     public PersistenceConfig getPersistenceConfig(
92             Class JavaDoc classType);
93
94     /**
95      * Returns ConfigCache associated with this store.
96      *
97      * @return ConfigCache associated with this store.
98      */

99     public ConfigCache getConfigCache();
100 }
101
Popular Tags