org.apache.tuscany.das.rdb.impl
Class CommandImpl
java.lang.Object
org.apache.tuscany.das.rdb.impl.BaseCommandImpl
org.apache.tuscany.das.rdb.impl.CommandImpl
- All Implemented Interfaces:
- Command
- Direct Known Subclasses:
- ReadCommandImpl, WriteCommandImpl
public abstract class CommandImpl
- extends BaseCommandImpl
- implements Command
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
statement
protected Statement statement
parameters
protected ParametersExtendedImpl parameters
resultSetShape
protected ResultSetShape resultSetShape
CommandImpl
public CommandImpl(java.lang.String sqlString)
CommandImpl
public CommandImpl(Command command)
execute
public abstract void execute()
- Description copied from interface:
Command
- Performs the function defined by the command
- Specified by:
execute
in interface Command
executeQuery
public abstract commonj.sdo.DataObject executeQuery()
- Description copied from interface:
Command
- Performs the function defined by the command and return the results in the root DataObject
- Specified by:
executeQuery
in interface Command
- Returns:
- the root DataObject
setParameter
public void setParameter(int index,
java.lang.Object value)
- Description copied from interface:
Command
- Sets the value of the associated Parameter
- Specified by:
setParameter
in interface Command
- Parameters:
index
- the index of the Parametervalue
- the value for the Parameter
addParameter
public void addParameter(ParameterExtendedImpl param)
getParameters
public java.util.List getParameters()
getParameter
public java.lang.Object getParameter(int index)
- Description copied from interface:
Command
- Returns the value of the associated Parameter
- Specified by:
getParameter
in interface Command
- Parameters:
index
- the index of the Parameter
- Returns:
- the value of the Parameter
setConnection
public void setConnection(ConnectionImpl connection)
- Specified by:
setConnection
in class BaseCommandImpl
getConnection
protected ConnectionImpl getConnection()
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
- Returns:
- the generated key
close
public void close()
setParameter
public void setParameter(java.lang.String name,
java.lang.Object value)
- Specified by:
setParameter
in interface Command
- Parameters:
name
- Name of parameter - should match exact name of database table column
as appearing in Commandvalue
- the value of the parameter
getParameter
public java.lang.Object getParameter(java.lang.String name)
- Specified by:
getParameter
in interface Command
- Parameters:
name
- the name of the parameter - should match exact name of database table column
- Returns:
- the value of the parameter
Copyright © 2007 Apache Software Foundation. All Rights Reserved.