1 package org.odmg;
2
3
4 import org.apache.ojb.odmg.oql.EnhancedOQLQuery;
5
6
7 /**
8 * The factory interface for a particular ODMG implementation.
9 * Each ODMG implementation will have a class that implements this interface.
10 * @author David Jordan (as Java Editor of the Object Data Management Group)
11 * @version ODMG 3.0
12 */
13
14 public interface Implementation
15 {
16 /**
17 * Create a <code>Transaction</code> object and associate it with the current thread.
18 * @return The newly created <code>Transaction</code> instance.
19 * @see org.odmg.Transaction
20 */
21 public Transaction newTransaction();
22
23 /**
24 * Get the current <code>Transaction</code> for the thread.
25 * @return The current <code>Transaction</code> object or null if there is none.
26 * @see org.odmg.Transaction
27 */
28 public Transaction currentTransaction();
29
30 /**
31 * Create a new <code>Database</code> object.
32 * @return The new <code>Database</code> object.
33 * @see org.odmg.Database
34 */
35 public Database newDatabase();
36
37 /**
38 * Create a new <code>OQLQuery</code> object.
39 * @return The new <code>OQLQuery</code> object.
40 * @see org.odmg.OQLQuery
41 */
42 public EnhancedOQLQuery newOQLQuery();
43
44 /**
45 * Create a new <code>DList</code> object.
46 * @return The new <code>DList</code> object.
47 * @see org.odmg.DList
48 */
49 public DList newDList();
50
51 /**
52 * Create a new <code>DBag</code> object.
53 * @return The new <code>DBag</code> object.
54 * @see org.odmg.DBag
55 */
56 public DBag newDBag();
57
58 /**
59 * Create a new <code>DSet</code> object.
60 * @return The new <code>DSet</code> object.
61 * @see org.odmg.DSet
62 */
63 public DSet newDSet();
64
65 /**
66 * Create a new <code>DArray</code> object.
67 * @return The new <code>DArray</code> object.
68 * @see org.odmg.DArray
69 */
70 public DArray newDArray();
71
72 /**
73 * Create a new <code>DMap</code> object.
74 * @return The new <code>DMap</code> object.
75 * @see org.odmg.DMap
76 */
77 public DMap newDMap();
78
79 /**
80 * Get a <code>String</code> representation of the object's identifier.
81 * @param obj The object whose identifier is being accessed.
82 * @return The object's identifier in the form of a String
83 */
84 public String getObjectId(Object obj);
85
86 /**
87 * Get the <code>Database</code> that contains the object <code>obj</code>.
88 * @param obj The object.
89 * @return The <code>Database</code> that contains the object.
90 */
91 public Database getDatabase(Object obj);
92 }