public interface RowChangeAssistant
Modifier and Type | Interface and Description |
---|---|
static interface |
RowChangeAssistant.RowChange
A change to a row in a database table.
|
Modifier and Type | Method and Description |
---|---|
Iterator |
getRowChanges(String tableName)
Gets the changes recorded for the specified table.
|
boolean |
isRegisteredForRowChanges(String tableName)
Gets whether the action has registered for notification of row changes
on the specified table.
|
void |
recordRowChange(String tableName,
long primaryKey,
String operation)
Manually records a change to the specified table.
|
void |
registerForRowChanges(String tableName,
String pkColumnName,
boolean trackInserts,
String insertFilter,
boolean trackUpdates,
String updateFilter,
boolean trackDeletes,
String deleteFilter)
Registers for notification of changes on the specified table.
|
void |
releaseRowChange(RowChangeAssistant.RowChange rc)
Releases a change recorded for the specified table.
|
void |
unregisterForRowChanges()
Unregisters from notification of changes on all tables.
|
void |
unregisterForRowChanges(String tableName)
Unregisters from notification of changes on the specified table and deletes
all row changes corresponding to the specified table that the action has
not already released.
|
void registerForRowChanges(String tableName, String pkColumnName, boolean trackInserts, String insertFilter, boolean trackUpdates, String updateFilter, boolean trackDeletes, String deleteFilter) throws IfsException
The specified column must be uniquely valued (for example, by a primary key
or unique constraint) and convertible, by JDBC, to a Java long
.
You can control whether to receive notifications of INSERT
s,
UPDATE
s, DELETE
s, or any combination of these.
For each operation, you can also specify a filter, a PL/SQL
expression that evaluates to a boolean value. If a filter is specified,
the upgrade action will only receive notification of rows for which the
filter evaluates to true
.
For example:
registerForRowChanges( "odmm_contentstore", "id", true, null, true, ":old.contenttype = 1 AND :new.contenttype = 3", false, null);would register for notification of all
INSERT
s and any
UPDATE
that changes the contenttype
column
from 1 to 3.
An exception is thrown if the upgrade action has already registered for changes on the specified table.
tableName
- the name of the tablepkColumnName
- the name of the primary key columntrackInserts
- whether to receive notification of INSERT
sinsertFilter
- the insert filter, or null for nonetrackUpdates
- whether to receive notification of UPDATE
supdateFilter
- the update filter, or null for nonetrackDeletes
- whether to receive notification of DELETE
sdeleteFilter
- the delete filter, or null for noneIfsException
- if the operation failsboolean isRegisteredForRowChanges(String tableName) throws IfsException
tableName
- the name of the tableIfsException
- if the operation failsvoid unregisterForRowChanges(String tableName) throws IfsException
An exception is thrown if the upgrade action did not previously call
registerForRowChanges
for the specified
table.
tableName
- the name of the tableIfsException
- if the operation failsvoid unregisterForRowChanges() throws IfsException
Equivalent to calling unregisterForRowChanges(String)
on each table for which the
upgrade action previously called registerForRowChanges
.
IfsException
- if the operation failsIterator getRowChanges(String tableName) throws IfsException
An exception is thrown if the upgrade action did not previously call
registerForRowChanges
for the specified
table.
tableName
- the name of the tableRowChangeAssistant.RowChange
IfsException
- if the operation failsvoid releaseRowChange(RowChangeAssistant.RowChange rc) throws IfsException
Once released, the change will not be reported by subsequent calls to
getRowChanges
.
rc
- the changeIfsException
- if the operation failsvoid recordRowChange(String tableName, long primaryKey, String operation) throws IfsException
The "change" will be reported by subsequent calls to getRowChanges
. There is no need for the row to have actually changed.
Filter expressions specified in calling registerForRowChanges
are not evaluated.
An upgrade action may call this method to schedule processing on a
row for a future time (when the action calls getRowChanges
).
An exception is thrown if the upgrade action did not previously call
registerForRowChanges
for the specified table.
tableName
- the name of the tableprimaryKey
- the value of the primary keyoperation
- the operation performed: "INSERT
",
"UPDATE
", "DELETE
", or
some action-specific value (that will fit within
VARCHAR2(20)
)IfsException
- if the operation failsCopyright © 2023. All rights reserved.