Record Class FailedSet

java.lang.Object
java.lang.Record
xyz.srnyx.annoyingapi.storage.FailedSet
Record Components:
table - The table that the set operation failed on
target - The target that the set operation failed for
column - The column that the set operation failed on
value - The value that the set operation failed with
exception - The exception that occurred while attempting to set the value

public record FailedSet(@NotNull String table, @NotNull String target, @NotNull String column, @Nullable String value, @Nullable Throwable exception) extends Record
Represents a failed set operation
  • Constructor Details

    • FailedSet

      public FailedSet(@NotNull @NotNull String table, @NotNull @NotNull String target, @NotNull @NotNull String column, @Nullable @Nullable String value)
      Constructs a new failed set with the given table, target, column, and value
      Parameters:
      table - table
      target - target
      column - column
      value - value
    • FailedSet

      public FailedSet(@NotNull @NotNull String table, @NotNull @NotNull String target, @NotNull @NotNull String column, @Nullable @Nullable String value, @Nullable @Nullable Throwable exception)
      Creates an instance of a FailedSet record class.
      Parameters:
      table - the value for the table record component
      target - the value for the target record component
      column - the value for the column record component
      value - the value for the value record component
      exception - the value for the exception 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.
    • table

      @NotNull public @NotNull String table()
      Returns the value of the table record component.
      Returns:
      the value of the table record component
    • target

      @NotNull public @NotNull String target()
      Returns the value of the target record component.
      Returns:
      the value of the target record component
    • column

      @NotNull public @NotNull String column()
      Returns the value of the column record component.
      Returns:
      the value of the column record component
    • value

      @Nullable public @Nullable String value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component
    • exception

      @Nullable public @Nullable Throwable exception()
      Returns the value of the exception record component.
      Returns:
      the value of the exception record component