Package rasj
Class RasImplementation
java.lang.Object
rasj.RasImplementation
- All Implemented Interfaces:
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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabortTA()Abort a transaction.voidbeginTA()Begin a transaction.voidcloseDB()Closes an open database.voidcommitTA()Commit a transaction.voidconnectClient(String userName, String passwordHash) Connect as a new client with the given userName and md5 encoded password.Get current transaction for thread, or NULL if none.intdbIsOpen()returns 1 if an openDB command is executed (closeDB sets it back to 0).voidDisconnect as a client from rasmgr.getDatabase(Object obj) Not implemented yet.intGet the maximum retry parametergetObjectId(Object obj) Get a String representation of the object's identifier.getTypeStructure(String typename, int typetype) booleanisOpenTA()Returns TRUE if a transaction is currently open.Not implemented yet.Create a new database object.newDBag()Create a new DBag object.newDList()Create a new DList object.newDMap()Not implemented yet.newDSet()Create a new DSet object.Create a new query object.Create aTransactionobject and associate it with the current thread.voidOpen databasevoidsetMaxRetry(int newRetry) Set the maximum retry parametervoidsetTraceThreshold(int level) Set trace output threshold (0 = minimal, 4 = verbose; 1 = default)voidsetUserIdentification(String userName, String plainPass) Set user identification : name/plain password (default is rasguest/rasguest)voidsetUserIdentificationHashed(String userName, String passwordMD5Hash) Set user identification : name/md5 hashed password
-
Field Details
-
TYPE_TYPE_SET
public static final int TYPE_TYPE_SET- See Also:
-
TYPE_TYPE_MDD
public static final int TYPE_TYPE_MDD- See Also:
-
TYPE_TYPE_BASE
public static final int TYPE_TYPE_BASE- See Also:
-
-
Constructor Details
-
RasImplementation
Standard constructor.- Parameters:
server- - Complete URL of the RasDaMan httpserver (including port number)
-
-
Method Details
-
dbIsOpen
public int dbIsOpen()returns 1 if an openDB command is executed (closeDB sets it back to 0). -
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:
-
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:
-
newDatabase
Create a new database object.- Specified by:
newDatabasein interfaceImplementation- Returns:
- The new
Databaseobject. - See Also:
-
newOQLQuery
Create a new query object.- Specified by:
newOQLQueryin interfaceImplementation- Returns:
- The new
OQLQueryobject. - See Also:
-
newDList
Create a new DList object.- Specified by:
newDListin interfaceImplementation- Returns:
- The new
DListobject. - See Also:
-
newDBag
Create a new DBag object.- Specified by:
newDBagin interfaceImplementation- Returns:
- The new
DBagobject. - See Also:
-
newDSet
Create a new DSet object.- Specified by:
newDSetin interfaceImplementation- Returns:
- The new
DSetobject. - See Also:
-
newDArray
Not implemented yet.- Specified by:
newDArrayin interfaceImplementation- Returns:
- The new
DArrayobject. - See Also:
-
newDMap
Not implemented yet.- Specified by:
newDMapin interfaceImplementation- Returns:
- The new
DMapobject. - See Also:
-
getObjectId
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
Not implemented yet.- Specified by:
getDatabasein interfaceImplementation- Parameters:
obj- The object.- Returns:
- The
Databasethat contains the object.
-
openDB
Open database- Throws:
ODMGException
-
closeDB
Closes 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
Begin a transaction.- Throws:
ODMGException
-
isOpenTA
Returns TRUE if a transaction is currently open.- Throws:
ODMGException
-
commitTA
Commit a transaction.- Throws:
ODMGException
-
abortTA
Abort 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
Set user identification : name/plain password (default is rasguest/rasguest) -
setUserIdentificationHashed
Set user identification : name/md5 hashed password -
connectClient
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
-