|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Command
A Command is used to execute a read or write to a database
Method Summary | |
---|---|
void |
addResultDescriptor(ResultDescriptor resultDescriptor)
Add/replace based on columnIndex (>=0)embedded in resultDescriptor else add at end |
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 |
int |
getGeneratedKey()
Returns the value of the database-generated key. |
java.lang.Object |
getParameter(int index)
Returns the value of the associated Parameter |
java.lang.Object |
getParameter(java.lang.String name)
|
ResultDescriptor |
getResultDescriptor(int columnIndex)
Return resultDescriptor if exact match for columnIndex(>=0) found else return null; |
java.util.List |
getResultDescriptors()
|
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 |
void |
setParameter(int index,
java.lang.Object value)
Sets the value of the associated Parameter |
void |
setParameter(java.lang.String name,
java.lang.Object value)
|
void |
setResultDescriptors(java.util.List resultDescriptorList)
Allow set of ResultDescriptor when command is created on-the-fly |
Method Detail |
---|
void execute()
commonj.sdo.DataObject executeQuery()
void setParameter(int index, java.lang.Object value)
index
- the index of the Parametervalue
- the value for the Parameterjava.lang.Object getParameter(int index)
index
- the index of the Parameter
void setParameter(java.lang.String name, java.lang.Object value)
name
- Name of parameter - should match exact name of database table column
as appearing in Commandvalue
- the value of the parameterjava.lang.Object getParameter(java.lang.String name)
name
- the name of the parameter - should match exact name of database table column
int getGeneratedKey()
void setResultDescriptors(java.util.List resultDescriptorList)
resultDescriptorList
- java.util.List getResultDescriptors()
void addResultDescriptor(ResultDescriptor resultDescriptor)
resultDescriptor
- ResultDescriptor removeResultDescriptor(int columnIndex)
columnIndex
-
ResultDescriptor removeResultDescriptor(ResultDescriptor resultDescriptor)
resultDescriptor
-
ResultDescriptor getResultDescriptor(int columnIndex)
columnIndex
-
void printResultDescriptors(java.io.OutputStream ostrm) throws java.io.IOException
ostrm
-
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |