Tuscany DAS for Relational Databases

org.apache.tuscany.das.rdb.impl
Class ApplyChangesCommandImpl

java.lang.Object
  extended by org.apache.tuscany.das.rdb.impl.BaseCommandImpl
      extended by org.apache.tuscany.das.rdb.impl.ApplyChangesCommandImpl
All Implemented Interfaces:
ApplyChangesCommand

public class ApplyChangesCommandImpl
extends BaseCommandImpl
implements ApplyChangesCommand


Field Summary
 
Fields inherited from class org.apache.tuscany.das.rdb.impl.BaseCommandImpl
configWrapper
 
Constructor Summary
ApplyChangesCommandImpl()
           
ApplyChangesCommandImpl(Config config)
           
ApplyChangesCommandImpl(Config config, java.sql.Connection connection)
           
 
Method Summary
 void addCreateCommand(commonj.sdo.Type type, Command cmd)
          Adds a user-provided create command.
 void addDeleteCommand(commonj.sdo.Type type, Command cmd)
          Adds a user-provided delete command.
 void addUpdateCommand(commonj.sdo.Type type, Command cmd)
          Adds a user-provided update command.
 void execute(commonj.sdo.DataObject root)
          The change history is scanned and modifications to the graph of data objects are flushed to the database.
 void setConnection(ConnectionImpl connection)
           
 void setConnection(ConnectionProperties c)
           
 
Methods inherited from class org.apache.tuscany.das.rdb.impl.BaseCommandImpl
addCollisionColumn, addConverter, addGeneratedPrimaryKey, addPrimaryKey, addPrimaryKey, addRelationship, addRelationship, setConnection, setConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tuscany.das.rdb.ApplyChangesCommand
setConnection, setConnection
 

Constructor Detail

ApplyChangesCommandImpl

public ApplyChangesCommandImpl()

ApplyChangesCommandImpl

public ApplyChangesCommandImpl(Config config)

ApplyChangesCommandImpl

public ApplyChangesCommandImpl(Config config,
                               java.sql.Connection connection)
Method Detail

setConnection

public void setConnection(ConnectionImpl connection)
Specified by:
setConnection in class BaseCommandImpl

setConnection

public void setConnection(ConnectionProperties c)

addCreateCommand

public void addCreateCommand(commonj.sdo.Type type,
                             Command cmd)
Description copied from interface: ApplyChangesCommand
Adds a user-provided create command. In the absence of a user-provided command, the DAS will generate one. However this alternative may make sense if the user requires a SQL statement different from what the DAS generates.

Specified by:
addCreateCommand in interface ApplyChangesCommand
Parameters:
type - The DataObject type this command applys to
cmd - The Command used to INSERT data objects of the specified type

addUpdateCommand

public void addUpdateCommand(commonj.sdo.Type type,
                             Command cmd)
Description copied from interface: ApplyChangesCommand
Adds a user-provided update command. In the absence of a user-provided command, the DAS will generate one. However this alternative may make sense if the user requires a SQL statement different from what the DAS generates.

Specified by:
addUpdateCommand in interface ApplyChangesCommand
Parameters:
type - The DataObject type this command applys to
cmd - The Command used to UPDATE data objects of the specified type

addDeleteCommand

public void addDeleteCommand(commonj.sdo.Type type,
                             Command cmd)
Description copied from interface: ApplyChangesCommand
Adds a user-provided delete command. In the absence of a user-provided command, the DAS will generate one. However this alternative may make sense if the user requires a SQL statement different from what the DAS generates.

Specified by:
addDeleteCommand in interface ApplyChangesCommand
Parameters:
type - The DataObject type this command applys to
cmd - The Command used to DELETE data objects of the specified type

execute

public void execute(commonj.sdo.DataObject root)
Description copied from interface: ApplyChangesCommand
The change history is scanned and modifications to the graph of data objects are flushed to the database.

Specified by:
execute in interface ApplyChangesCommand
Parameters:
root - the topmost containing data object

Tuscany DAS for Relational Databases

-