Package rasj

Class RasImplementation

java.lang.Object
rasj.RasImplementation
All Implemented Interfaces:
Implementation

public class RasImplementation extends 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 Details

  • Constructor Details

    • RasImplementation

      public RasImplementation(String server)
      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

      public Transaction newTransaction()
      Description copied from interface: Implementation
      Create a Transaction object and associate it with the current thread.
      Specified by:
      newTransaction in interface Implementation
      Returns:
      The newly created Transaction instance.
      See Also:
    • currentTransaction

      public Transaction currentTransaction()
      Get current transaction for thread, or NULL if none.
      Specified by:
      currentTransaction in interface Implementation
      Returns:
      The current Transaction object or null if there is none.
      See Also:
    • newDatabase

      public Database newDatabase()
      Create a new database object.
      Specified by:
      newDatabase in interface Implementation
      Returns:
      The new Database object.
      See Also:
    • newOQLQuery

      public OQLQuery newOQLQuery()
      Create a new query object.
      Specified by:
      newOQLQuery in interface Implementation
      Returns:
      The new OQLQuery object.
      See Also:
    • newDList

      public DList newDList()
      Create a new DList object.
      Specified by:
      newDList in interface Implementation
      Returns:
      The new DList object.
      See Also:
    • newDBag

      public DBag newDBag()
      Create a new DBag object.
      Specified by:
      newDBag in interface Implementation
      Returns:
      The new DBag object.
      See Also:
    • newDSet

      public DSet newDSet()
      Create a new DSet object.
      Specified by:
      newDSet in interface Implementation
      Returns:
      The new DSet object.
      See Also:
    • newDArray

      public DArray newDArray()
      Not implemented yet.
      Specified by:
      newDArray in interface Implementation
      Returns:
      The new DArray object.
      See Also:
    • newDMap

      public DMap newDMap()
      Not implemented yet.
      Specified by:
      newDMap in interface Implementation
      Returns:
      The new DMap object.
      See Also:
    • getObjectId

      public String getObjectId(Object obj)
      Get a String representation of the object's identifier.
      Specified by:
      getObjectId in interface Implementation
      Parameters:
      obj - The object whose identifier is being accessed.
      Returns:
      The object's identifier in the form of a String
    • getDatabase

      public Database getDatabase(Object obj)
      Not implemented yet.
      Specified by:
      getDatabase in interface Implementation
      Parameters:
      obj - The object.
      Returns:
      The Database that contains the object.
    • openDB

      public void openDB(String name, int accessMode) throws ODMGException
      Open database
      Throws:
      ODMGException
    • closeDB

      public void closeDB() throws ODMGException
      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

      public void beginTA() throws ODMGException
      Begin a transaction.
      Throws:
      ODMGException
    • isOpenTA

      public boolean isOpenTA() throws ODMGException
      Returns TRUE if a transaction is currently open.
      Throws:
      ODMGException
    • commitTA

      public void commitTA() throws ODMGException
      Commit a transaction.
      Throws:
      ODMGException
    • abortTA

      public void abortTA() throws ODMGException
      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

      public void setUserIdentification(String userName, String plainPass)
      Set user identification : name/plain password (default is rasguest/rasguest)
    • setUserIdentificationHashed

      public void setUserIdentificationHashed(String userName, String passwordMD5Hash)
      Set user identification : name/md5 hashed password
    • connectClient

      public void connectClient(String userName, 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 String getTypeStructure(String typename, int typetype)