|
Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions 11g Release 1 (11.1.1) E17787-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Where
Interface that provides Where clause handling.
Field Summary | |
---|---|
static int |
AND |
static int |
OR |
Method Summary | |
---|---|
void |
close() |
void |
initWhere(java.lang.String[] columns, int type) Set up WHERE constraints. |
void |
initWhere(java.lang.String[] columns, java.lang.String whereClause) Set up WHERE constraints. |
void |
setDateWhereArg(int index, long value) Sets the value of a where constraint. |
void |
setDateWhereArg(int index, long value, java.util.Calendar cal) Provides data to be inserted into a DATE, TIME or TIMESTAMP column. |
void |
setWhereArg(int index, double value) Set the bind var value of a where constraint. |
void |
setWhereArg(int index, int value) set the bind var value of a where constraint. |
void |
setWhereArg(int index, long value) set the bind var value of a where constraint. |
void |
setWhereArg(int index, java.lang.String value) Set the bind var value of a where constraint. |
Field Detail |
---|
static final int AND
static final int OR
Method Detail |
---|
void initWhere(java.lang.String[] columns, int type) throws DatabaseProviderException
Call this method to pass in the columns to be used for WHERE clause constraints. The columns will be tested for equality to values set by subsequent calls to setWhere
. You pass in the columns and a flag to indicate whether you want intersection or union of the constraints. The array of column names are used to build a string with the column names (after any case sensitive handling) and placemarkers. The placemarkers will be replaced with values set in subsequent setWhere
calls.
For example, if you pass an array that holds "Fred" and "Barney" and use the Where.AND flag, then it will generate "WHERE Fred=? AND Barney=?".
columns
- the column namestype
- either Where.AND
or Where.OR
to indicate to AND or OR the constraintsDatabaseProviderException
void initWhere(java.lang.String[] columns, java.lang.String whereClause) throws DatabaseProviderException
Call this method to pass in the columns to be used for WHERE clause constraints. You pass in the columns and a string that is used to build the Sql Where. The string has the following features:
setWhereArg
.Here's an example: You pass in an array with 3 column names and the string is "#>? AND NOT (#=? OR #=?)".
columns
- the column nameswhereClause
- the string containing the WHERE clause with placemarkers as described aboveDatabaseProviderException
void setWhereArg(int index, java.lang.String value) throws DatabaseProviderException
Call this to set the bind variable. Basically, this is setting the value for the '?' placemarkers that are described for the initWhere
calls.
index
- the ordinal number of the placemarker being setvalue
- the valueDatabaseProviderException
void setWhereArg(int index, double value) throws DatabaseProviderException
Call this to set the bind variable. Basically, this is setting the value for the '?' placemarkers that are described for the initWhere
calls.
index
- the ordinal number of the placemarker being setvalue
- the valueDatabaseProviderException
void setWhereArg(int index, long value) throws DatabaseProviderException
Call this to set the bind variable. Basically, this is setting the value for the '?' placemarkers that are described for the initWhere
calls.
index
- the ordinal number of the placemarker being setvalue
- the valueDatabaseProviderException
void setWhereArg(int index, int value) throws DatabaseProviderException
Call this to set the bind variable. Basically, this is setting the value for the '?' placemarkers that are described for the initWhere
calls.
index
- the ordinal number of the placemarker being setvalue
- the valueDatabaseProviderException
void setDateWhereArg(int index, long value) throws DatabaseProviderException
Call this to set the value for an individual WHERE condition. Basically, this is setting the value for the '?' placemarkers that are described for the initWhere
calls.
If the database column stores timezone information, then this information will be taken into account when matching the values stored in the database against the value in the WHERE condition. If the database column does not store timezone information, then the values stored in the database are assumed to be in UTC.
index
- the ordinal number of the placemarker being set.value
- the date/time value, measured in milliseconds since midnight, January 1, 1970 UTC.DatabaseProviderException
void setDateWhereArg(int index, long value, java.util.Calendar cal) throws DatabaseProviderException
Provides the data to be inserted into the database on the next call to insert
. The data will be put into the column identified by the column
parameter. The parameter is the index into the array of columns that was passed to getTableInserter
. That is, if fred is the 5th element of the array, then passing 5 as the first parameter of this method will set the fred column.
If the database column stores timezone information, then this information will be taken into account when matching the values stored in the database against the value in the WHERE condition. The cal
parameter in this case has no effect on the result of the query. If the database column does not store timezone information, then the values stored in the database are assumed to be in the timezone specified by the cal
parameter.
index
- the column index as described abovevalue
- the value to insert, measured in milliseconds since midnight, January 1, 1970 UTC.cal
- a Calendar specifying the timezone of the date in the database.DatabaseProviderException
void close()
|
Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions 11g Release 1 (11.1.1) E17787-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |