Record Class TriggerTypes.TriggerDefinition

java.lang.Object
java.lang.Record
app.ductape.sdk.database.types.TriggerTypes.TriggerDefinition
Enclosing class:
TriggerTypes

public static record TriggerTypes.TriggerDefinition(String name, String description, List<TriggerTypes.TriggerEvent> events, List<String> tables, Map<String,Object> condition, List<Map<String,Object>> actions, Boolean enabled, Integer priority, List<String> tags) extends Record
Full trigger definition. actions entries are Maps shaped like TS ITriggerAction. condition is a Map for compound conditions or convert TriggerTypes.ConditionClause to a map.
  • Constructor Details

    • TriggerDefinition

      public TriggerDefinition(String name, String description, List<TriggerTypes.TriggerEvent> events, List<String> tables, Map<String,Object> condition, List<Map<String,Object>> actions, Boolean enabled, Integer priority, List<String> tags)
      Creates an instance of a TriggerDefinition record class.
      Parameters:
      name - the value for the name record component
      description - the value for the description record component
      events - the value for the events record component
      tables - the value for the tables record component
      condition - the value for the condition record component
      actions - the value for the actions record component
      enabled - the value for the enabled record component
      priority - the value for the priority record component
      tags - the value for the tags record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • events

      public List<TriggerTypes.TriggerEvent> events()
      Returns the value of the events record component.
      Returns:
      the value of the events record component
    • tables

      public List<String> tables()
      Returns the value of the tables record component.
      Returns:
      the value of the tables record component
    • condition

      public Map<String,Object> condition()
      Returns the value of the condition record component.
      Returns:
      the value of the condition record component
    • actions

      public List<Map<String,Object>> actions()
      Returns the value of the actions record component.
      Returns:
      the value of the actions record component
    • enabled

      public Boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • priority

      public Integer priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • tags

      public List<String> tags()
      Returns the value of the tags record component.
      Returns:
      the value of the tags record component