Interface IDatabase

  • All Known Implementing Classes:
    XmlDatabase

    public interface IDatabase
    Interface that is implemented by Database wrappers
    • Method Detail

      • init

        void init​(java.io.File dbHome,
                  Application app)
        Initialize the database with the given db directory and application.
        Parameters:
        dbHome -
        app -
      • shutdown

        void shutdown()
        Let the database know we're shutting down.
      • getNode

        INode getNode​(ITransaction transaction,
                      java.lang.String key)
               throws java.io.IOException,
                      ObjectNotFoundException
        Get the node from the database specified by the given key.
        Parameters:
        transaction -
        key -
        Returns:
        Throws:
        java.io.IOException
        ObjectNotFoundException - if no object exists for the key.
      • insertNode

        void insertNode​(ITransaction transaction,
                        java.lang.String key,
                        INode node)
                 throws java.io.IOException
        Insert a node with the given key
        Parameters:
        transaction -
        key -
        node -
        Throws:
        java.io.IOException
      • updateNode

        void updateNode​(ITransaction transaction,
                        java.lang.String key,
                        INode node)
                 throws java.io.IOException
        Update a node with the given key
        Parameters:
        transaction -
        key -
        node -
        Throws:
        java.io.IOException
      • deleteNode

        void deleteNode​(ITransaction transaction,
                        java.lang.String key)
                 throws java.io.IOException
        Delete the node specified by the given key.
        Parameters:
        transaction - ...
        key - ...
        Throws:
        java.io.IOException - ...
      • beginTransaction

        ITransaction beginTransaction()
        Begin a new transaction.
        Returns:
        the transaction