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

java.lang.Object
  extended by org.apache.tuscany.das.rdb.impl.DASImpl
All Implemented Interfaces:
DAS

public class DASImpl
extends java.lang.Object
implements DAS

An ConfiguredCommandFactory produces instances of Command and ApplyChangesCommand. This factory is initialized with a configuration that defines the commands it produces.


Field Summary
 
Fields inherited from interface org.apache.tuscany.das.rdb.DAS
FACTORY
 
Constructor Summary
DASImpl(Config inConfig)
           
DASImpl(Config inConfig, java.sql.Connection inConnection)
           
DASImpl(java.sql.Connection inConnection)
           
DASImpl(java.io.InputStream stream)
           
DASImpl(java.io.InputStream configStream, java.sql.Connection inConnection)
           
 
Method Summary
 void applyChanges(commonj.sdo.DataObject root)
          The change history is scanned and modifications to the graph of data objects are flushed to the database.
 Command createCommand(java.lang.String sql)
          Creates a Command based on the provided SQL statement
 Command createCommand(java.lang.String sql, Config config)
           
 ApplyChangesCommandImpl getApplyChangesCommand()
           
 Command getCommand(java.lang.String name)
          Gets the named command from this factory's inventory
 java.sql.Connection getConnection()
           
 void releaseResources()
          If the CommandGroup is managing connections then this method must be called when the client is done with the instance.
 void setConnection(java.sql.Connection connection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DASImpl

public DASImpl(java.io.InputStream stream)

DASImpl

public DASImpl(Config inConfig)

DASImpl

public DASImpl(Config inConfig,
               java.sql.Connection inConnection)

DASImpl

public DASImpl(java.io.InputStream configStream,
               java.sql.Connection inConnection)

DASImpl

public DASImpl(java.sql.Connection inConnection)
Method Detail

getApplyChangesCommand

public ApplyChangesCommandImpl getApplyChangesCommand()

getCommand

public Command getCommand(java.lang.String name)
Description copied from interface: DAS
Gets the named command from this factory's inventory

Specified by:
getCommand in interface DAS
Parameters:
name - The identifying name of the requested command
Returns:
Returns the identified command

setConnection

public void setConnection(java.sql.Connection connection)

getConnection

public java.sql.Connection getConnection()

releaseResources

public void releaseResources()
Description copied from interface: DAS
If the CommandGroup is managing connections then this method must be called when the client is done with the instance.

Specified by:
releaseResources in interface DAS

createCommand

public Command createCommand(java.lang.String sql)
Description copied from interface: DAS
Creates a Command based on the provided SQL statement

Specified by:
createCommand in interface DAS
Parameters:
sql - The SQL statement
Returns:
returns a Command instance

createCommand

public Command createCommand(java.lang.String sql,
                             Config config)

applyChanges

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

Specified by:
applyChanges in interface DAS
Parameters:
root - the topmost containing data object


Copyright © 2007 Apache Software Foundation. All Rights Reserved.