|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
org.eclipse.datatools.connectivity.oda.IQuery
.
The base interface in the statement hierarchy. A statement contains a query text that can be executed and return data in a single result set. It may have scalar input parameters.
Note: An IQuery object must ALWAYS be prepared before calling execute(). For example:
statement.prepare( "SELECT * FROM TABLE" );
// prepare succeeded, no exception was thrown
statement.execute();
An input 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.
Method Summary | |
void |
clearInParameters()
Deprecated. An optional method to clear the current input parameter values immediately. |
void |
close()
Deprecated. Attempts to close this IQuery. |
IResultSet |
executeQuery()
Deprecated. Executes the statement's prepared query and returns a single IResultSet object. |
int |
findInParameter(java.lang.String parameterName)
Deprecated. Returns the 1-based index of the specified input parameter. |
int |
getMaxRows()
Deprecated. Returns the maximum number of rows that can be fetched from the statement's result set(s). |
IResultSetMetaData |
getMetaData()
Deprecated. Returns the metadata of the current result set for this prepared IQuery. |
IParameterMetaData |
getParameterMetaData()
Deprecated. Returns the count, data types, and other metadata attributes of the parameters defined in this prepared IQuery object. |
SortSpec |
getSortSpec()
Deprecated. Returns the sort specification associated with this IQuery . |
void |
prepare(java.lang.String queryText)
Deprecated. Performs necessary checks to determine whether the query text is of a valid format supported by this IQuery implementation. |
void |
setBigDecimal(int parameterId,
java.math.BigDecimal value)
Deprecated. Sets the designated parameter to the given decimal value. |
void |
setBigDecimal(java.lang.String parameterName,
java.math.BigDecimal value)
Deprecated. Sets the designated parameter to the given decimal value. |
void |
setDate(int parameterId,
java.sql.Date value)
Deprecated. Sets the designated parameter to the given Date value. |
void |
setDate(java.lang.String parameterName,
java.sql.Date value)
Deprecated. Sets the designated parameter to the given Date value. |
void |
setDouble(int parameterId,
double value)
Deprecated. Sets the designated parameter to the given double value. |
void |
setDouble(java.lang.String parameterName,
double value)
Deprecated. Sets the designated parameter to the given double value. |
void |
setInt(int parameterId,
int value)
Deprecated. Sets the designated parameter to the given integer value. |
void |
setInt(java.lang.String parameterName,
int value)
Deprecated. Sets the designated parameter to the given integer value. |
void |
setMaxRows(int max)
Deprecated. Specifies the maximum number of rows that can be fetched from the statement's result set(s). |
void |
setProperty(java.lang.String name,
java.lang.String value)
Deprecated. Sets the named property with the specified value. |
void |
setSortSpec(SortSpec sortBy)
Deprecated. Specifies the sort specification for this IQuery .
|
void |
setString(int parameterId,
java.lang.String value)
Deprecated. Sets the designated parameter to the given string value. |
void |
setString(java.lang.String parameterName,
java.lang.String value)
Deprecated. Sets the designated parameter to the given string value. |
void |
setTime(int parameterId,
java.sql.Time value)
Deprecated. Sets the designated parameter to the given Time value. |
void |
setTime(java.lang.String parameterName,
java.sql.Time value)
Deprecated. Sets the designated parameter to the given Time value. |
void |
setTimestamp(int parameterId,
java.sql.Timestamp value)
Deprecated. Sets the designated parameter to the given Timestamp value. |
void |
setTimestamp(java.lang.String parameterName,
java.sql.Timestamp value)
Deprecated. Sets the designated parameter to the given Timestamp value. |
Method Detail |
public void prepare(java.lang.String queryText) throws OdaException
queryText
- a query text to prepare or pre-compile;
it cannot be null.
OdaException
- if data source error occurs.public void setProperty(java.lang.String name, java.lang.String value) throws OdaException
name
- name of the property.value
- value to assign to the named property; could be null.
OdaException
- if data source error occurs.public void close() throws OdaException
OdaException
- if data source error occurs.public void setMaxRows(int max) throws OdaException
max
- the maximum number of rows that can be fetched from each
result set of this IQuery; zero means there is no limit.
OdaException
- if data source error occurs.public int getMaxRows() throws OdaException
OdaException
- if data source error occurs.public IResultSetMetaData getMetaData() throws OdaException
OdaException
- if data source error occurs.public IResultSet executeQuery() throws OdaException
OdaException
- if data source error occurs.public void clearInParameters() throws OdaException
In general, input parameter values remain in force for repeated use of a statement. Setting a parameter value automatically clears its previous value. However, to reset all the parameters to their default values without explicitly setting new values, use this method.
OdaException
- if data source error occurs.
java.lang.UnsupportedOperationException
- if this operation is not supported.public void setInt(java.lang.String parameterName, int value) throws OdaException
parameterName
- name of the parameter.value
- integer value.
OdaException
- if data source error occurs.public void setInt(int parameterId, int value) throws OdaException
parameterId
- id of the parameter (1-based).value
- integer value.
OdaException
- if data source error occurs.public void setDouble(java.lang.String parameterName, double value) throws OdaException
parameterName
- name of the parameter.value
- double value.
OdaException
- if data source error occurs.public void setDouble(int parameterId, double value) throws OdaException
parameterId
- id of the parameter (1-based).value
- double value.
OdaException
- if data source error occurs.public void setBigDecimal(java.lang.String parameterName, java.math.BigDecimal value) throws OdaException
parameterName
- name of the parameter.value
- decimal value.
OdaException
- if data source error occurs.public void setBigDecimal(int parameterId, java.math.BigDecimal value) throws OdaException
parameterId
- id of the parameter (1-based).value
- decimal value.
OdaException
- if data source error occurs.public void setString(java.lang.String parameterName, java.lang.String value) throws OdaException
parameterName
- name of the parameter.value
- string value.
OdaException
- if data source error occurs.public void setString(int parameterId, java.lang.String value) throws OdaException
parameterId
- id of the parameter (1-based).value
- string value.
OdaException
- if data source error occurs.public void setDate(java.lang.String parameterName, java.sql.Date value) throws OdaException
parameterName
- name of the parameter.value
- the java.sql.Date value.
OdaException
- if data source error occurs.public void setDate(int parameterId, java.sql.Date value) throws OdaException
parameterId
- id of the parameter (1-based).value
- the java.sql.Date value.
OdaException
- if data source error occurs.public void setTime(java.lang.String parameterName, java.sql.Time value) throws OdaException
parameterName
- name of the parameter.value
- the java.sql.Time value.
OdaException
- if data source error occurs.public void setTime(int parameterId, java.sql.Time value) throws OdaException
parameterId
- id of the parameter (1-based).value
- the java.sql.Time value.
OdaException
- if data source error occurs.public void setTimestamp(java.lang.String parameterName, java.sql.Timestamp value) throws OdaException
parameterName
- name of the parameter.value
- the java.sql.Timestamp value.
OdaException
- if data source error occurs.public void setTimestamp(int parameterId, java.sql.Timestamp value) throws OdaException
parameterId
- id of the parameter (1-based).value
- the java.sql.Timestamp value.
OdaException
- if data source error occurs.public int findInParameter(java.lang.String parameterName) throws OdaException
parameterName
- name of the parameter.
OdaException
- if data source error occurs.public IParameterMetaData getParameterMetaData() throws OdaException
Note: This should only be called after prepare() is called.
OdaException
- if data source error occurs.public void setSortSpec(SortSpec sortBy) throws OdaException
IQuery
.
The setter must be called before this IQuery
is executed
or before getMoreResults
is called.
More sort keys can be added to the SortSpec after
it is associated with the statement.
The final sort specification is then applied
to subsequent result set(s) at execution.
It is up to individual ODA runtme drivers to validate the type of sort specification
that are acceptable to its data 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.
sortBy
- the sort specification assigned to this IQuery
.
OdaException
- if data source error occurs.public SortSpec getSortSpec() throws OdaException
IQuery
.
SortSpec
assigned to this IQuery
;
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 |