Package org.tentackle.pdo.mock
Class MockPersistentOperation<T extends Operation<T>>
java.lang.Object
org.tentackle.pdo.mock.MockPersistentOperation<T>
- Type Parameters:
T- the pdo type
- All Implemented Interfaces:
Serializable,DomainContextDependable,DomainContextProvider,OperationMethodCacheProvider<T>,OperationProvider<T>,PersistenceDelegate<T>,PersistentOperation<T>,ProxyDelegate<T>,org.tentackle.reflect.Interceptable,org.tentackle.session.SessionDependable,org.tentackle.session.SessionProvider
public class MockPersistentOperation<T extends Operation<T>>
extends Object
implements PersistentOperation<T>, OperationMethodCacheProvider<T>
A mocked persistence object.
- Author:
- harald
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an operation object without a database context.MockPersistentOperation(T operation) Creates an operation object without a database context.MockPersistentOperation(T operation, DomainContext context) Creates an operation object.MockPersistentOperation(T operation, org.tentackle.session.Session session) Creates an operation object without a domain context for a given connection. -
Method Summary
Modifier and TypeMethodDescriptionvoidlongorg.tentackle.session.Sessionbooleanbooleanme()voidsetDomainContext(DomainContext context) voidsetDomainContextImmutable(boolean contextImmutable) voidsetOperation(T operation) Sets the operation.voidsetSession(org.tentackle.session.Session session) voidsetSessionImmutable(boolean sessionImmutable) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tentackle.pdo.DomainContextProvider
isWithinContext, isWithinContext, on, on, op, opMethods inherited from interface org.tentackle.pdo.OperationProvider
op, op
-
Constructor Details
-
MockPersistentOperation
Creates an operation object.- Parameters:
operation- the operation object this is a delegate forcontext- the database context
-
MockPersistentOperation
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 forsession- the session (must be an instance ofSession).
-
MockPersistentOperation
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 Details
-
getOperationMethodCache
- Specified by:
getOperationMethodCachein interfaceOperationMethodCacheProvider<T extends Operation<T>>
-
setSessionImmutable
public void setSessionImmutable(boolean sessionImmutable) - Specified by:
setSessionImmutablein interfaceorg.tentackle.session.SessionDependable
-
isSessionImmutable
public boolean isSessionImmutable()- Specified by:
isSessionImmutablein interfaceorg.tentackle.session.SessionDependable
-
setSession
public void setSession(org.tentackle.session.Session session) - Specified by:
setSessionin interfaceorg.tentackle.session.SessionDependable
-
getSession
public org.tentackle.session.Session getSession()- Specified by:
getSessionin interfaceorg.tentackle.session.SessionProvider
-
getDomainContext
- Specified by:
getDomainContextin interfaceDomainContextProvider
-
setDomainContext
- Specified by:
setDomainContextin interfaceDomainContextDependable
-
determineContextId
public void determineContextId()- Specified by:
determineContextIdin interfaceDomainContextDependable
-
getContextId
public long getContextId()- Specified by:
getContextIdin interfaceDomainContextDependable
-
getBaseContext
- Specified by:
getBaseContextin interfaceDomainContextDependable
-
createValidContext
- Specified by:
createValidContextin interfaceDomainContextDependable
-
isDomainContextImmutable
public boolean isDomainContextImmutable()- Specified by:
isDomainContextImmutablein interfaceDomainContextDependable
-
setDomainContextImmutable
public void setDomainContextImmutable(boolean contextImmutable) - Specified by:
setDomainContextImmutablein interfaceDomainContextDependable
-
getOperation
- Specified by:
getOperationin interfaceOperationProvider<T extends Operation<T>>
-
me
- Specified by:
mein interfaceProxyDelegate<T extends Operation<T>>
-
setOperation
Sets the operation.- Parameters:
operation- the operation
-
getDomainDelegate
- Specified by:
getDomainDelegatein interfacePersistenceDelegate<T extends Operation<T>>
-