Universalis oad.reflect -- RefSession RefObject RefBase

Interface RefSession

Method Index

Methods

General

  • open

  •   void open()
    Opens the session on a database (the database identifier has to be provided in the constructor).

  • close

  •   void close()
    Calls the method flush() and close the session.

  • flush

  •   void flush()
    Flush all the changes that were made in the database. It is automatically called when the session is normally closed. It can be called explicitely.

  • getBase

  •   RefBase getBase()
    Returns the RefBase instance that was created when the session was opened. This instance holds all the database configuration parameters.

    Object Management

  • loadObject

  •   void loadObject(String oid, int flags)
      loadObject(String oid)
    Load into the the memory the instance registered under the given oid.

  • registerObjectAs

  •   registerObjectAs(RefObject obj,String oid)
      registerObjectAs(RefObject obj,String oid,int flags)
    Register an object under the given oid. All sub-objects are automatically registered with the object.

  • isRegisteredObject

  •   boolean isRegisteredObject(String oid)
    Returns true if there is an object instance registered with the given oid.

    Context Management

  • createContext

  •   void createContext(String contextoid,int flags)
      void createContext(String contextoid)
    Create a new context (directory). If the optional flag is passed an contains the value IFNEEDED, no error will be issued if the context already exists.

  • loadContext

  •   void loadContext(String contextoid, int flags)
      loadContext(String contextoid)
    Load into the the memory all the instances registered under the given context. An optional flag parameter allow loading recursively any object registered under the given context and all its sub-contexts.

  • isRegisteredContext

  •   isRegisteredContext(String contextoid)
    Returns true if there is an existing context created with the given oid.

  • listObjectNames

  •   Enumeration listObjectNames(String ctxoid)
    Returns an enumeration of all the local identifiers registered under the given context oid.

  • listSubContextNames

  •   Enumeration listSubObjectNames(String ctxoid)
    Returns an enumeration of all the sub-contexts registered under the given context oid.

    Miscelaneous

  • genNewOid

  •   genNewOid(String contextoid,String id)
    Returns and computes automatically an unregistered oid on the basis of the context oid and the local identifier. Underscore characters may be placed as a suffix to avoid conflict with an existing OID.