Record Class PendingChanges.PendingChange

java.lang.Object
java.lang.Record
com.ultikits.ultitools.utils.PendingChanges.PendingChange
Enclosing class:
PendingChanges

public static record PendingChanges.PendingChange(String id, String revision, PendingChanges.Kind kind, String module, String fromVersion, String toVersion, List<String> files, Long requestedAt, PendingChanges.Requester requestedBy, PendingChanges.State state, String failure, File recordFile, ModuleContent content) extends Record
One transaction; a download has a provisional id and no on-disk revision.
  • Field Details

    • id

      private final String id
      The field for the id record component.
    • revision

      private final String revision
      The field for the revision record component.
    • kind

      private final PendingChanges.Kind kind
      The field for the kind record component.
    • module

      private final String module
      The field for the module record component.
    • fromVersion

      private final String fromVersion
      The field for the fromVersion record component.
    • toVersion

      private final String toVersion
      The field for the toVersion record component.
    • files

      private final List<String> files
      The field for the files record component.
    • requestedAt

      private final Long requestedAt
      The field for the requestedAt record component.
    • requestedBy

      private final PendingChanges.Requester requestedBy
      The field for the requestedBy record component.
    • state

      private final PendingChanges.State state
      The field for the state record component.
    • failure

      private final String failure
      The field for the failure record component.
    • recordFile

      private final File recordFile
      The field for the recordFile record component.
    • content

      private final ModuleContent content
      The field for the content record component.
  • Constructor Details

    • PendingChange

      public PendingChange(String id, String revision, PendingChanges.Kind kind, String module, String fromVersion, String toVersion, List<String> files, Long requestedAt, PendingChanges.Requester requestedBy, PendingChanges.State state, String failure, File recordFile, ModuleContent content)
      Creates an instance of a PendingChange record class.
      Parameters:
      id - the value for the id record component
      revision - the value for the revision record component
      kind - the value for the kind record component
      module - the value for the module record component
      fromVersion - the value for the fromVersion record component
      toVersion - the value for the toVersion record component
      files - the value for the files record component
      requestedAt - the value for the requestedAt record component
      requestedBy - the value for the requestedBy record component
      state - the value for the state record component
      failure - the value for the failure record component
      recordFile - the value for the recordFile record component
      content - the value for the content record component
  • Method Details

    • revocable

      public boolean revocable()
      Returns:
      whether this state admits a revocation attempt
    • 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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • revision

      public String revision()
      Returns the value of the revision record component.
      Returns:
      the value of the revision record component
    • kind

      public PendingChanges.Kind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • module

      public String module()
      Returns the value of the module record component.
      Returns:
      the value of the module record component
    • fromVersion

      public String fromVersion()
      Returns the value of the fromVersion record component.
      Returns:
      the value of the fromVersion record component
    • toVersion

      public String toVersion()
      Returns the value of the toVersion record component.
      Returns:
      the value of the toVersion record component
    • files

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

      public Long requestedAt()
      Returns the value of the requestedAt record component.
      Returns:
      the value of the requestedAt record component
    • requestedBy

      public PendingChanges.Requester requestedBy()
      Returns the value of the requestedBy record component.
      Returns:
      the value of the requestedBy record component
    • state

      public PendingChanges.State state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • failure

      public String failure()
      Returns the value of the failure record component.
      Returns:
      the value of the failure record component
    • recordFile

      public File recordFile()
      Returns the value of the recordFile record component.
      Returns:
      the value of the recordFile record component
    • content

      public ModuleContent content()
      Returns the value of the content record component.
      Returns:
      the value of the content record component