Package no.priv.bang.ukelonn.beans
Record Class UpdatedTransaction
java.lang.Object
java.lang.Record
no.priv.bang.ukelonn.beans.UpdatedTransaction
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theaccountIdrecord component.private final intThe field for theidrecord component.private final doubleThe field for thetransactionAmountrecord component.private final DateThe field for thetransactionTimerecord component.private final intThe field for thetransactionTypeIdrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUpdatedTransaction(int id, int accountId, int transactionTypeId, Date transactionTime, double transactionAmount) Creates an instance of aUpdatedTransactionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theaccountIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetransactionAmountrecord component.Returns the value of thetransactionTimerecord component.intReturns the value of thetransactionTypeIdrecord component.static UpdatedTransaction.Builderwith()
-
Field Details
-
id
private final int idThe field for theidrecord component. -
accountId
private final int accountIdThe field for theaccountIdrecord component. -
transactionTypeId
private final int transactionTypeIdThe field for thetransactionTypeIdrecord component. -
transactionTime
The field for thetransactionTimerecord component. -
transactionAmount
private final double transactionAmountThe field for thetransactionAmountrecord component.
-
-
Constructor Details
-
UpdatedTransaction
public UpdatedTransaction(int id, int accountId, int transactionTypeId, Date transactionTime, double transactionAmount) Creates an instance of aUpdatedTransactionrecord class.- Parameters:
id- the value for theidrecord componentaccountId- the value for theaccountIdrecord componenttransactionTypeId- the value for thetransactionTypeIdrecord componenttransactionTime- the value for thetransactionTimerecord componenttransactionAmount- the value for thetransactionAmountrecord 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 '=='. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
accountId
public int accountId()Returns the value of theaccountIdrecord component.- Returns:
- the value of the
accountIdrecord component
-
transactionTypeId
public int transactionTypeId()Returns the value of thetransactionTypeIdrecord component.- Returns:
- the value of the
transactionTypeIdrecord component
-
transactionTime
Returns the value of thetransactionTimerecord component.- Returns:
- the value of the
transactionTimerecord component
-
transactionAmount
public double transactionAmount()Returns the value of thetransactionAmountrecord component.- Returns:
- the value of the
transactionAmountrecord component
-