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