001 package org.odmg;
002
003
004 import org.apache.ojb.odmg.oql.EnhancedOQLQuery;
005
006
007 /**
008 * The factory interface for a particular ODMG implementation.
009 * Each ODMG implementation will have a class that implements this interface.
010 * @author David Jordan (as Java Editor of the Object Data Management Group)
011 * @version ODMG 3.0
012 */
013
014 public interface Implementation
015 {
016 /**
017 * Create a <code>Transaction</code> object and associate it with the current thread.
018 * @return The newly created <code>Transaction</code> instance.
019 * @see org.odmg.Transaction
020 */
021 public Transaction newTransaction();
022
023 /**
024 * Get the current <code>Transaction</code> for the thread.
025 * @return The current <code>Transaction</code> object or null if there is none.
026 * @see org.odmg.Transaction
027 */
028 public Transaction currentTransaction();
029
030 /**
031 * Create a new <code>Database</code> object.
032 * @return The new <code>Database</code> object.
033 * @see org.odmg.Database
034 */
035 public Database newDatabase();
036
037 /**
038 * Create a new <code>OQLQuery</code> object.
039 * @return The new <code>OQLQuery</code> object.
040 * @see org.odmg.OQLQuery
041 */
042 public EnhancedOQLQuery newOQLQuery();
043
044 /**
045 * Create a new <code>DList</code> object.
046 * @return The new <code>DList</code> object.
047 * @see org.odmg.DList
048 */
049 public DList newDList();
050
051 /**
052 * Create a new <code>DBag</code> object.
053 * @return The new <code>DBag</code> object.
054 * @see org.odmg.DBag
055 */
056 public DBag newDBag();
057
058 /**
059 * Create a new <code>DSet</code> object.
060 * @return The new <code>DSet</code> object.
061 * @see org.odmg.DSet
062 */
063 public DSet newDSet();
064
065 /**
066 * Create a new <code>DArray</code> object.
067 * @return The new <code>DArray</code> object.
068 * @see org.odmg.DArray
069 */
070 public DArray newDArray();
071
072 /**
073 * Create a new <code>DMap</code> object.
074 * @return The new <code>DMap</code> object.
075 * @see org.odmg.DMap
076 */
077 public DMap newDMap();
078
079 /**
080 * Get a <code>String</code> representation of the object's identifier.
081 * @param obj The object whose identifier is being accessed.
082 * @return The object's identifier in the form of a String
083 */
084 public String getObjectId(Object obj);
085
086 /**
087 * Get the <code>Database</code> that contains the object <code>obj</code>.
088 * @param obj The object.
089 * @return The <code>Database</code> that contains the object.
090 */
091 public Database getDatabase(Object obj);
092 }