Package rasj

Class 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.
    • 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
      void abortTA()
      Abort a transaction.
      void beginTA()
      Begin a transaction.
      void closeDB()
      Closes an open database.
      void commitTA()
      Commit a transaction.
      void connectClient​(java.lang.String userName, java.lang.String passwordHash)
      Connect as a new client with the given userName and md5 encoded password.
      Transaction currentTransaction()
      Get current transaction for thread, or NULL if none.
      int dbIsOpen()
      returns 1 if an openDB command is executed (closeDB sets it back to 0).
      void disconnectClient()
      Disconnect as a client from rasmgr.
      Database getDatabase​(java.lang.Object obj)
      Not implemented yet.
      int getMaxRetry()
      Get the maximum retry parameter
      java.lang.String getObjectId​(java.lang.Object obj)
      Get a String representation of the object's identifier.
      java.lang.String getTypeStructure​(java.lang.String typename, int typetype)  
      boolean isOpenTA()
      Returns TRUE if a transaction is currently open.
      DArray newDArray()
      Not implemented yet.
      Database newDatabase()
      Create a new database object.
      DBag newDBag()
      Create a new DBag object.
      DList newDList()
      Create a new DList object.
      DMap newDMap()
      Not implemented yet.
      DSet newDSet()
      Create a new DSet object.
      OQLQuery newOQLQuery()
      Create a new query object.
      Transaction newTransaction()
      Create a Transaction object and associate it with the current thread.
      void openDB​(java.lang.String name, int accessMode)
      Open database
      void setMaxRetry​(int newRetry)
      Set the maximum retry parameter
      void setTraceThreshold​(int level)
      Set trace output threshold (0 = minimal, 4 = verbose; 1 = default)
      void setUserIdentification​(java.lang.String userName, java.lang.String plainPass)
      Set user identification : name/plain password (default is rasguest/rasguest)
      void setUserIdentificationHashed​(java.lang.String userName, java.lang.String passwordMD5Hash)
      Set user identification : name/md5 hashed password
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RasImplementation

        public RasImplementation​(java.lang.String server)
        Standard constructor.
        Parameters:
        server - - Complete URL of the RasDaMan httpserver (including port number)
    • Method Detail

      • dbIsOpen

        public int dbIsOpen()
        returns 1 if an openDB command is executed (closeDB sets it back to 0).
      • newDList

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

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

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

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

        public java.lang.String getObjectId​(java.lang.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​(java.lang.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​(java.lang.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
      • isOpenTA

        public boolean isOpenTA()
                         throws ODMGException
        Returns TRUE if a transaction is currently open.
        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)