public interface Event
| Modifier and Type | Interface and Description |
|---|---|
static class |
Event.Type
Enumeration of the types of callback events.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDMLString()
Get the DML string for
Event.Type.BEFORE_INSERT, Event.Type.AFTER_INSERT,
Event.Type.BEFORE_UPDATE, Event.Type.AFTER_UPDATE, Event.Type.BEFORE_DELETE
or Event.Type.AFTER_DELETE operation when called from EventCallback and
Event.Type.BULK_DML or Event.Type.BULK_INSERT when AsyncEventListener |
int[] |
getModifiedColumns()
Deprecated.
Will be removed in a future release. Use returned
TableMetaData by ResultSet.getMetaData()
instead on the getNewRowsAsResultSet() to get the
meta-data of the updated columns. |
java.util.List<java.lang.Object> |
getNewRow()
Deprecated.
Will be removed in a future release. Use
getNewRowsAsResultSet() instead which will return a
valid ResultSet for all operation types and provide
more flexible ways to extract the column values, avoiding
having to create java objects for all the columns. |
java.sql.ResultSet |
getNewRowsAsResultSet()
Get the new rows being inserted/updated as a
ResultSet.TYPE_FORWARD_ONLY ResultSet. |
java.util.List<java.lang.Object> |
getOldRow()
Deprecated.
Will be removed in a future release. Use
getOldRowAsResultSet() instead which will return a
valid ResultSet for all operation types and provide
more flexible ways to extract the column values, avoiding
having to create java objects for all the columns. |
java.sql.ResultSet |
getOldRowAsResultSet()
Get the old row being updated as a
ResultSet.TYPE_FORWARD_ONLY
ResultSet of the column values. |
java.lang.Object[] |
getPrimaryKey()
Deprecated.
use
getPrimaryKeysAsResultSet() instead which will
provide more flexible ways to extract the column values and
avoid having to create java objects for all the columns |
java.sql.ResultSet |
getPrimaryKeysAsResultSet()
Get the primary key of the changed rows as a
ResultSet having
ResultSet.TYPE_FORWARD_ONLY cursor. |
TableMetaData |
getResultSetMetaData()
Gets the metadata information of the table being updated.
|
java.lang.String |
getSchemaName()
The schema for the current operation.
|
java.lang.String |
getTableName()
The fully qualified table name for the current operation.
|
int |
getTableSchemaVersion()
A version number for the current row's table version.
|
Event.Type |
getType()
Get the
Type of the event. |
boolean |
hasParameters()
Returns true if this is a
Event.Type.BULK_INSERT operation or a
Event.Type.BULK_DML operation having parameters for the prepared
statement and false otherwise. |
boolean |
isEviction()
Returns whether the event is generated due to eviction of a row.
|
boolean |
isExpiration()
Returns whether the event is generated due to expiration of a row.
|
boolean |
isLoad()
Returns whether the event is generated due to a
RowLoader
invocation |
boolean |
isOriginRemote()
Indicates whether this event originated in a VM other than this one.
|
boolean |
isPossibleDuplicate()
Indicates whether the event received is possibly a duplicate.
|
boolean |
isTransactional()
Indicates whether the event received is from commit of a transaction.
|
boolean |
tableHasAutogeneratedColumns()
Returns true if the table for current operation has auto-generated columns.
|
Event.Type getType()
Type of the event.@Deprecated
java.util.List<java.lang.Object> getOldRow()
throws java.lang.UnsupportedOperationException
getOldRowAsResultSet() instead which will return a
valid ResultSet for all operation types and provide
more flexible ways to extract the column values, avoiding
having to create java objects for all the columns.List of the column values.
For a Event.Type.BULK_DML or Event.Type.BULK_INSERT operation, this
throws an UnsupportedOperationException.java.lang.UnsupportedOperationException - for Event.Type.BULK_DML and Event.Type.BULK_INSERT operationsjava.sql.ResultSet getOldRowAsResultSet()
throws java.lang.UnsupportedOperationException
ResultSet.TYPE_FORWARD_ONLY
ResultSet of the column values. The returned ResultSet is
already positioned at the returned single row with ResultSet.next()
always returning false, whose column values can be retrieved using the
ResultSet getter methods. For a Event.Type.BULK_DML or
Event.Type.BULK_INSERT operation, this throws an
UnsupportedOperationException.ResultSet or null if the old row is
not availablejava.lang.UnsupportedOperationException - for Event.Type.BULK_DML and Event.Type.BULK_INSERT operations@Deprecated
java.util.List<java.lang.Object> getNewRow()
throws java.lang.UnsupportedOperationException
getNewRowsAsResultSet() instead which will return a
valid ResultSet for all operation types and provide
more flexible ways to extract the column values, avoiding
having to create java objects for all the columns.List of the column values. For
a delete operation this returns null. For a Event.Type.BULK_DML
operation, this is the set of parameters to the statement used for a
prepared statement, or null if there are no parameters. For a
Event.Type.BULK_INSERT operation this throws an
UnsupportedOperationException.Event.Type.BULK_DML operation having no
parametersjava.lang.UnsupportedOperationException - for a Event.Type.BULK_INSERT operationjava.sql.ResultSet getNewRowsAsResultSet()
ResultSet.TYPE_FORWARD_ONLY ResultSet. For
Event.Type.BULK_INSERT operation, it returns the set of rows being
inserted. For delete operations, it returns null. For all other operations,
the returned ResultSet is already positioned at the returned single
row with ResultSet.next() always returning false, whose column
values can be retrieved using the ResultSet getter methods.
The meta-data returned by the ResultSet's getMetaData method
will be a projection TableMetaData of the columns updated for the
update operation, a projection ResultSetMetaData of the columns
updated for Event.Type.BULK_DML operation, and the full table meta-data
(i.e. same as getResultSetMetaData() for other operations.ResultSetTableMetaData getResultSetMetaData()
TableMetaData of the table being updated.java.lang.String getDMLString()
Event.Type.BEFORE_INSERT, Event.Type.AFTER_INSERT,
Event.Type.BEFORE_UPDATE, Event.Type.AFTER_UPDATE, Event.Type.BEFORE_DELETE
or Event.Type.AFTER_DELETE operation when called from EventCallback and
Event.Type.BULK_DML or Event.Type.BULK_INSERT when AsyncEventListenerjava.lang.String getSchemaName()
java.lang.String getTableName()
int getTableSchemaVersion()
@Deprecated
int[] getModifiedColumns()
throws java.lang.UnsupportedOperationException
TableMetaData by ResultSet.getMetaData()
instead on the getNewRowsAsResultSet() to get the
meta-data of the updated columns.getResultSetMetaData(). The modified column values can be
obtained from the new value from getNewRowsAsResultSet().java.lang.UnsupportedOperationException - for Event.Type.BULK_DML and Event.Type.BULK_INSERT operations@Deprecated
java.lang.Object[] getPrimaryKey()
throws java.lang.UnsupportedOperationException
getPrimaryKeysAsResultSet() instead which will
provide more flexible ways to extract the column values and
avoid having to create java objects for all the columnsjava.lang.UnsupportedOperationException - for Event.Type.BULK_DML and Event.Type.BULK_INSERT operationsjava.sql.ResultSet getPrimaryKeysAsResultSet()
throws java.lang.UnsupportedOperationException
ResultSet having
ResultSet.TYPE_FORWARD_ONLY cursor. For Event.Type.BULK_INSERT
operation, it returns all the primary key column values being inserted. If
there is no primary key defined on the table then it returns null for
Event.Type.BULK_INSERT. For other operations, the returned
ResultSet does not support the cursor movement operations like
ResultSet.next() etc. returning just a single current row whose
column values can be retrieved using the ResultSet getter methods. A single
column having a unique long row ID is returned for the case there is no
primary key defined on the table.ResultSetjava.lang.UnsupportedOperationException - for a Event.Type.BULK_DML operationboolean hasParameters()
Event.Type.BULK_INSERT operation or a
Event.Type.BULK_DML operation having parameters for the prepared
statement and false otherwise.boolean tableHasAutogeneratedColumns()
AsyncEventListener
receives the operation as a Event.Type.BULK_DML operation rather than as
an insert operation since the auto-generated column values will be skipped
from the parameter values.boolean isOriginRemote()
boolean isPossibleDuplicate()
boolean isTransactional()
boolean isLoad()
RowLoader
invocationRowLoader
invocation or false otherwiseboolean isExpiration()
boolean isEviction()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.