Package rasj
Class RasImplementation
- java.lang.Object
-
- rasj.RasImplementation
-
- All Implemented Interfaces:
Implementation
public class RasImplementation extends java.lang.Object implements Implementation
PURPOSE: ODMG Implementation Bootstrap Object This class implements an ODMG Bootstrap Object. This is the only vendor-dependent object a user needs for performing database operations.
-
-
Field Summary
Fields Modifier and Type Field Description static intTYPE_TYPE_BASEstatic intTYPE_TYPE_MDDstatic intTYPE_TYPE_SET
-
Constructor Summary
Constructors Constructor Description RasImplementation(java.lang.String server)Standard constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabortTA()Abort a transaction.voidbeginTA()Begin a transaction.voidcloseDB()Closes an open database.voidcommitTA()Commit a transaction.voidconnectClient(java.lang.String userName, java.lang.String passwordHash)Connect as a new client with the given userName and md5 encoded password.TransactioncurrentTransaction()Get current transaction for thread, or NULL if none.intdbIsOpen()returns 1 if an openDB command is executed (closeDB sets it back to 0).voiddisconnectClient()Disconnect as a client from rasmgr.DatabasegetDatabase(java.lang.Object obj)Not implemented yet.intgetMaxRetry()Get the maximum retry parameterjava.lang.StringgetObjectId(java.lang.Object obj)Get a String representation of the object's identifier.java.lang.StringgetTypeStructure(java.lang.String typename, int typetype)booleanisOpenTA()Returns TRUE if a transaction is currently open.DArraynewDArray()Not implemented yet.DatabasenewDatabase()Create a new database object.DBagnewDBag()Create a new DBag object.DListnewDList()Create a new DList object.DMapnewDMap()Not implemented yet.DSetnewDSet()Create a new DSet object.OQLQuerynewOQLQuery()Create a new query object.TransactionnewTransaction()Create aTransactionobject and associate it with the current thread.voidopenDB(java.lang.String name, int accessMode)Open databasevoidsetMaxRetry(int newRetry)Set the maximum retry parametervoidsetTraceThreshold(int level)Set trace output threshold (0 = minimal, 4 = verbose; 1 = default)voidsetUserIdentification(java.lang.String userName, java.lang.String plainPass)Set user identification : name/plain password (default is rasguest/rasguest)voidsetUserIdentificationHashed(java.lang.String userName, java.lang.String passwordMD5Hash)Set user identification : name/md5 hashed password
-
-
-
Field Detail
-
TYPE_TYPE_SET
public static final int TYPE_TYPE_SET
- See Also:
- Constant Field Values
-
TYPE_TYPE_MDD
public static final int TYPE_TYPE_MDD
- See Also:
- Constant Field Values
-
TYPE_TYPE_BASE
public static final int TYPE_TYPE_BASE
- See Also:
- Constant Field Values
-
-
Method Detail
-
dbIsOpen
public int dbIsOpen()
returns 1 if an openDB command is executed (closeDB sets it back to 0).
-
newTransaction
public Transaction newTransaction()
Description copied from interface:ImplementationCreate aTransactionobject and associate it with the current thread.- Specified by:
newTransactionin interfaceImplementation- Returns:
- The newly created
Transactioninstance. - See Also:
Transaction
-
currentTransaction
public Transaction currentTransaction()
Get current transaction for thread, or NULL if none.- Specified by:
currentTransactionin interfaceImplementation- Returns:
- The current
Transactionobject or null if there is none. - See Also:
Transaction
-
newDatabase
public Database newDatabase()
Create a new database object.- Specified by:
newDatabasein interfaceImplementation- Returns:
- The new
Databaseobject. - See Also:
Database
-
newOQLQuery
public OQLQuery newOQLQuery()
Create a new query object.- Specified by:
newOQLQueryin interfaceImplementation- Returns:
- The new
OQLQueryobject. - See Also:
OQLQuery
-
newDList
public DList newDList()
Create a new DList object.- Specified by:
newDListin interfaceImplementation- Returns:
- The new
DListobject. - See Also:
DList
-
newDBag
public DBag newDBag()
Create a new DBag object.- Specified by:
newDBagin interfaceImplementation- Returns:
- The new
DBagobject. - See Also:
DBag
-
newDSet
public DSet newDSet()
Create a new DSet object.- Specified by:
newDSetin interfaceImplementation- Returns:
- The new
DSetobject. - See Also:
DSet
-
newDArray
public DArray newDArray()
Not implemented yet.- Specified by:
newDArrayin interfaceImplementation- Returns:
- The new
DArrayobject. - See Also:
DArray
-
newDMap
public DMap newDMap()
Not implemented yet.- Specified by:
newDMapin interfaceImplementation- Returns:
- The new
DMapobject. - See Also:
DMap
-
getObjectId
public java.lang.String getObjectId(java.lang.Object obj)
Get a String representation of the object's identifier.- Specified by:
getObjectIdin interfaceImplementation- Parameters:
obj- The object whose identifier is being accessed.- Returns:
- The object's identifier in the form of a String
-
getDatabase
public Database getDatabase(java.lang.Object obj)
Not implemented yet.- Specified by:
getDatabasein interfaceImplementation- Parameters:
obj- The object.- Returns:
- The
Databasethat contains the object.
-
openDB
public void openDB(java.lang.String name, int accessMode) throws ODMGExceptionOpen database- Throws:
ODMGException
-
closeDB
public void closeDB() throws ODMGExceptionCloses an open database. At the moment, only one database can be open at a given time and thus no parameter "database" is necessary here.- Throws:
ODMGException
-
beginTA
public void beginTA() throws ODMGExceptionBegin a transaction.- Throws:
ODMGException
-
isOpenTA
public boolean isOpenTA() throws ODMGExceptionReturns TRUE if a transaction is currently open.- Throws:
ODMGException
-
commitTA
public void commitTA() throws ODMGExceptionCommit a transaction.- Throws:
ODMGException
-
abortTA
public void abortTA() throws ODMGExceptionAbort a transaction.- Throws:
ODMGException
-
setMaxRetry
public void setMaxRetry(int newRetry)
Set the maximum retry parameter
-
getMaxRetry
public int getMaxRetry()
Get the maximum retry parameter
-
setUserIdentification
public void setUserIdentification(java.lang.String userName, java.lang.String plainPass)Set user identification : name/plain password (default is rasguest/rasguest)
-
setUserIdentificationHashed
public void setUserIdentificationHashed(java.lang.String userName, java.lang.String passwordMD5Hash)Set user identification : name/md5 hashed password
-
connectClient
public void connectClient(java.lang.String userName, java.lang.String passwordHash)Connect as a new client with the given userName and md5 encoded password.
-
disconnectClient
public void disconnectClient()
Disconnect as a client from rasmgr.
-
setTraceThreshold
public void setTraceThreshold(int level)
Set trace output threshold (0 = minimal, 4 = verbose; 1 = default)
-
getTypeStructure
public java.lang.String getTypeStructure(java.lang.String typename, int typetype)
-
-