P - the operation class typepublic abstract class AbstractDbOperation<P extends AbstractDbOperation<P>> extends Object implements SessionDependable, Cloneable, Serializable
AbstractDbOperation provides methods that are not part of AbstractDbObjects
and is associated to a Db-session. Complex transactions are usually
AbstractDbOperations. AbstractDbOperations are remote capabable.| Constructor and Description |
|---|
AbstractDbOperation()
Creates a database object not associated to a logical
Db-connection. |
AbstractDbOperation(Db session)
Creates a database object.
|
| Modifier and Type | Method and Description |
|---|---|
P |
clone()
Clones the operation object.
|
DbOperationClassVariables<P> |
getClassVariables()
Gets the some attributes and variables common to all objects of the same class.
|
org.tentackle.persist.rmi.AbstractDbOperationRemoteDelegate<P> |
getRemoteDelegate()
Gets the delegate for remote connections.
Each class has its own delegate. |
Db |
getSession()
Get the logical db connection for this object.
|
SessionHolder |
getSessionHolder()
Gets the session holder.
|
boolean |
isSessionImmutable()
Returns whether the db is immutable.
|
void |
setSession(Session session)
Sets the logical db connection for this object.
|
void |
setSessionHolder(SessionHolder sessionHolder)
Sets the session holder for this object.
|
void |
setSessionImmutable(boolean sessionImmutable)
Sets the db to immutable.
|
public AbstractDbOperation(Db session)
session - the logical Db-connectionpublic AbstractDbOperation()
Db-connection.
The connection must be set via setSession(org.tentackle.pdo.Session) in order to use it.public P clone()
public DbOperationClassVariables<P> getClassVariables()
AbstractDbOperation are kept in an
instance of DbOperationClassVariables.public void setSessionHolder(SessionHolder sessionHolder)
If a holder is set, getSession() will return the session from the holder.
sessionHolder - the session holderpublic SessionHolder getSessionHolder()
public void setSessionImmutable(boolean sessionImmutable)
setSessionImmutable in interface SessionDependablesessionImmutable - true if db cannot be changed anymorepublic boolean isSessionImmutable()
isSessionImmutable in interface SessionDependablepublic void setSession(Session session)
setSession in interface SessionDependablesession - the sessionpublic Db getSession()
getSession in interface SessionProviderpublic org.tentackle.persist.rmi.AbstractDbOperationRemoteDelegate<P> getRemoteDelegate()
Copyright © 2016 Krake Softwaretechnik. All rights reserved.