|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.datatools.connectivity.oda.consumer.helper.OdaObject
org.eclipse.datatools.connectivity.oda.consumer.helper.OdaDriverObject
org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery
org.eclipse.datatools.connectivity.oda.consumer.helper.OdaAdvancedQuery
OdaAdvancedQuery is the ODA wrapper for advanced query statements.
| 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. |
java.lang.String |
getBigDecimalAsString(int parameterId)
|
java.lang.String |
getBigDecimalAsString(java.lang.String parameterName)
|
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. |
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.lang.String |
getClobAsString(int index)
|
java.lang.String |
getClobAsString(java.lang.String columnName)
|
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. |
java.lang.String |
getDateAsString(int parameterId)
|
java.lang.String |
getDateAsString(java.lang.String parameterName)
|
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. |
java.lang.String |
getInterfaceName()
|
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.lang.String |
getTimeAsString(int parameterId)
|
java.lang.String |
getTimeAsString(java.lang.String parameterName)
|
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. |
java.lang.String |
getTimestampAsString(int parameterId)
|
java.lang.String |
getTimestampAsString(java.lang.String parameterName)
|
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 class org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQuery |
clearInParameters, close, executeQuery, findAndInvokeMethod, findInParameter, getMaxRows, getMetaData, getParameterMetaData, getSortSpec, prepare, setAppContext, setBigDecimal, setBigDecimal, setDate, setDate, setDouble, setDouble, setInt, setInt, setMaxRows, setProperty, setSortSpec, setString, setString, setThrowAndSetOdaException, setTime, setTime, setTimestamp, setTimestamp |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.datatools.connectivity.oda.IQuery |
clearInParameters, close, executeQuery, findInParameter, getMaxRows, getMetaData, getParameterMetaData, getSortSpec, prepare, setAppContext, setBigDecimal, setBigDecimal, setDate, setDate, setDouble, setDouble, setInt, setInt, setMaxRows, setProperty, setSortSpec, setString, setString, setTime, setTime, setTimestamp, setTimestamp |
| Method Detail |
public boolean execute()
throws OdaException
IAdvancedQuery
execute in interface IAdvancedQueryOdaException - if data source error occurs.
public IResultSet getResultSet()
throws OdaException
IAdvancedQuery
getResultSet in interface IAdvancedQueryOdaException - if data source error occurs.
public boolean getMoreResults()
throws OdaException
IAdvancedQuery
getMoreResults in interface IAdvancedQueryOdaException - if data source error occurs.
public IResultSetMetaData getMetaDataOf(java.lang.String resultSetName)
throws OdaException
IAdvancedQuery
getMetaDataOf in interface IAdvancedQueryresultSetName - the name of the result.
OdaException - if data source error occurs.
public java.lang.String[] getResultSetNames()
throws OdaException
IAdvancedQuery
getResultSetNames in interface IAdvancedQueryOdaException - if data source error occurs.
public IResultSet getResultSet(java.lang.String resultSetName)
throws OdaException
IAdvancedQuery
getResultSet in interface IAdvancedQueryresultSetName - the name of the target result set.
OdaException - if data source error occurs.
public IParameterRowSet setNewRow(java.lang.String parameterName)
throws OdaException
IAdvancedQuery
IParameterRowSet myStruct = myQuery.setNewRow( "MyStructureName" );
myStruct.next();
myStruct.setString( 1, "myValue" );
setNewRow in interface IAdvancedQueryparameterName - name of the parameter.
OdaException - if data source error occurs.
public IParameterRowSet setNewRow(int parameterId)
throws OdaException
IAdvancedQuery
setNewRow in interface IAdvancedQueryparameterId - id of the parameter (1-based).
OdaException - if data source error occurs.
public IParameterRowSet setNewRowSet(java.lang.String parameterName)
throws OdaException
IAdvancedQuery
IParameterRowSet myTable = myQuery.setNewRowSet( "MyTableName" );
myTable.add();
myTable.setString( 1, "myValue1" );
myTable.add();
myTable.setString( 1, "myValue2" );
setNewRowSet in interface IAdvancedQueryparameterName - name of the parameter.
OdaException - if data source error occurs.
public IParameterRowSet setNewRowSet(int parameterId)
throws OdaException
IAdvancedQuery
setNewRowSet in interface IAdvancedQueryparameterId - id of the parameter (1-based).
OdaException - if data source error occurs.
public int getInt(java.lang.String parameterName)
throws OdaException
IAdvancedQuery
getInt in interface IAdvancedQueryparameterName - name of the parameter.
OdaException - if data source error occurs.
public int getInt(int parameterId)
throws OdaException
IAdvancedQuery
getInt in interface IAdvancedQueryparameterId - id of the parameter (1-based).
OdaException - if data source error occurs.
public double getDouble(java.lang.String parameterName)
throws OdaException
IAdvancedQuery
getDouble in interface IAdvancedQueryparameterName - name of the parameter.
OdaException - if data source error occurs.
public double getDouble(int parameterId)
throws OdaException
IAdvancedQuery
getDouble in interface IAdvancedQueryparameterId - id of the parameter (1-based).
OdaException - if data source error occurs.
public java.math.BigDecimal getBigDecimal(java.lang.String parameterName)
throws OdaException
IAdvancedQuery
getBigDecimal in interface IAdvancedQueryparameterName - name of the parameter.
OdaException - if data source error occurs.
public java.math.BigDecimal getBigDecimal(int parameterId)
throws OdaException
IAdvancedQuery
getBigDecimal in interface IAdvancedQueryparameterId - id of the parameter (1-based).
OdaException - if data source error occurs.
public java.lang.String getString(java.lang.String parameterName)
throws OdaException
IAdvancedQuery
getString in interface IAdvancedQueryparameterName - name of the parameter.
OdaException - if data source error occurs.
public java.lang.String getString(int parameterId)
throws OdaException
IAdvancedQuery
getString in interface IAdvancedQueryparameterId - id of the parameter (1-based).
OdaException - if data source error occurs.
public java.sql.Date getDate(java.lang.String parameterName)
throws OdaException
IAdvancedQuery
getDate in interface IAdvancedQueryparameterName - name of the parameter.
OdaException - if data source error occurs.
public java.sql.Date getDate(int parameterId)
throws OdaException
IAdvancedQuery
getDate in interface IAdvancedQueryparameterId - id of the parameter (1-based).
OdaException - if data source error occurs.
public java.sql.Time getTime(java.lang.String parameterName)
throws OdaException
IAdvancedQuery
getTime in interface IAdvancedQueryparameterName - name of the parameter.
OdaException - if data source error occurs.
public java.sql.Time getTime(int parameterId)
throws OdaException
IAdvancedQuery
getTime in interface IAdvancedQueryparameterId - id of the parameter (1-based).
OdaException - if data source error occurs.
public java.sql.Timestamp getTimestamp(java.lang.String parameterName)
throws OdaException
IAdvancedQuery
getTimestamp in interface IAdvancedQueryparameterName - name of the parameter.
OdaException - if data source error occurs.
public java.sql.Timestamp getTimestamp(int parameterId)
throws OdaException
IAdvancedQuery
getTimestamp in interface IAdvancedQueryparameterId - id of the parameter (1-based).
OdaException - if data source error occurs.
public IBlob getBlob(java.lang.String parameterName)
throws OdaException
IAdvancedQueryNote: The driver must guarantee that the returned IBlob object and its BLOB data would remain valid and accessible until this query instance is closed.
getBlob in interface IAdvancedQueryparameterName - name of the parameter.
null if the specific parameter
has null value.
OdaException - if data source error occurs
public IBlob getBlob(int parameterId)
throws OdaException
IAdvancedQueryNote: The driver must guarantee that the returned IBlob object and its BLOB data would remain valid and accessible until this query instance is closed.
getBlob in interface IAdvancedQueryparameterId - id of the parameter (1-based).
null if the specific parameter
has null value.
OdaException - if data source error occurs
public IClob getClob(java.lang.String parameterName)
throws OdaException
IAdvancedQueryNote: The driver must guarantee that the returned IClob object and its CLOB data would remain valid and accessible until this query instance is closed.
getClob in interface IAdvancedQueryparameterName - name of the parameter.
null if the specific parameter
has null value.
OdaException - if data source error occurs
public IClob getClob(int parameterId)
throws OdaException
IAdvancedQueryNote: The driver must guarantee that the returned IClob object and its CLOB data would remain valid and accessible until this query instance is closed.
getClob in interface IAdvancedQueryparameterId - id of the parameter (1-based).
null if the specific parameter
has null value.
OdaException - if data source error occurs
public IParameterRowSet getRow(java.lang.String parameterName)
throws OdaException
IAdvancedQuery
getRow in interface IAdvancedQueryparameterName - name of the parameter.
OdaException - if data source error occurs.
public IParameterRowSet getRow(int parameterId)
throws OdaException
IAdvancedQuery
getRow in interface IAdvancedQueryparameterId - id of the parameter (1-based).
OdaException - if data source error occurs.
public int findOutParameter(java.lang.String parameterName)
throws OdaException
IAdvancedQuery
findOutParameter in interface IAdvancedQueryparameterName - name of the output parameter.
OdaException - if data source error occurs.
public boolean wasNull()
throws OdaException
IAdvancedQuery
wasNull in interface IAdvancedQueryOdaException - if data source error occurs.
public void setSortSpec(java.lang.String resultSetName,
SortSpec sortBy)
throws OdaException
IAdvancedQueryIAdvancedQuery. 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.
setSortSpec in interface IAdvancedQueryresultSetName - 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
IAdvancedQueryIAdvancedQuery.
getSortSpec in interface IAdvancedQueryresultSetName - 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.
public java.lang.String getBigDecimalAsString(java.lang.String parameterName)
throws OdaException
OdaException
public java.lang.String getBigDecimalAsString(int parameterId)
throws OdaException
OdaException
public java.lang.String getDateAsString(java.lang.String parameterName)
throws OdaException
OdaException
public java.lang.String getDateAsString(int parameterId)
throws OdaException
OdaException
public java.lang.String getTimeAsString(java.lang.String parameterName)
throws OdaException
OdaException
public java.lang.String getTimeAsString(int parameterId)
throws OdaException
OdaException
public java.lang.String getTimestampAsString(java.lang.String parameterName)
throws OdaException
OdaException
public java.lang.String getTimestampAsString(int parameterId)
throws OdaException
OdaException
public java.lang.String getClobAsString(java.lang.String columnName)
throws OdaException
OdaException
public java.lang.String getClobAsString(int index)
throws OdaException
OdaExceptionpublic java.lang.String getInterfaceName()
getInterfaceName in class OdaQuery
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||