org.tentackle.appworx
Class AppDbOperation

java.lang.Object
  extended by org.tentackle.db.DbOperation
      extended by org.tentackle.appworx.AppDbOperation

public class AppDbOperation
extends DbOperation

A AppDbOperation provides methods that are not part of AppDbObjects and is associated to a ContextDb. Complex transactions are usually AppDbOperations. AppDbOperations are remote capabable.

Author:
harald

Constructor Summary
AppDbOperation(ContextDb contextDb)
          Creates a db operation from a database context.
AppDbOperation(Db db)
          Creates a db operation from a db connection.
 
Method Summary
 ContextDb getContextDb()
          Gets the database context.
 void setContextDb(ContextDb contextDb)
          Sets the database context.
 void setDb(Db db)
          Sets the logical db connection for this operation.
 
Methods inherited from class org.tentackle.db.DbOperation
getDb, getRemoteDelegate, getRemoteDelegate, getRemoteDelegateId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppDbOperation

public AppDbOperation(ContextDb contextDb)
Creates a db operation from a database context.

Parameters:
contextDb - the database context

AppDbOperation

public AppDbOperation(Db db)
Creates a db operation from a db connection. This constructor is used in the RemoteDelegate if the construction by the default ContextDb has failed. In such cases methods of this AppDbOperation must get the contextDb as an argument.

Parameters:
db - the logical db connection
Method Detail

setDb

public void setDb(Db db)
Sets the logical db connection for this operation.

Overridden to set the Db in ContextDb as well.

Overrides:
setDb in class DbOperation
Parameters:
db - the db connection

setContextDb

public void setContextDb(ContextDb contextDb)
Sets the database context.

Parameters:
contextDb - the context

getContextDb

public ContextDb getContextDb()
Gets the database context.

Returns:
the database context


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de