Record Class ListingView

java.lang.Object
java.lang.Record
de.chojo.universalis.entities.views.ListingView
Record Components:
lastReviewTime - The time that this listing was posted, in seconds since the UNIX epoch.
pricePerUnit - The price per unit sold.
quantity - The stack size sold. //TODO: Add some richer mapping for stains
stainId - The ID of the dye on this item.
worldName - The world name, if applicable.
worldId - The world ID, if applicable.
creatorName - The creator's character name.
creatorId - A SHA256 hash of the creator's ID.
hq - Whether the item is high-quality.
isCrafted - Whether the item is crafted.
listingId - A SHA256 hash of the ID of this listing. Due to some current client-side bugs, this will almost always be null.
materia - The materia on this item.
onMannequin - Whether the item is being sold on a mannequin.
retainerCity - The city ID of the retainer.
retainerId - A SHA256 hash of the retainer's ID.
retainerName - The retainer's name.
sellerId - A SHA256 hash of the seller's ID.
total - The total price.
tax - The Gil sales tax (GST) to be added to the total price during purchase.

public record ListingView(LocalDateTime lastReviewTime, int pricePerUnit, int quantity, int stainId, String worldName, int worldId, String creatorName, String creatorId, boolean hq, boolean isCrafted, String listingId, List<MateriaView> materia, boolean onMannequin, City retainerCity, String retainerId, String retainerName, String sellerId, int total, int tax) extends Record
  • Constructor Details

    • ListingView

      public ListingView(LocalDateTime lastReviewTime, int pricePerUnit, int quantity, int stainId, String worldName, int worldId, String creatorName, String creatorId, boolean hq, boolean isCrafted, String listingId, List<MateriaView> materia, boolean onMannequin, City retainerCity, String retainerId, String retainerName, String sellerId, int total, int tax)
      Creates an instance of a ListingView record class.
      Parameters:
      lastReviewTime - the value for the lastReviewTime record component
      pricePerUnit - the value for the pricePerUnit record component
      quantity - the value for the quantity record component
      stainId - the value for the stainId record component
      worldName - the value for the worldName record component
      worldId - the value for the worldId record component
      creatorName - the value for the creatorName record component
      creatorId - the value for the creatorId record component
      hq - the value for the hq record component
      isCrafted - the value for the isCrafted record component
      listingId - the value for the listingId record component
      materia - the value for the materia record component
      onMannequin - the value for the onMannequin record component
      retainerCity - the value for the retainerCity record component
      retainerId - the value for the retainerId record component
      retainerName - the value for the retainerName record component
      sellerId - the value for the sellerId record component
      total - the value for the total record component
      tax - the value for the tax record component
  • Method Details

    • toListing

      public Listing toListing()
      Converts the ListingView to a Listing object.
      Returns:
      list of sales
    • toListing

      public Listing toListing(World world)
      Converts the ListingView to a Listing object.
      Parameters:
      world - world for the sale
      Returns:
      list of sales
    • equals

      public 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • hashCode

      public 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
    • 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
    • lastReviewTime

      public LocalDateTime lastReviewTime()
      Returns the value of the lastReviewTime record component.
      Returns:
      the value of the lastReviewTime record component
    • pricePerUnit

      public int pricePerUnit()
      Returns the value of the pricePerUnit record component.
      Returns:
      the value of the pricePerUnit record component
    • quantity

      public int quantity()
      Returns the value of the quantity record component.
      Returns:
      the value of the quantity record component
    • stainId

      public int stainId()
      Returns the value of the stainId record component.
      Returns:
      the value of the stainId record component
    • worldName

      public String worldName()
      Returns the value of the worldName record component.
      Returns:
      the value of the worldName record component
    • worldId

      public int worldId()
      Returns the value of the worldId record component.
      Returns:
      the value of the worldId record component
    • creatorName

      public String creatorName()
      Returns the value of the creatorName record component.
      Returns:
      the value of the creatorName record component
    • creatorId

      public String creatorId()
      Returns the value of the creatorId record component.
      Returns:
      the value of the creatorId record component
    • hq

      public boolean hq()
      Returns the value of the hq record component.
      Returns:
      the value of the hq record component
    • isCrafted

      public boolean isCrafted()
      Returns the value of the isCrafted record component.
      Returns:
      the value of the isCrafted record component
    • listingId

      public String listingId()
      Returns the value of the listingId record component.
      Returns:
      the value of the listingId record component
    • materia

      public List<MateriaView> materia()
      Returns the value of the materia record component.
      Returns:
      the value of the materia record component
    • onMannequin

      public boolean onMannequin()
      Returns the value of the onMannequin record component.
      Returns:
      the value of the onMannequin record component
    • retainerCity

      public City retainerCity()
      Returns the value of the retainerCity record component.
      Returns:
      the value of the retainerCity record component
    • retainerId

      public String retainerId()
      Returns the value of the retainerId record component.
      Returns:
      the value of the retainerId record component
    • retainerName

      public String retainerName()
      Returns the value of the retainerName record component.
      Returns:
      the value of the retainerName record component
    • sellerId

      public String sellerId()
      Returns the value of the sellerId record component.
      Returns:
      the value of the sellerId record component
    • total

      public int total()
      Returns the value of the total record component.
      Returns:
      the value of the total record component
    • tax

      public int tax()
      Returns the value of the tax record component.
      Returns:
      the value of the tax record component