Record Class PartyId

java.lang.Object
java.lang.Record
edu.suffolk.litlab.efsp.model.PartyId

public record PartyId(String id, edu.suffolk.litlab.efsp.model.PartyId.Kind kind) extends Record
Some reference in a filing to a party that could either be in the current filing or it could already exist in the EFMs system. The ID is whichever of the "Kind" it is.
Author:
brycew
  • Constructor Details

    • PartyId

      public PartyId(String id, edu.suffolk.litlab.efsp.model.PartyId.Kind kind)
      Creates an instance of a PartyId record class.
      Parameters:
      id - the value for the id record component
      kind - the value for the kind record component
  • Method Details

    • CurrentFilingNew

      public static PartyId CurrentFilingNew(String id)
      Factory method where the ID refers to a newly added party in this filing.
    • Already

      public static PartyId Already(String id)
      Factory method where the ID refers to an existing party in the EFM's system.
    • isNewInCurrentFiling

      public boolean isNewInCurrentFiling()
    • isAlreadyInCase

      public boolean isAlreadyInCase()
    • getIdString

      public String getIdString()
    • getIdentificationString

      public String getIdentificationString()
      If we got the ID from Tyler, without the `id-` prefix. Otherwise our same thing.
    • 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
    • kind

      public edu.suffolk.litlab.efsp.model.PartyId.Kind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component