Package ee.jakarta.tck.nosql.entities
Record Class Book
java.lang.Object
java.lang.Record
ee.jakarta.tck.nosql.entities.Book
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthor()Returns the value of theauthorrecord component.final booleanIndicates whether some other object is "equal to" this one.genre()Returns the value of thegenrerecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.static Bookof(net.datafaker.Faker faker) Returns the value of thepublisherrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Book
Creates an instance of aBookrecord class.- Parameters:
id- the value for theidrecord componenttitle- the value for thetitlerecord componentauthor- the value for theauthorrecord componentpublisher- the value for thepublisherrecord componentgenre- the value for thegenrerecord component
-
-
Method Details
-
of
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
author
Returns the value of theauthorrecord component.- Returns:
- the value of the
authorrecord component
-
publisher
Returns the value of thepublisherrecord component.- Returns:
- the value of the
publisherrecord component
-
genre
Returns the value of thegenrerecord component.- Returns:
- the value of the
genrerecord component
-