|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An optional, extended query interface for more advanced query capabilities. It may have complex input parameters, scalar or complex output parameters, and/or return a single or multiple result sets.
A result set may be extended to be referenced by name.
An input parameter may be extended to support the structure or table data type.
An output parameter may be of scalar or structure data type.
All advanced query implementations (e.g. stored procedures, SAP R/3 BAPI's)
should implement this interface.
A parameter may be referenced by name or position.
The case-sensitivity of a name is implementation-dependent.
All indices in this interface are 1-based.
Note: All IAdvancedQuery interface methods should only be called after IQuery.prepare() has been called.
Method Summary | |
boolean |
execute()
Executes the query's prepared query that may return multiple result sets. |
int |
findOutParameter(java.lang.String parameterName)
Returns the 1-based index of the specified scalar or structure output parameter. |
java.math.BigDecimal |
getBigDecimal(int parameterId)
Returns the decimal value from the designated output parameter. |
java.math.BigDecimal |
getBigDecimal(java.lang.String parameterName)
Returns the decimal value from the designated output parameter. |
IBlob |
getBlob(int parameterId)
Returns the IBlob value from the designated output parameter. |
IBlob |
getBlob(java.lang.String parameterName)
Returns the IBlob value from the designated output parameter. |
boolean |
getBoolean(int parameterId)
Returns the boolean value from the designated output parameter. |
boolean |
getBoolean(java.lang.String parameterName)
Returns the boolean value from the designated output parameter. |
IClob |
getClob(int parameterId)
Returns the IClob value from the designated output parameter. |
IClob |
getClob(java.lang.String parameterName)
Returns the IClob value from the designated output parameter. |
java.sql.Date |
getDate(int parameterId)
Returns the java.sql.Date value from the designated output parameter. |
java.sql.Date |
getDate(java.lang.String parameterName)
Returns the java.sql.Date value from the designated output parameter. |
double |
getDouble(int parameterId)
Returns the double value from the designated output parameter. |
double |
getDouble(java.lang.String parameterName)
Returns the double value from the designated output parameter. |
int |
getInt(int parameterId)
Returns the integer value from the designated output parameter. |
int |
getInt(java.lang.String parameterName)
Returns the integer value from the designated output parameter. |
IResultSetMetaData |
getMetaDataOf(java.lang.String resultSetName)
Returns the metadata of the expected named result. |
boolean |
getMoreResults()
Moves to the query's next result set. |
IResultSet |
getResultSet()
Returns the current result as an IResultSet object. |
IResultSet |
getResultSet(java.lang.String resultSetName)
Returns the named result as an IResultSet object, or null if none is available. |
java.lang.String[] |
getResultSetNames()
Returns the names of result sets that can be returned by this IAdvancedQuery. |
IParameterRowSet |
getRow(int parameterId)
Returns the structure value from the designated output parameter. |
IParameterRowSet |
getRow(java.lang.String parameterName)
Returns the structure value from the designated output parameter. |
SortSpec |
getSortSpec(java.lang.String resultSetName)
Returns the sort specification associated with the named result set of this IAdvancedQuery . |
java.lang.String |
getString(int parameterId)
Returns the String value from the designated output parameter. |
java.lang.String |
getString(java.lang.String parameterName)
Returns the String value from the designated output parameter. |
java.sql.Time |
getTime(int parameterId)
Returns the java.sql.Time value from the designated output parameter. |
java.sql.Time |
getTime(java.lang.String parameterName)
Returns the java.sql.Time value from the designated output parameter. |
java.sql.Timestamp |
getTimestamp(int parameterId)
Returns the java.sql.Timestamp value from the designated output parameter. |
java.sql.Timestamp |
getTimestamp(java.lang.String parameterName)
Returns the java.sql.Timestamp value from the designated output parameter. |
IParameterRowSet |
setNewRow(int parameterId)
Returns an IParameterRowSet object that contains a single row representing the specified structure input parameter. |
IParameterRowSet |
setNewRow(java.lang.String parameterName)
Returns an IParameterRowSet object that contains a single row representing the named structure input parameter. |
IParameterRowSet |
setNewRowSet(int parameterId)
Returns an empty IParameterRowSet object that represents the specified table input parameter. |
IParameterRowSet |
setNewRowSet(java.lang.String parameterName)
Returns an empty IParameterRowSet object that represents the named table input parameter. |
void |
setSortSpec(java.lang.String resultSetName,
SortSpec sortBy)
Specifies the sort specification for the named result set of this IAdvancedQuery . |
boolean |
wasNull()
Returns whether the value read from the previous get<type> method was null. |
Methods inherited from interface org.eclipse.datatools.connectivity.oda.IQuery |
clearInParameters, close, executeQuery, findInParameter, getMaxRows, getMetaData, getParameterMetaData, getSortSpec, prepare, setAppContext, setBigDecimal, setBigDecimal, setBoolean, setBoolean, setDate, setDate, setDouble, setDouble, setInt, setInt, setMaxRows, setNull, setNull, setProperty, setSortSpec, setString, setString, setTime, setTime, setTimestamp, setTimestamp |
Method Detail |
public boolean execute() throws OdaException
OdaException
- if data source error occurs.public IResultSet getResultSet() throws OdaException
OdaException
- if data source error occurs.public boolean getMoreResults() throws OdaException
OdaException
- if data source error occurs.public java.lang.String[] getResultSetNames() throws OdaException
OdaException
- if data source error occurs.public IResultSetMetaData getMetaDataOf(java.lang.String resultSetName) throws OdaException
resultSetName
- the name of the result.
OdaException
- if data source error occurs.public IResultSet getResultSet(java.lang.String resultSetName) throws OdaException
resultSetName
- the name of the target result set.
OdaException
- if data source error occurs.public IParameterRowSet setNewRow(java.lang.String parameterName) throws OdaException
IParameterRowSet myStruct = myQuery.setNewRow( "MyStructureName" );
myStruct.next();
myStruct.setString( 1, "myValue" );
parameterName
- name of the parameter.
OdaException
- if data source error occurs.public IParameterRowSet setNewRow(int parameterId) throws OdaException
parameterId
- id of the parameter (1-based).
OdaException
- if data source error occurs.public IParameterRowSet setNewRowSet(java.lang.String parameterName) throws OdaException
IParameterRowSet myTable = myQuery.setNewRowSet( "MyTableName" );
myTable.add();
myTable.setString( 1, "myValue1" );
myTable.add();
myTable.setString( 1, "myValue2" );
parameterName
- name of the parameter.
OdaException
- if data source error occurs.public IParameterRowSet setNewRowSet(int parameterId) throws OdaException
parameterId
- id of the parameter (1-based).
OdaException
- if data source error occurs.public int getInt(java.lang.String parameterName) throws OdaException
parameterName
- name of the parameter.
OdaException
- if data source error occurs.public int getInt(int parameterId) throws OdaException
parameterId
- id of the parameter (1-based).
OdaException
- if data source error occurs.public double getDouble(java.lang.String parameterName) throws OdaException
parameterName
- name of the parameter.
OdaException
- if data source error occurs.public double getDouble(int parameterId) throws OdaException
parameterId
- id of the parameter (1-based).
OdaException
- if data source error occurs.public java.math.BigDecimal getBigDecimal(java.lang.String parameterName) throws OdaException
parameterName
- name of the parameter.
OdaException
- if data source error occurs.public java.math.BigDecimal getBigDecimal(int parameterId) throws OdaException
parameterId
- id of the parameter (1-based).
OdaException
- if data source error occurs.public java.lang.String getString(java.lang.String parameterName) throws OdaException
parameterName
- name of the parameter.
OdaException
- if data source error occurs.public java.lang.String getString(int parameterId) throws OdaException
parameterId
- id of the parameter (1-based).
OdaException
- if data source error occurs.public java.sql.Date getDate(java.lang.String parameterName) throws OdaException
parameterName
- name of the parameter.
OdaException
- if data source error occurs.public java.sql.Date getDate(int parameterId) throws OdaException
parameterId
- id of the parameter (1-based).
OdaException
- if data source error occurs.public java.sql.Time getTime(java.lang.String parameterName) throws OdaException
parameterName
- name of the parameter.
OdaException
- if data source error occurs.public java.sql.Time getTime(int parameterId) throws OdaException
parameterId
- id of the parameter (1-based).
OdaException
- if data source error occurs.public java.sql.Timestamp getTimestamp(java.lang.String parameterName) throws OdaException
parameterName
- name of the parameter.
OdaException
- if data source error occurs.public java.sql.Timestamp getTimestamp(int parameterId) throws OdaException
parameterId
- id of the parameter (1-based).
OdaException
- if data source error occurs.public IBlob getBlob(java.lang.String parameterName) throws OdaException
Note: The driver must guarantee that the returned IBlob object and its BLOB data would remain valid and accessible until this query instance is closed.
parameterName
- name of the parameter.
null
if the specific parameter
has null value.
OdaException
- if data source error occurspublic IBlob getBlob(int parameterId) throws OdaException
Note: The driver must guarantee that the returned IBlob object and its BLOB data would remain valid and accessible until this query instance is closed.
parameterId
- id of the parameter (1-based).
null
if the specific parameter
has null value.
OdaException
- if data source error occurspublic IClob getClob(java.lang.String parameterName) throws OdaException
Note: The driver must guarantee that the returned IClob object and its CLOB data would remain valid and accessible until this query instance is closed.
parameterName
- name of the parameter.
null
if the specific parameter
has null value.
OdaException
- if data source error occurspublic IClob getClob(int parameterId) throws OdaException
Note: The driver must guarantee that the returned IClob object and its CLOB data would remain valid and accessible until this query instance is closed.
parameterId
- id of the parameter (1-based).
null
if the specific parameter
has null value.
OdaException
- if data source error occurspublic boolean getBoolean(java.lang.String parameterName) throws OdaException
parameterName
- name of the parameter.
OdaException
- if data source error occurs.public boolean getBoolean(int parameterId) throws OdaException
parameterId
- id of the parameter (1-based).
OdaException
- if data source error occurs.public IParameterRowSet getRow(java.lang.String parameterName) throws OdaException
parameterName
- name of the parameter.
OdaException
- if data source error occurs.public IParameterRowSet getRow(int parameterId) throws OdaException
parameterId
- id of the parameter (1-based).
OdaException
- if data source error occurs.public int findOutParameter(java.lang.String parameterName) throws OdaException
parameterName
- name of the output parameter.
OdaException
- if data source error occurs.public boolean wasNull() throws OdaException
OdaException
- if data source error occurs.public void setSortSpec(java.lang.String resultSetName, SortSpec sortBy) throws OdaException
IAdvancedQuery
. This setter must be called before this is
executed. More sort keys can be added to the SortSpec after
it is associated with the query. The final
sort specification is applied to the result set(s) at execution.
It is up to individual ODA runtime drivers to validate the type of sort specification
that are acceptable to the provider, based on its level of dynamic sorting support.
An OdaException
should be thrown if the specified sort
specification is not valid or not supported by the driver.
resultSetName
- name of the result set.sortBy
- the sort specification to apply to the specified result
set.
OdaException
- if data source error occurs.public SortSpec getSortSpec(java.lang.String resultSetName) throws OdaException
IAdvancedQuery
.
resultSetName
- name of the result set.
SortSpec
associated with the specified
result set; null
if no SortSpec
was explicitly set.
OdaException
- if data source error occurs.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |