public interface RecordContext
Record
manipulation passed to registered
RecordListener
's.Modifier and Type | Method and Description |
---|---|
Record[] |
batchRecords()
The
Record (s) that are being manipulated in batch mode. |
Configuration |
configuration()
The configuration wrapped by this context.
|
Map<Object,Object> |
data()
Get all custom data from this
RecordContext . |
Object |
data(Object key)
Get some custom data from this
RecordContext . |
Object |
data(Object key,
Object value)
Set some custom data to this
RecordContext . |
Exception |
exception()
The
Exception being thrown or null . |
Record |
record()
The
Record that is being manipulated. |
ExecuteType |
type()
The type of database interaction that is being executed.
|
Map<Object,Object> data()
RecordContext
.
This is custom data that was previously set to the record context using
data(Object, Object)
. Use custom data if you want to pass data
between events received by a RecordListener
.
Unlike Configuration.data()
, these data's lifecycle only matches
that of a single record manipulation.
null
RecordListener
Object data(Object key)
RecordContext
.
This is custom data that was previously set to the record context using
data(Object, Object)
. Use custom data if you want to pass data
between events received by an RecordListener
.
Unlike Configuration.data()
, these data's lifecycle only matches
that of a single query execution.
key
- A key to identify the custom datanull
if no such data is contained
in this RecordContext
RecordListener
Object data(Object key, Object value)
RecordContext
.
This is custom data that was previously set to the record context using
data(Object, Object)
. Use custom data if you want to pass data
between events received by an RecordListener
.
Unlike Configuration.data()
, these data's lifecycle only matches
that of a single query execution.
key
- A key to identify the custom datavalue
- The custom datanull
if no data
was previously set for the given keyRecordListener
Configuration configuration()
ExecuteType type()
Unlike ExecuteContext.type()
, this can only result in any of
these:
ExecuteType.BATCH
when calling
batchStore()
,
batchInsert()
,
batchUpdate()
,
batchDelete()
.ExecuteType.READ
when calling
refresh()
ExecuteType.WRITE
when calling
store()
, insert()
, update()
,
delete()
.ExecuteType
Record record()
Record
that is being manipulated.Record
being manipulated. This is never
null
Record[] batchRecords()
Record
(s) that are being manipulated in batch mode.
If a single Record
is being manipulated in non-batch mode,
this will return an array of length 1
, containing that
Record
.
Record
(s) being manipulated. This is never
null
Copyright © 2014. All Rights Reserved.