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

java.lang.Object
  extended by org.apache.tuscany.das.rdb.impl.BaseCommandImpl
      extended by org.apache.tuscany.das.rdb.impl.CommandImpl
          extended by org.apache.tuscany.das.rdb.impl.WriteCommandImpl
              extended by org.apache.tuscany.das.rdb.impl.InsertCommandImpl
All Implemented Interfaces:
Command

public class InsertCommandImpl
extends WriteCommandImpl


Field Summary
 
Fields inherited from class org.apache.tuscany.das.rdb.impl.CommandImpl
parameters, resultSetShape, statement
 
Fields inherited from class org.apache.tuscany.das.rdb.impl.BaseCommandImpl
configWrapper
 
Constructor Summary
InsertCommandImpl(Command command, java.lang.String[] generatedKeys)
           
InsertCommandImpl(Create create)
           
InsertCommandImpl(java.lang.String sqlString, java.lang.String[] generatedKeys)
           
 
Method Summary
 void execute()
          Performs the function defined by the command
 int getGeneratedKey()
          Returns the value of the database-generated key.
 
Methods inherited from class org.apache.tuscany.das.rdb.impl.WriteCommandImpl
addParameters, addResultDescriptor, basicExecute, executeQuery, getMappingModel, getResultDescriptor, getResultDescriptors, printResultDescriptors, removeResultDescriptor, removeResultDescriptor, setResultDescriptors, toString
 
Methods inherited from class org.apache.tuscany.das.rdb.impl.CommandImpl
addParameter, close, getConnection, getParameter, getParameter, getParameters, setConnection, setParameter, setParameter
 
Methods inherited from class org.apache.tuscany.das.rdb.impl.BaseCommandImpl
setConnection, setConnection, setConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InsertCommandImpl

public InsertCommandImpl(Command command,
                         java.lang.String[] generatedKeys)

InsertCommandImpl

public InsertCommandImpl(java.lang.String sqlString,
                         java.lang.String[] generatedKeys)

InsertCommandImpl

public InsertCommandImpl(Create create)
Method Detail

execute

public void execute()
Description copied from interface: Command
Performs the function defined by the command

Specified by:
execute in interface Command
Overrides:
execute in class WriteCommandImpl

getGeneratedKey

public int getGeneratedKey()
Description copied from interface: Command
Returns the value of the database-generated key. This method is specific to an "insert" command and will be valid only after the command has been executed.

Specified by:
getGeneratedKey in interface Command
Overrides:
getGeneratedKey in class WriteCommandImpl
Returns:
the generated key


Copyright © 2007 Apache Software Foundation. All Rights Reserved.