|
|||||||||||
| 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
OdaQuery is the ODA wrapper for query statements.
| Method Summary | |
void |
clearInParameters()
An optional method to clear the current input parameter values immediately. |
void |
close()
Attempts to close this IQuery. |
IResultSet |
executeQuery()
Executes the query's prepared query text and returns a single IResultSet object. |
java.lang.Object |
findAndInvokeMethod(java.lang.String methodName,
java.lang.Class[] parameterTypes,
java.lang.Object[] args)
|
int |
findInParameter(java.lang.String parameterName)
Returns the 1-based index of the specified input parameter. |
java.lang.String |
getInterfaceName()
|
int |
getMaxRows()
Returns the maximum number of rows that can be fetched from the query's result set(s). |
IResultSetMetaData |
getMetaData()
Returns the metadata of the current result set for this prepared IQuery. |
IParameterMetaData |
getParameterMetaData()
Returns the count, data types, and other metadata attributes of the parameters defined in this prepared IQuery object. |
SortSpec |
getSortSpec()
Returns the sort specification associated with this IQuery. |
void |
prepare(java.lang.String queryText)
Performs necessary checks to determine whether the query text is of a valid format supported by this IQuery implementation. |
void |
setAppContext(java.lang.Object context)
Sets the query context passed through from an application. |
void |
setBigDecimal(int parameterId,
java.math.BigDecimal value)
Sets the designated parameter to the given decimal value. |
void |
setBigDecimal(java.lang.String parameterName,
java.math.BigDecimal value)
Sets the designated parameter to the given decimal value. |
void |
setDate(int parameterId,
java.sql.Date value)
Sets the designated parameter to the given Date value. |
void |
setDate(java.lang.String parameterName,
java.sql.Date value)
Sets the designated parameter to the given Date value. |
void |
setDouble(int parameterId,
double value)
Sets the designated parameter to the given double value. |
void |
setDouble(java.lang.String parameterName,
double value)
Sets the designated parameter to the given double value. |
void |
setInt(int parameterId,
int value)
Sets the designated parameter to the given integer value. |
void |
setInt(java.lang.String parameterName,
int value)
Sets the designated parameter to the given integer value. |
void |
setMaxRows(int max)
Specifies the maximum number of rows that can be fetched from the query's result set(s). |
void |
setProperty(java.lang.String propertyName,
java.lang.String propertyValue)
Sets the named property with the specified value. |
void |
setSortSpec(SortSpec sortBy)
Specifies the sort specification for this IQuery. |
void |
setString(int parameterId,
java.lang.String value)
Sets the designated parameter to the given string value. |
void |
setString(java.lang.String parameterName,
java.lang.String value)
Sets the designated parameter to the given string value. |
static void |
setThrowAndSetOdaException()
|
void |
setTime(int parameterId,
java.sql.Time value)
Sets the designated parameter to the given Time value. |
void |
setTime(java.lang.String parameterName,
java.sql.Time value)
Sets the designated parameter to the given Time value. |
void |
setTimestamp(int parameterId,
java.sql.Timestamp value)
Sets the designated parameter to the given Timestamp value. |
void |
setTimestamp(java.lang.String parameterName,
java.sql.Timestamp value)
Sets the designated parameter to the given Timestamp value. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public void setAppContext(java.lang.Object context)
throws OdaException
IQuery
setAppContext in interface IQuerycontext - Application context object of this instance.
OdaException - if data source error occurs
public void prepare(java.lang.String queryText)
throws OdaException
IQuery
prepare in interface IQueryqueryText - a query text to prepare or pre-compile;
it cannot be null.
OdaException - if data source error occurs
public void setProperty(java.lang.String propertyName,
java.lang.String propertyValue)
throws OdaException
IQuery
setProperty in interface IQuerypropertyName - name of the property.propertyValue - value to assign to the named property; could be null.
OdaException - if data source error occurs
public void close()
throws OdaException
IQuery
close in interface IQueryOdaException - if data source error occurs
public void setMaxRows(int max)
throws OdaException
IQuery
setMaxRows in interface IQuerymax - 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
IQuery
getMaxRows in interface IQueryOdaException - if data source error occurs
public IResultSetMetaData getMetaData()
throws OdaException
IQuery
getMetaData in interface IQueryOdaException - if data source error occurs
public IResultSet executeQuery()
throws OdaException
IQuery
executeQuery in interface IQueryOdaException - if data source error occurs
public void setInt(java.lang.String parameterName,
int value)
throws OdaException
IQuery
setInt in interface IQueryparameterName - name of the parameter.value - integer value.
OdaException - if data source error occurs
public void setInt(int parameterId,
int value)
throws OdaException
IQuery
setInt in interface IQueryparameterId - 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
IQuery
setDouble in interface IQueryparameterName - name of the parameter.value - double value.
OdaException - if data source error occurs
public void setDouble(int parameterId,
double value)
throws OdaException
IQuery
setDouble in interface IQueryparameterId - 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
IQuery
setBigDecimal in interface IQueryparameterName - name of the parameter.value - decimal value.
OdaException - if data source error occurs
public void setBigDecimal(int parameterId,
java.math.BigDecimal value)
throws OdaException
IQuery
setBigDecimal in interface IQueryparameterId - 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
IQuery
setString in interface IQueryparameterName - name of the parameter.value - string value.
OdaException - if data source error occurs
public void setString(int parameterId,
java.lang.String value)
throws OdaException
IQuery
setString in interface IQueryparameterId - 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
IQuery
setDate in interface IQueryparameterName - 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
IQuery
setDate in interface IQueryparameterId - 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
IQuery
setTime in interface IQueryparameterName - 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
IQuery
setTime in interface IQueryparameterId - 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
IQuery
setTimestamp in interface IQueryparameterName - 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
IQuery
setTimestamp in interface IQueryparameterId - id of the parameter (1-based).value - the java.sql.Timestamp value.
OdaException - if data source error occurs
public void clearInParameters()
throws OdaException
IQueryIn general, input parameter values remain in force for repeated use of a query. 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.
clearInParameters in interface IQueryOdaException - if data source error occurs
public int findInParameter(java.lang.String parameterName)
throws OdaException
IQuery
findInParameter in interface IQueryparameterName - name of the parameter.
OdaException - if data source error occurs
public IParameterMetaData getParameterMetaData()
throws OdaException
IQueryNote: This should only be called after prepare() is called.
getParameterMetaData in interface IQueryOdaException - if data source error occurs
public void setSortSpec(SortSpec sortBy)
throws OdaException
IQueryIQuery.
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 query.
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.
setSortSpec in interface IQuerysortBy - the sort specification assigned to this IQuery.
OdaException - if data source error occurs
public SortSpec getSortSpec()
throws OdaException
IQueryIQuery.
getSortSpec in interface IQuerySortSpec assigned to this IQuery;
null if no SortSpec was explicitly set.
OdaException - if data source error occurspublic java.lang.String getInterfaceName()
public static void setThrowAndSetOdaException()
public java.lang.Object findAndInvokeMethod(java.lang.String methodName,
java.lang.Class[] parameterTypes,
java.lang.Object[] args)
throws java.lang.NoSuchMethodException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
OdaException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
OdaException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||