|
Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions 11g Release 1 (11.1.1) E17787-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TableInserter
Interface that provides the functionality to insert data into a relational table.
Method Summary | |
---|---|
void |
close() close the TableInserter object. |
void |
flush() flush the batched insert to the database. |
void |
insert() insert data into a database. |
boolean |
isThrottling() Returns the throttling mode. |
void |
put(int column, byte[] value) provides data to be inserted into a column. |
void |
put(int column, double value) provides data to be inserted into a column. |
void |
put(int column, java.io.InputStream value, int length) provides data to be inserted into a column. |
void |
put(int column, long value) provides data to be inserted into a column. |
void |
put(int column, java.lang.String value) provides data to be inserted into 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. |
Method Detail |
---|
void put(int column, java.lang.String value)
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.
column
- the column index as described abovevalue
- the value to insertvoid put(int column, double value)
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.
column
- the column index as described abovevalue
- the value to insertvoid put(int column, long value)
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.
column
- the column index as described abovevalue
- the value to insertvoid putDate(int column, long value)
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.
column
- the column index as described abovevalue
- the value to insert, measured in milliseconds since midnight, January 1, 1970 UTC.void putDate(int column, long value, java.util.Calendar cal)
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.
column
- the column index as described abovevalue
- the value to insert, measured in milliseconds since midnight, January 1, 1970 UTC.cal
- a Calendar with which to specify timezonevoid put(int column, java.io.InputStream value, int length)
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.
column
- the column index as described abovevalue
- the value to insertlength
- the number of bytes in the streamvoid put(int column, byte[] value)
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.
column
- the column index as described abovevalue
- the value to insertvoid putNull(int column, int sqlType)
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.
column
- the column index as described abovesqlType
- the SQL type code of the column as defined in java.sql.Typesvoid insert()
call this method to insert data into a database. The columns to set are specified through the values specified for getTableInserter
. If you specified a batch size greater than one, than this method doesn't necessarily insert the data but only batches up the insert.
void flush()
This method will force the batched inserts out to the database.
void close()
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.
boolean isThrottling()
true
if throttling is enabled, otherwise false
.void setThrottling(boolean throttling)
throttling
- throttling mode.java.lang.IllegalArgumentException
- if the method is called on a synchronous updater with false
as an argument.
|
Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions 11g Release 1 (11.1.1) E17787-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |