Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


com.sigmadynamics.server.DataServices.DatabaseProvider
Interface Where

All Known Subinterfaces:
TableDeleter, TableReader, TableUpdater

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

AND

static final int AND
See Also:
Constant Field Values

OR

static final int OR
See Also:
Constant Field Values

Method Detail

initWhere

void initWhere(java.lang.String[] columns,
               int type)
               throws DatabaseProviderException
Set up WHERE constraints.

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=?".

Parameters:
columns - the column names
type - either Where.AND or Where.OR to indicate to AND or OR the constraints
Throws:
DatabaseProviderException

initWhere

void initWhere(java.lang.String[] columns,
               java.lang.String whereClause)
               throws DatabaseProviderException
Set up WHERE constraints.

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: