Package rasj.odmg
Class RasODMGImplementation
java.lang.Object
rasj.odmg.RasODMGImplementation
- All Implemented Interfaces:
Implementation,RasCommDefs,RasImplementationInterface
public class RasODMGImplementation
extends Object
implements RasImplementationInterface, RasCommDefs
This class implements the internal ODMG Bootstrap Object used by the rasj.odmg package.
Because it contains a lot of functionality for internal purposes (e.g. methods for
the RasManager), this class is not the official Implementation object the user works
with, it is only used by the rasj.odmg package.
The public Implementation object is the class
rasj.RasImplementation, which internally works with a
RasODMGImplementation object.
- See Also:
-
Field Summary
Fields inherited from interface rasj.clientcommhttp.RasCommDefs
BIG_ENDIAN, BROWSER, LITTLE_ENDIAN, RASCLIENT, RESPONSE_ERROR, RESPONSE_INT, RESPONSE_MDDS, RESPONSE_OID, RESPONSE_OK, RESPONSE_OK_NEGATIVE, RESPONSE_SKALARS -
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) Get current transaction for thread, or NULL if none.intdbIsOpen()Tells whether database is open.voidintGets the database access modeintGets the client IDgetDatabase(Object obj) Not implemented yet.Gets the current error statusvoidRequests a free server and retry'sintGet the maximum retry parametergetObjectId(Object obj) Get a String representation of the object's identifier.Gets the name of the actual server.intgetTypeStructure(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 a new transaction object and associate it with the current thread.voidOpen databasequeryRequest(String parameters) voidsetMaxRetry(int newRetry) Set the maximum retry parametervoidsetUserIdentification(String userName, String plainPass) voidsetUserIdentificationHashed(String userName, String passwordMD5Hash)
-
Constructor Details
-
RasODMGImplementation
Standard constructor.- Parameters:
server- Complete URL of the RasDaMan httpserver (including port number)
-
-
Method Details
-
getRasServer
Gets the name of the actual server.- Specified by:
getRasServerin interfaceRasImplementationInterface- Returns:
- the name of the RasDaMan server used
-
dbIsOpen
public int dbIsOpen()Tells whether database is open.- Specified by:
dbIsOpenin interfaceRasImplementationInterface- Returns:
- open status of database
-
getClientID
public int getClientID()Gets the client ID- Specified by:
getClientIDin interfaceRasImplementationInterface- Returns:
- ID of this client
-
getAccessMode
public int getAccessMode()Gets the database access mode- Specified by:
getAccessModein interfaceRasImplementationInterface- Returns:
- accessMode code: OPEN_READ_ONLY = 1; OPEN_READ_WRITE = 2; OPEN_EXCLUSIVE = 3
-
getErrorStatus
Gets the current error status- Specified by:
getErrorStatusin interfaceRasImplementationInterface- Returns:
- error status string
-
newTransaction
Create a new transaction object and associate it with the current thread.- Specified by:
newTransactionin interfaceImplementation- Specified by:
newTransactionin interfaceRasImplementationInterface- Returns:
- The newly created
Transactioninstance. - See Also:
-
currentTransaction
Get current transaction for thread, or NULL if none.- Specified by:
currentTransactionin interfaceImplementation- Specified by:
currentTransactionin interfaceRasImplementationInterface- Returns:
- The current
Transactionobject or null if there is none. - See Also:
-
newDatabase
Create a new database object.- Specified by:
newDatabasein interfaceImplementation- Specified by:
newDatabasein interfaceRasImplementationInterface- Returns:
- The new
Databaseobject. - See Also:
-
newOQLQuery
Create a new query object.- Specified by:
newOQLQueryin interfaceImplementation- Specified by:
newOQLQueryin interfaceRasImplementationInterface- Returns:
- The new
OQLQueryobject. - See Also:
-
newDList
Create a new DList object.- Specified by:
newDListin interfaceImplementation- Specified by:
newDListin interfaceRasImplementationInterface- Returns:
- The new
DListobject. - See Also:
-
newDBag
Create a new DBag object.- Specified by:
newDBagin interfaceImplementation- Specified by:
newDBagin interfaceRasImplementationInterface- Returns:
- The new
DBagobject. - See Also:
-
newDSet
Create a new DSet object.- Specified by:
newDSetin interfaceImplementation- Specified by:
newDSetin interfaceRasImplementationInterface- Returns:
- The new
DSetobject. - See Also:
-
newDArray
Not implemented yet.- Specified by:
newDArrayin interfaceImplementation- Specified by:
newDArrayin interfaceRasImplementationInterface- Returns:
- The new
DArrayobject. - See Also:
-
newDMap
Not implemented yet.- Specified by:
newDMapin interfaceImplementation- Specified by:
newDMapin interfaceRasImplementationInterface- Returns:
- The new
DMapobject. - See Also:
-
getObjectId
Get a String representation of the object's identifier.- Specified by:
getObjectIdin interfaceImplementation- Specified by:
getObjectIdin interfaceRasImplementationInterface- 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- Specified by:
getDatabasein interfaceRasImplementationInterface- Parameters:
obj- The object.- Returns:
- The
Databasethat contains the object.
-
openDB
Open database- Specified by:
openDBin interfaceRasImplementationInterface- Throws:
ODMGExceptionODMGRuntimeException
-
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.- Specified by:
closeDBin interfaceRasImplementationInterface- Throws:
ODMGException
-
beginTA
public void beginTA()Begin a transaction.- Specified by:
beginTAin interfaceRasImplementationInterface
-
isOpenTA
public boolean isOpenTA()Returns TRUE if a transaction is currently open. This method MUST be sincere in that it asks the server about its state! (some apps use it to override timeout)- Specified by:
isOpenTAin interfaceRasImplementationInterface
-
commitTA
public void commitTA()Commit a transaction.- Specified by:
commitTAin interfaceRasImplementationInterface
-
abortTA
public void abortTA()Abort a transaction.- Specified by:
abortTAin interfaceRasImplementationInterface
-
setMaxRetry
public void setMaxRetry(int newRetry) Set the maximum retry parameter- Specified by:
setMaxRetryin interfaceRasImplementationInterface
-
getMaxRetry
public int getMaxRetry()Get the maximum retry parameter- Specified by:
getMaxRetryin interfaceRasImplementationInterface
-
getFreeServer
Requests a free server and retry's -
queryRequest
- Specified by:
queryRequestin interfaceRasImplementationInterface- Throws:
RasQueryExecutionFailedException
-
getTypeStructure
- Specified by:
getTypeStructurein interfaceRasImplementationInterface
-
getResultCode
- Throws:
IOException
-
getBodyLine
- Throws:
IOException
-
setUserIdentification
- Specified by:
setUserIdentificationin interfaceRasImplementationInterface
-
setUserIdentificationHashed
- Specified by:
setUserIdentificationHashedin interfaceRasImplementationInterface
-
connectClient
- Specified by:
connectClientin interfaceRasImplementationInterface
-
disconnectClient
public void disconnectClient()- Specified by:
disconnectClientin interfaceRasImplementationInterface
-