Package app.ductape.sdk.database.types
Record Class TriggerTypes.TriggerContext
java.lang.Object
java.lang.Record
app.ductape.sdk.database.types.TriggerTypes.TriggerContext
- Enclosing class:
- TriggerTypes
public static record TriggerTypes.TriggerContext(TriggerTypes.TriggerEvent event, String table, String database, String env, String product, Map<String,Object> record, Map<String,Object> previousRecord, List<String> changedFields, String operation, Instant timestamp, Map<String,Object> user, Object transaction, Map<String,Object> metadata)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionTriggerContext(TriggerTypes.TriggerEvent event, String table, String database, String env, String product, Map<String, Object> record, Map<String, Object> previousRecord, List<String> changedFields, String operation, Instant timestamp, Map<String, Object> user, Object transaction, Map<String, Object> metadata) Creates an instance of aTriggerContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechangedFieldsrecord component.database()Returns the value of thedatabaserecord component.env()Returns the value of theenvrecord component.final booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.Returns the value of theoperationrecord component.Returns the value of thepreviousRecordrecord component.product()Returns the value of theproductrecord component.record()Returns the value of therecordrecord component.table()Returns the value of thetablerecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransactionrecord component.user()Returns the value of theuserrecord component.
-
Constructor Details
-
TriggerContext
public TriggerContext(TriggerTypes.TriggerEvent event, String table, String database, String env, String product, Map<String, Object> record, Map<String, Object> previousRecord, List<String> changedFields, String operation, Instant timestamp, Map<String, Object> user, Object transaction, Map<String, Object> metadata) Creates an instance of aTriggerContextrecord class.- Parameters:
event- the value for theeventrecord componenttable- the value for thetablerecord componentdatabase- the value for thedatabaserecord componentenv- the value for theenvrecord componentproduct- the value for theproductrecord componentrecord- the value for therecordrecord componentpreviousRecord- the value for thepreviousRecordrecord componentchangedFields- the value for thechangedFieldsrecord componentoperation- the value for theoperationrecord componenttimestamp- the value for thetimestamprecord componentuser- the value for theuserrecord componenttransaction- the value for thetransactionrecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
event
Returns the value of theeventrecord component.- Returns:
- the value of the
eventrecord component
-
table
Returns the value of thetablerecord component.- Returns:
- the value of the
tablerecord component
-
database
Returns the value of thedatabaserecord component.- Returns:
- the value of the
databaserecord component
-
env
Returns the value of theenvrecord component.- Returns:
- the value of the
envrecord component
-
product
Returns the value of theproductrecord component.- Returns:
- the value of the
productrecord component
-
record
Returns the value of therecordrecord component.- Returns:
- the value of the
recordrecord component
-
previousRecord
Returns the value of thepreviousRecordrecord component.- Returns:
- the value of the
previousRecordrecord component
-
changedFields
Returns the value of thechangedFieldsrecord component.- Returns:
- the value of the
changedFieldsrecord component
-
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
transaction
Returns the value of thetransactionrecord component.- Returns:
- the value of the
transactionrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-