|
||||||||||
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
org.apache.tuscany.das.rdb.impl.ReadCommandImpl
public class ReadCommandImpl
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 | |
---|---|
ReadCommandImpl(Command command,
MappingWrapper mapping,
java.util.List resultDescriptor)
|
|
ReadCommandImpl(java.lang.String sqlString,
MappingWrapper mapping,
java.util.List resultDescriptor)
|
Method Summary | |
---|---|
void |
addResultDescriptor(ResultDescriptor resultDescriptor)
Add/replace based on columnIndex (>=0)embedded in resultDescriptor else add at end |
protected commonj.sdo.DataObject |
buildGraph(java.util.List results)
|
protected void |
enablePaging()
|
void |
execute()
Performs the function defined by the command |
commonj.sdo.DataObject |
executeQuery()
Performs the function defined by the command and return the results in the root DataObject |
protected int |
getEndRow()
|
ResultDescriptor |
getResultDescriptor(int columnIndex)
Return resultDescriptor if exact match for columnIndex(>=0) found else return null; |
java.util.List |
getResultDescriptors()
|
protected int |
getStartRow()
|
void |
printResultDescriptors(java.io.OutputStream ostrm)
Utility method |
ResultDescriptor |
removeResultDescriptor(int columnIndex)
remove ResultDescriptor at given columnIndex(>=0) and return same. |
ResultDescriptor |
removeResultDescriptor(ResultDescriptor resultDescriptor)
Remove resultDescriptor only if matched for index(>=0), name, type, schema name and table name and return same, else return null For -ve index, ignore index and if unique match for rest of the attriutes, remove/return, if multiple matches found, throw RuntimeException |
protected void |
setEndRow(int endRow)
|
void |
setResultDescriptors(java.util.List resultDescriptors)
When any columnIndex == -ve, sorting will not happen in ResultShapeSorter (old way) When null is passed, set this.resultSetShape to null, this will later trigger, dbms metadata based shaping of result |
protected void |
setStartRow(int startRow)
|
Methods inherited from class org.apache.tuscany.das.rdb.impl.CommandImpl |
---|
addParameter, close, getConnection, getGeneratedKey, 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, toString, wait, wait, wait |
Constructor Detail |
---|
public ReadCommandImpl(Command command, MappingWrapper mapping, java.util.List resultDescriptor)
public ReadCommandImpl(java.lang.String sqlString, MappingWrapper mapping, java.util.List resultDescriptor)
Method Detail |
---|
public void setResultDescriptors(java.util.List resultDescriptors)
public java.util.List getResultDescriptors()
public void addResultDescriptor(ResultDescriptor resultDescriptor)
Command
public ResultDescriptor removeResultDescriptor(int columnIndex)
Command
public ResultDescriptor removeResultDescriptor(ResultDescriptor resultDescriptor)
Command
public ResultDescriptor getResultDescriptor(int columnIndex)
Command
public void printResultDescriptors(java.io.OutputStream ostrm) throws java.io.IOException
Command
java.io.IOException
public void execute()
Command
execute
in interface Command
execute
in class CommandImpl
public commonj.sdo.DataObject executeQuery()
Command
executeQuery
in interface Command
executeQuery
in class CommandImpl
protected commonj.sdo.DataObject buildGraph(java.util.List results) throws java.sql.SQLException
java.sql.SQLException
protected int getStartRow()
protected int getEndRow()
protected void setStartRow(int startRow)
protected void setEndRow(int endRow)
protected void enablePaging()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |