Skip navigation links

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

E17787-01


com.sigmadynamics.server.DataServices.DatabaseProvider
Interface TableUpdater

All Superinterfaces:
Where

public interface TableUpdater
extends Where

Interface that allows you to update data in relational tables.


Field Summary

 

Fields inherited from interface com.sigmadynamics.server.DataServices.DatabaseProvider.Where
AND, OR

 

Method Summary
 void close()
          Close the TableUpdater object.
 void flush()
          Flush the batched upate to the database.
 boolean isThrottling()
          Returns the throttling mode.
 void put(int column, byte[] value)
          provides data to replace data in a column.
 void put(int column, double value)
          provides data to replace data in a column.
 void put(int column, java.io.InputStream value, int length)
          provides data to replace data in a column.
 void put(int column, long value)
          provides data to replace data in a column.
 void put(int column, java.lang.String value)
          provides data to replace data in a column.
 void putDate(int column, long value)
          Provides data to be inserted into a DATE, TIME or TIMESTAMP column.
 void putDate(int column, long value, java.util.Calendar cal)
          Provides data to be inserted into a DATE, TIME or TIMESTAMP column.
 void putNull(int column, int sqlType)
          puts Null in a column.
 void setThrottling(boolean throttling)
          Sets throttling mode.
 void update()
          update columns in a database.

 

Methods inherited from interface com.sigmadynamics.server.DataServices.DatabaseProvider.Where
initWhere, initWhere, setDateWhereArg, setDateWhereArg, setWhereArg, setWhereArg, setWhereArg, setWhereArg

 

Method Detail

put

void put(int column,
         java.lang.String value)
provides data to replace data in a column.

Provides the new data to be put into the database on the next call to update. 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 getTableUpdater. 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.

Parameters:
column - the column index as described above
value - the new value for the column

put

void put(int column,
         double value)
provides data to replace data in a column.

Provides the new data to be put into the database on the next call to update. 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 getTableUpdater. 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.

Parameters:
column - the column index as described above
value - the new value for the column

put

void put(int column,
         long value)
provides data to replace data in a column.

Provides the new data to be put into the database on the next call to update. 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 getTableUpdater. 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.

Parameters:
column - the column index as described above
value - the new value for the column

putDate

void putDate(int column,
             long value)
Provides data to be inserted into a DATE, TIME or TIMESTAMP column.

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.

The date/time value is inserted in the database in UTC format. Notice that this behavior is different from raw JDBC, which would insert it in a local timezone.

Parameters:
column - the column index as described above
value - the value to insert, measured in milliseconds since midnight, January 1, 1970 UTC.

putDate

void putDate(int column,
             long value,
             java.util.Calendar cal)
Provides data to be inserted into a DATE, TIME or TIMESTAMP column.

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 from the cal parameter. If the database column does not store timezone information, then the value parameter gets converted into the timezone supplied by the cal parameter.

Parameters:
column - the column index as described above
value - the value to insert, measured in milliseconds since midnight, January 1, 1970 UTC.
cal - a Calendar specifying the timezone of the date to be inserted.

put

void put(int column,
         java.io.InputStream value,
         int length)
provides data to replace data in a column.

Provides the new data to be put into the database on the next call to update. 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 getTableUpdater. 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.

Parameters:
column - the column index as described above
value - the new value for the column
length - the number of bytes in the stream

put

void put(int column,
         byte[] value)
provides data to replace data in a column.

Provides the new data to be put into the database on the next call to update. 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 getTableUpdater. 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.

Parameters:
column - the column index as described above
value - the new value for the column

putNull

void putNull(int column,
             int sqlType)
puts Null in a column.

Puts a database Null into the database on the next call to update. 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 getTableUpdater. 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.

Parameters:
column - the column index as described above
sqlType - the SQL type code of the column as defined in java.sql.Types

update

void update()
update columns in a database.

call this method to update data in a database. The columns to set are specified through the values specified for getTableUpdater. If you specified a batch size greater than one, than this method doesn't necessarily update the data but only batches up the update.


flush

void flush()
Flush the batched upate to the database.

This method will force the batched updates out to the database.


close

void close()
Close the TableUpdater object.

It's important to call this method as early as possible in order to free up resources.

This method will automatically force any pending batch operations to the database.

Specified by:
close in interface Where

isThrottling

boolean isThrottling()
Returns the throttling mode.
Returns:
true if throttling is enabled, otherwise false.

setThrottling

void setThrottling(boolean throttling)
Sets throttling mode. Throttling cannot be turned off if the updater is synchronous.
Parameters:
throttling - throttling mode.
Throws:
java.lang.IllegalArgumentException - if the method is called on a synchronous updater with false as an argument.

Skip navigation links

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

E17787-01


Copyright © 2010, Oracle. All rights reserved.