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 stainsstainId- 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 Summary
ConstructorsConstructorDescriptionListingView(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 aListingViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreatorIdrecord component.Returns the value of thecreatorNamerecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.booleanhq()Returns the value of thehqrecord component.booleanReturns the value of theisCraftedrecord component.Returns the value of thelastReviewTimerecord component.Returns the value of thelistingIdrecord component.materia()Returns the value of themateriarecord component.booleanReturns the value of theonMannequinrecord component.intReturns the value of thepricePerUnitrecord component.intquantity()Returns the value of thequantityrecord component.Returns the value of theretainerCityrecord component.Returns the value of theretainerIdrecord component.Returns the value of theretainerNamerecord component.sellerId()Returns the value of thesellerIdrecord component.intstainId()Returns the value of thestainIdrecord component.inttax()Returns the value of thetaxrecord component.Converts theListingViewto aListingobject.Converts theListingViewto aListingobject.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.intworldId()Returns the value of theworldIdrecord component.Returns the value of theworldNamerecord component.
-
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 aListingViewrecord class.- Parameters:
lastReviewTime- the value for thelastReviewTimerecord componentpricePerUnit- the value for thepricePerUnitrecord componentquantity- the value for thequantityrecord componentstainId- the value for thestainIdrecord componentworldName- the value for theworldNamerecord componentworldId- the value for theworldIdrecord componentcreatorName- the value for thecreatorNamerecord componentcreatorId- the value for thecreatorIdrecord componenthq- the value for thehqrecord componentisCrafted- the value for theisCraftedrecord componentlistingId- the value for thelistingIdrecord componentmateria- the value for themateriarecord componentonMannequin- the value for theonMannequinrecord componentretainerCity- the value for theretainerCityrecord componentretainerId- the value for theretainerIdrecord componentretainerName- the value for theretainerNamerecord componentsellerId- the value for thesellerIdrecord componenttotal- the value for thetotalrecord componenttax- the value for thetaxrecord component
-
-
Method Details
-
toListing
Converts theListingViewto aListingobject.- Returns:
- list of sales
-
toListing
Converts theListingViewto aListingobject.- Parameters:
world- world for the sale- Returns:
- list of sales
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
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. -
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. -
lastReviewTime
Returns the value of thelastReviewTimerecord component.- Returns:
- the value of the
lastReviewTimerecord component
-
pricePerUnit
public int pricePerUnit()Returns the value of thepricePerUnitrecord component.- Returns:
- the value of the
pricePerUnitrecord component
-
quantity
public int quantity()Returns the value of thequantityrecord component.- Returns:
- the value of the
quantityrecord component
-
stainId
public int stainId()Returns the value of thestainIdrecord component.- Returns:
- the value of the
stainIdrecord component
-
worldName
Returns the value of theworldNamerecord component.- Returns:
- the value of the
worldNamerecord component
-
worldId
public int worldId()Returns the value of theworldIdrecord component.- Returns:
- the value of the
worldIdrecord component
-
creatorName
Returns the value of thecreatorNamerecord component.- Returns:
- the value of the
creatorNamerecord component
-
creatorId
Returns the value of thecreatorIdrecord component.- Returns:
- the value of the
creatorIdrecord component
-
hq
public boolean hq()Returns the value of thehqrecord component.- Returns:
- the value of the
hqrecord component
-
isCrafted
public boolean isCrafted()Returns the value of theisCraftedrecord component.- Returns:
- the value of the
isCraftedrecord component
-
listingId
Returns the value of thelistingIdrecord component.- Returns:
- the value of the
listingIdrecord component
-
materia
Returns the value of themateriarecord component.- Returns:
- the value of the
materiarecord component
-
onMannequin
public boolean onMannequin()Returns the value of theonMannequinrecord component.- Returns:
- the value of the
onMannequinrecord component
-
retainerCity
Returns the value of theretainerCityrecord component.- Returns:
- the value of the
retainerCityrecord component
-
retainerId
Returns the value of theretainerIdrecord component.- Returns:
- the value of the
retainerIdrecord component
-
retainerName
Returns the value of theretainerNamerecord component.- Returns:
- the value of the
retainerNamerecord component
-
sellerId
Returns the value of thesellerIdrecord component.- Returns:
- the value of the
sellerIdrecord component
-
total
public int total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-
tax
public int tax()Returns the value of thetaxrecord component.- Returns:
- the value of the
taxrecord component
-