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