Class MockPersistentOperation<T extends org.tentackle.pdo.Operation<T>>

  • Type Parameters:
    T - the pdo type
    All Implemented Interfaces:
    java.io.Serializable, org.tentackle.pdo.DomainContextDependable, org.tentackle.pdo.DomainContextProvider, org.tentackle.pdo.OperationHolder<T>, org.tentackle.pdo.PersistenceDelegate<T>, org.tentackle.pdo.PersistentOperation<T>, org.tentackle.pdo.ProxyDelegate<T>, org.tentackle.reflect.Interceptable, org.tentackle.session.SessionDependable, org.tentackle.session.SessionProvider

    public class MockPersistentOperation<T extends org.tentackle.pdo.Operation<T>>
    extends java.lang.Object
    implements org.tentackle.pdo.PersistentOperation<T>
    A mocked persistence object.
    Author:
    harald
    See Also:
    Serialized Form
    • Constructor Detail

      • MockPersistentOperation

        public MockPersistentOperation​(T operation,
                                       org.tentackle.pdo.DomainContext context)
        Creates an operation object.
        Parameters:
        operation - the operation object this is a delegate for
        context - the database context
      • MockPersistentOperation

        public MockPersistentOperation​(T operation,
                                       org.tentackle.session.Session session)
        Creates an operation object without a domain context for a given connection.

        Note: the application must set the context.

        Parameters:
        operation - the operation object this is a delegate for
        session - the session (must be an instance of Session).
      • MockPersistentOperation

        public MockPersistentOperation​(T operation)
        Creates an operation object without a database context.

        Note: the application must set the context.

        Parameters:
        operation - the operation object this is a delegate for
      • MockPersistentOperation

        public MockPersistentOperation()
        Creates an operation object without a database context.
    • Method Detail

      • setSessionImmutable

        public void setSessionImmutable​(boolean sessionImmutable)
        Specified by:
        setSessionImmutable in interface org.tentackle.session.SessionDependable
      • isSessionImmutable

        public boolean isSessionImmutable()
        Specified by:
        isSessionImmutable in interface org.tentackle.session.SessionDependable
      • setSession

        public void setSession​(org.tentackle.session.Session session)
        Specified by:
        setSession in interface org.tentackle.session.SessionDependable
      • getSession

        public org.tentackle.session.Session getSession()
        Specified by:
        getSession in interface org.tentackle.session.SessionProvider
      • getDomainContext

        public org.tentackle.pdo.DomainContext getDomainContext()
        Specified by:
        getDomainContext in interface org.tentackle.pdo.DomainContextProvider
      • setDomainContext

        public void setDomainContext​(org.tentackle.pdo.DomainContext context)
        Specified by:
        setDomainContext in interface org.tentackle.pdo.DomainContextDependable
      • determineContextId

        public void determineContextId()
        Specified by:
        determineContextId in interface org.tentackle.pdo.DomainContextDependable
      • getContextId

        public long getContextId()
        Specified by:
        getContextId in interface org.tentackle.pdo.DomainContextDependable
      • getBaseContext

        public org.tentackle.pdo.DomainContext getBaseContext()
        Specified by:
        getBaseContext in interface org.tentackle.pdo.DomainContextDependable
      • createValidContext

        public org.tentackle.pdo.DomainContext createValidContext()
        Specified by:
        createValidContext in interface org.tentackle.pdo.DomainContextDependable
      • isDomainContextImmutable

        public boolean isDomainContextImmutable()
        Specified by:
        isDomainContextImmutable in interface org.tentackle.pdo.DomainContextDependable
      • setDomainContextImmutable

        public void setDomainContextImmutable​(boolean contextImmutable)
        Specified by:
        setDomainContextImmutable in interface org.tentackle.pdo.DomainContextDependable
      • getOperation

        public T getOperation()
        Specified by:
        getOperation in interface org.tentackle.pdo.OperationHolder<T extends org.tentackle.pdo.Operation<T>>
      • me

        public T me()
        Specified by:
        me in interface org.tentackle.pdo.ProxyDelegate<T extends org.tentackle.pdo.Operation<T>>
      • setOperation

        public void setOperation​(T operation)
        Specified by:
        setOperation in interface org.tentackle.pdo.OperationHolder<T extends org.tentackle.pdo.Operation<T>>
      • getDomainDelegate

        public org.tentackle.pdo.DomainDelegate<T> getDomainDelegate()
        Specified by:
        getDomainDelegate in interface org.tentackle.pdo.PersistenceDelegate<T extends org.tentackle.pdo.Operation<T>>