Package no.priv.bang.handlereg.services
Record Class Transaction
java.lang.Object
java.lang.Record
no.priv.bang.handlereg.services.Transaction
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleThe field for thebeloprecord component.private final StringThe field for thebutikkrecord component.private final DateThe field for thehandletidspunktrecord component.private final intThe field for thestoreIdrecord component.private final intThe field for thetransactionIdrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTransaction(int transactionId, Date handletidspunkt, String butikk, int storeId, double belop) Creates an instance of aTransactionrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublebelop()Returns the value of thebeloprecord component.butikk()Returns the value of thebutikkrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thehandletidspunktrecord component.final inthashCode()Returns a hash code value for this object.intstoreId()Returns the value of thestoreIdrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetransactionIdrecord component.static Transaction.Builderwith()
-
Field Details
-
transactionId
private final int transactionIdThe field for thetransactionIdrecord component. -
handletidspunkt
The field for thehandletidspunktrecord component. -
butikk
The field for thebutikkrecord component. -
storeId
private final int storeIdThe field for thestoreIdrecord component. -
belop
private final double belopThe field for thebeloprecord component.
-
-
Constructor Details
-
Transaction
public Transaction(int transactionId, Date handletidspunkt, String butikk, int storeId, double belop) Creates an instance of aTransactionrecord class.- Parameters:
transactionId- the value for thetransactionIdrecord componenthandletidspunkt- the value for thehandletidspunktrecord componentbutikk- the value for thebutikkrecord componentstoreId- the value for thestoreIdrecord componentbelop- the value for thebeloprecord component
-
-
Method Details
-
with
-
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 '=='. -
transactionId
public int transactionId()Returns the value of thetransactionIdrecord component.- Returns:
- the value of the
transactionIdrecord component
-
handletidspunkt
Returns the value of thehandletidspunktrecord component.- Returns:
- the value of the
handletidspunktrecord component
-
butikk
Returns the value of thebutikkrecord component.- Returns:
- the value of the
butikkrecord component
-
storeId
public int storeId()Returns the value of thestoreIdrecord component.- Returns:
- the value of the
storeIdrecord component
-
belop
public double belop()Returns the value of thebeloprecord component.- Returns:
- the value of the
beloprecord component
-