java.lang.Object
java.lang.Record
it.auties.whatsapp.model.business.BusinessCatalogEntry
- Record Components:
id- the unique identifier of the catalog entryencryptedImage- the encrypted URL of the original image of the catalog entryreviewStatus- the review status of the catalog entryavailability- the availability status of the catalog entryname- the name of the catalog entrysellerId- the unique identifier of the seller of the catalog entryuri- the URI of the catalog entrydescription- the description of the catalog entryprice- the price of the catalog entrycurrency- the currency of the price of the catalog entry- whether the catalog entry is hidden or not
public record BusinessCatalogEntry(String id, URI encryptedImage, BusinessReviewStatus reviewStatus, BusinessItemAvailability availability, String name, String sellerId, URI uri, String description, long price, String currency, boolean hidden)
extends Record
A record class that represents a business catalog entry.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BusinessItemAvailabilityThe field for theavailabilityrecord component.private final StringThe field for thecurrencyrecord component.private final StringThe field for thedescriptionrecord component.private final URIThe field for theencryptedImagerecord component.private final booleanThe field for thehiddenrecord component.private final StringThe field for theidrecord component.private final StringThe field for thenamerecord component.private final longThe field for thepricerecord component.private final BusinessReviewStatusThe field for thereviewStatusrecord component.private final StringThe field for thesellerIdrecord component.private final URIThe field for theurirecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBusinessCatalogEntry(String id, URI encryptedImage, BusinessReviewStatus reviewStatus, BusinessItemAvailability availability, String name, String sellerId, URI uri, String description, long price, String currency, boolean hidden) Creates an instance of aBusinessCatalogEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theavailabilityrecord component.currency()Returns the value of thecurrencyrecord component.Returns the value of thedescriptionrecord component.Returns the value of theencryptedImagerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhidden()Returns the value of thehiddenrecord component.id()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.static BusinessCatalogEntryA factory method that creates a BusinessCatalogEntry object from a given Node.longprice()Returns the value of thepricerecord component.Returns the value of thereviewStatusrecord component.sellerId()Returns the value of thesellerIdrecord component.final StringtoString()Returns a string representation of this record class.uri()Returns the value of theurirecord component.
-
Field Details
-
id
The field for theidrecord component. -
encryptedImage
The field for theencryptedImagerecord component. -
reviewStatus
The field for thereviewStatusrecord component. -
availability
The field for theavailabilityrecord component. -
name
The field for thenamerecord component. -
sellerId
The field for thesellerIdrecord component. -
uri
The field for theurirecord component. -
description
The field for thedescriptionrecord component. -
price
private final long priceThe field for thepricerecord component. -
currency
The field for thecurrencyrecord component.
-
-
Constructor Details
-
BusinessCatalogEntry
public BusinessCatalogEntry(String id, URI encryptedImage, BusinessReviewStatus reviewStatus, BusinessItemAvailability availability, String name, String sellerId, URI uri, String description, long price, String currency, boolean hidden) Creates an instance of aBusinessCatalogEntryrecord class.- Parameters:
id- the value for theidrecord componentencryptedImage- the value for theencryptedImagerecord componentreviewStatus- the value for thereviewStatusrecord componentavailability- the value for theavailabilityrecord componentname- the value for thenamerecord componentsellerId- the value for thesellerIdrecord componenturi- the value for theurirecord componentdescription- the value for thedescriptionrecord componentprice- the value for thepricerecord componentcurrency- the value for thecurrencyrecord componenthidden- the value for thehiddenrecord component
-
-
Method Details
-
of
A factory method that creates a BusinessCatalogEntry object from a given Node.- Parameters:
node- the node to get the data from- Returns:
- a BusinessCatalogEntry object
- Throws:
NoSuchElementException- if some required data is missing
-
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. -
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. -
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
encryptedImage
Returns the value of theencryptedImagerecord component.- Returns:
- the value of the
encryptedImagerecord component
-
reviewStatus
Returns the value of thereviewStatusrecord component.- Returns:
- the value of the
reviewStatusrecord component
-
availability
Returns the value of theavailabilityrecord component.- Returns:
- the value of the
availabilityrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
sellerId
Returns the value of thesellerIdrecord component.- Returns:
- the value of the
sellerIdrecord component
-
uri
Returns the value of theurirecord component.- Returns:
- the value of the
urirecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
price
public long price()Returns the value of thepricerecord component.- Returns:
- the value of the
pricerecord component
-
currency
Returns the value of thecurrencyrecord component.- Returns:
- the value of the
currencyrecord component
-