Package edm.edom3

Interface EDMLocalContext

  • All Superinterfaces:
    EDMContext

    public interface EDMLocalContext
    extends EDMContext
    Supplies methods for the "single-user" and "fat client" LOCAL context
    • Method Detail

      • getDebug

        EDMDebug getDebug()
        Get the Debug interface for this context
        Returns:
        current UserSession, null if none assigned
      • reserveContext

        EDMTransaction reserveContext()
                               throws EdmiException
        Reserve EDMI for this context. No EDMI data manipulation calls are possible until context reserved
        Returns:
        the root (virtual) transaction
        Throws:
        EdmiException - if context reserved or impossible to reserve
      • reserveContext

        EDMTransaction reserveContext​(long maxWaitMilliseconds)
                               throws EdmiException
        Reserve EDMI for this context. No EDMI data manipulation calls are possible until context reserved
        Parameters:
        maxWaitMilliseconds - max # milliseconds to wait for context. If < 0 use default. If 0 wait indefinitely.
        Returns:
        the root (virtual) transaction
        Throws:
        EdmiException - if context reserved or impossible to reserve
      • releaseContext

        void releaseContext()
                     throws EdmiException
        release EDMI form this context making EDMI avaiable for others.
        Throws:
        EdmiException - if context busy or not reserved
      • isReserved

        boolean isReserved()
        Check if this context has reserved EDMI
        Returns:
        true if EDMI reserved to this context.
      • startReadTransaction

        void startReadTransaction()
                           throws EdmiException
        Start (open) a new read transaction.
        Throws:
        EdmiException - If the method fails, or if the repository filter are unset.
      • startWriteTransaction

        void startWriteTransaction​(EDMModel model)
                            throws EdmiException
        Start (open) a new write transaction on a single model.
        Parameters:
        model - model to reserve write access for
        Throws:
        EdmiException - If the method fails, or if the repository filter are unset.
      • startWriteTransaction

        void startWriteTransaction​(EDMModel[] models)
                            throws EdmiException
        Start (open) a new write transaction on multiple models.
        Parameters:
        models - models to reserve write access for
        Throws:
        EdmiException - If the method fails, or if the repository filter are unset.
      • commitTransaction

        void commitTransaction()
                        throws EdmiException
        Commit (and close) current open transactions.
        Throws:
        EdmiException - If the method fails, or if the repository filter are unset.
      • commitAllTransactions

        void commitAllTransactions()
                            throws EdmiException
        Commit (and close) all open transactions.
        Throws:
        EdmiException - If the method fails, or if the repository filter are unset.
      • abortTransaction

        void abortTransaction()
                       throws EdmiException
        Abort (and close) current open transaction.
        Throws:
        EdmiException - If the method fails, or if the repository filter is unset.
      • abortAllTransactions

        void abortAllTransactions()
                           throws EdmiException
        Abort (and close) all open transactions.
        Throws:
        EdmiException - If the method fails, or if the repository filter is unset.
      • getActiveTransaction

        EDMTransaction getActiveTransaction()
        Get the current active transaction
        Returns:
        active transaction, null if not found
      • refreshInternalData

        void refreshInternalData()
                          throws EdmiException
        Refresh stored internal data from DB
        Throws:
        EdmiException - if the method fails