|
Tuscany DAS for Relational Databases | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tuscany.das.rdb.impl.BaseCommandImpl
org.apache.tuscany.das.rdb.impl.CommandImpl
public abstract class CommandImpl
Field Summary | |
---|---|
protected static boolean |
debug
|
protected Parameters |
parameters
|
protected ResultSetShape |
resultSetShape
|
protected Statement |
statement
|
Fields inherited from class org.apache.tuscany.das.rdb.impl.BaseCommandImpl |
---|
configWrapper |
Fields inherited from interface org.apache.tuscany.das.rdb.Command |
---|
FACTORY |
Constructor Summary | |
---|---|
CommandImpl(String sqlString)
|
Method Summary | |
---|---|
void |
addParameter(int index,
int direction,
Type sdoType)
Adds a Parameter to the command |
void |
addParameter(int index,
Type sdoType)
Adds a Parameter to the command |
void |
addParameter(Parameter param)
|
void |
addParameter(String name,
int direction,
Type sdoType)
Adds a Parameter to the command |
void |
addParameter(String name,
Type sdoType)
Adds a Parameter to the command |
void |
close()
Cleans up and realeases all resources associated with this command. |
abstract void |
execute()
Performs the function defined by the command |
abstract DataObject |
executeQuery()
Performs the function defined by the command and return the results in the root DataObject |
protected ConnectionImpl |
getConnection()
|
Parameter |
getParameter(int index)
Returns the Parameter at index |
Parameter |
getParameter(String name)
Returns the parameter associated with "name" |
List |
getParameters()
|
Object |
getParameterValue(int index)
Returns the value of the associated Parameter |
Object |
getParameterValue(String name)
Returns the value of the associated Parameter |
void |
setConnection(ConnectionImpl connection)
|
void |
setParameterType(int index,
Type dataType)
Sets the "type" of the associated Parameter |
void |
setParameterType(String name,
Type dataType)
Sets the "type" of the associated Parameter |
void |
setParameterValue(int index,
Object value)
Sets the value of the associated Parameter |
void |
setParameterValue(String name,
Object value)
Sets the value of the named Parameter |
void |
setResultSetShape(ResultSetShape shape)
Defines the structure of the ResultSet returned by the JDBC Driver when this command is executed. |
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.Command |
---|
setConnection, setConnection, setDataObjectModel |
Field Detail |
---|
protected Statement statement
protected Parameters parameters
protected static final boolean debug
protected ResultSetShape resultSetShape
Constructor Detail |
---|
public CommandImpl(String sqlString)
Method Detail |
---|
public abstract void execute()
Command
execute
in interface Command
public abstract DataObject executeQuery()
Command
executeQuery
in interface Command
public void setParameterValue(String name, Object value)
Command
setParameterValue
in interface Command
name
- the name of this Parametervalue
- the value for the Parameterpublic void setParameterValue(int index, Object value)
Command
setParameterValue
in interface Command
index
- the index of the Parametervalue
- the value for the Parameterpublic void setParameterType(String name, Type dataType)
Command
setParameterType
in interface Command
public void setParameterType(int index, Type dataType)
Command
setParameterType
in interface Command
index
- the index of the Parameterpublic void addParameter(int index, Type sdoType)
Command
addParameter
in interface Command
index
- the index of the parametersdoType
- the commonj.sdo.Type of the Parameterpublic void addParameter(int index, int direction, Type sdoType)
Command
addParameter
in interface Command
index
- the index of the parameterdirection
- the direction of the Parameter. Either Parameter.IN,
Parameter.OUT or Parameter.INOUTsdoType
- specifies the type as a commonj.sdo.Type from
SDODataTypes
public void addParameter(String name, Type sdoType)
Command
addParameter
in interface Command
name
- the index of the parametersdoType
- the commonj.sdo.Type of the Parameterpublic void addParameter(String name, int direction, Type sdoType)
Command
addParameter
in interface Command
name
- the name associated with the Parameterdirection
- the direction of the Parameter. Either Parameter.IN,
Parameter.OUT or Parameter.INOUTsdoType
- specifies the type as a commonj.sdo.Type from
SDODataTypes
public void addParameter(Parameter param)
public Parameter getParameter(String name)
Command
getParameter
in interface Command
name
- the name of the parameter
public Parameter getParameter(int index)
Command
getParameter
in interface Command
index
- the index of the Parameter
public List getParameters()
public Object getParameterValue(String name)
Command
getParameterValue
in interface Command
name
- the name of the Parameter
public Object getParameterValue(int index)
Command
getParameterValue
in interface Command
index
- the index of the Parameter
public void setConnection(ConnectionImpl connection)
setConnection
in class BaseCommandImpl
protected ConnectionImpl getConnection()
public void setResultSetShape(ResultSetShape shape)
Command
This method is prvided primarily to support platforms (such as Oracle) that do not provide complete support for ResultSetMetadata
setResultSetShape
in interface Command
shape
- the specified result set shapeResultSetShape
public void close()
Command
close
in interface Command
|
Tuscany DAS for Relational Databases | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |