KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > medor > datasource > api > DataStore


1 /**
2  * MEDOR: Middleware Enabling Distributed Object Requests
3  *
4  * Copyright (C) 2001-2003 France Telecom R&D
5  * Contact: alexandre.lefebvre@rd.francetelecom.com
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  *
21  * Initial developers: M. Alia, A. Lefebvre, S. Chassande-Barrioz
22  */

23
24 package org.objectweb.medor.datasource.api;
25
26 /**
27  * Describes data stores, i.e., entities storing data, such as a relational
28  * database, an object-oriented database, an LDAP directory, a UDDI directory,
29  * an XML document store, a text file storage system, etc.
30  */

31 public interface DataStore {
32
33     short MEDORTC_STORE = 0;
34     short JDBC_STORE = 1;
35     short TEXTFILE_STORE = 2;
36     short ODMG_STORE = 3;
37     short XMLDOCUMENT_STORE = 4;
38     short UDDI_STORE = 5;
39
40     /**
41      * Returns the symbolic name of the DataStore.
42      * <p>This name is used to
43      * pass as a parameter the connection to use at evaluation time for
44      * all QueryLeaves attached to this DataStore.
45      * @return the symbolic name of the current DataStore.
46      */

47     String JavaDoc getName();
48
49     /**
50      * Checks whether the current DataStore object represents the same data
51      * store as another DataStore object.
52      * @param ds the other DataStore object
53      * @return true of the two DataStore objects represent the same data store.
54      */

55     boolean isSameAs(DataStore ds);
56
57     /**
58      * Checks whether the current DataStore is capable of performing different
59      * types of operations.
60      * @param operationType is the type of operation for checking.
61      * @return true if the current DataStore is capable of performing the input
62      * operation type
63      * @see org.objectweb.medor.query.api.OperationType
64      */

65     boolean isCapable(short operationType);
66
67     /**
68      * Returns the type of DataStore
69      * @return the type of DataStore
70      */

71     short getDataStoreType();
72
73     /**
74      * Returns the name of the data store client.
75      * <p>This information is complementary to the data store type, and is
76      * useful when the data store type has several possible clients
77      * or products.</p>
78      * @return the name of the data store client.
79      */

80     String JavaDoc getClientName();
81
82     /**
83      * Sets the name of the data store client.
84      * @param cName the name of the data store client.
85      */

86     void setClientName(String JavaDoc cName);
87
88 }
89
Popular Tags