-
- All Superinterfaces:
Scope
public interface RecordContext extends Scope
A context object forRecord
manipulation passed to registeredRecordListener
's.- Author:
- Lukas Eder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Record[]
batchRecords()
TheRecord
(s) that are being manipulated in batch mode.@Nullable Exception
exception()
TheException
being thrown ornull
.@NotNull Record
record()
TheRecord
that is being manipulated.@NotNull RecordType<?>
recordType()
TheRecordType
of therecord()
that is being manipulated.@NotNull ExecuteType
type()
The type of database interaction that is being executed.
-
-
-
Method Detail
-
type
@NotNull @NotNull ExecuteType type()
The type of database interaction that is being executed.Unlike
ExecuteContext.type()
, this can only result in any of these:ExecuteType.BATCH
when callingbatchStore()
,batchInsert()
,batchUpdate()
,batchDelete()
.ExecuteType.READ
when callingrefresh()
ExecuteType.WRITE
when callingstore()
,insert()
,update()
,delete()
.
- See Also:
ExecuteType
-
record
@NotNull @NotNull Record record()
TheRecord
that is being manipulated.- Returns:
- The
Record
being manipulated. This is nevernull
-
recordType
@NotNull @NotNull RecordType<?> recordType()
TheRecordType
of therecord()
that is being manipulated.- Returns:
- The
RecordType
being manipulated. This is nevernull
.
-
batchRecords
@NotNull @NotNull Record[] batchRecords()
TheRecord
(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 length1
, containing thatRecord
.- Returns:
- The
Record
(s) being manipulated. This is nevernull
-
-