Record Class EconomyTransaction.Deposit
java.lang.Object
java.lang.Record
com.cotani.economy.transaction.EconomyTransaction.Deposit
- All Implemented Interfaces:
EconomyTransaction
- Enclosing interface:
EconomyTransaction
public static record EconomyTransaction.Deposit(EconomyTransactionId id, EconomyTransactionDetails details, EconomyBalanceChange targetChange)
extends Record
implements EconomyTransaction
-
Nested Class Summary
Nested classes/interfaces inherited from interface EconomyTransaction
EconomyTransaction.Deposit, EconomyTransaction.Set, EconomyTransaction.Transfer, EconomyTransaction.Withdraw -
Constructor Summary
ConstructorsConstructorDescriptionDeposit(EconomyTransactionId id, EconomyTransactionDetails details, EconomyBalanceChange targetChange) Creates an instance of aDepositrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondetails()Returns the value of thedetailsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.source()@NonNull BigDecimal@NonNull BigDecimalReturns the value of thetargetChangerecord component.@NonNull UUIDfinal StringtoString()Returns a string representation of this record class.type()Methods inherited from interface EconomyTransaction
amount, createdAt, currencyId, operationId, optionalSourceBalanceAfter, optionalSourceBalanceBefore, optionalTargetBalanceAfter, optionalTargetBalanceBefore, reason, sourceBalanceAfter, sourceBalanceBefore, sourceUserId, target
-
Constructor Details
-
Deposit
public Deposit(EconomyTransactionId id, EconomyTransactionDetails details, EconomyBalanceChange targetChange) Creates an instance of aDepositrecord class.- Parameters:
id- the value for theidrecord componentdetails- the value for thedetailsrecord componenttargetChange- the value for thetargetChangerecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceEconomyTransaction
-
source
- Specified by:
sourcein interfaceEconomyTransaction
-
targetUserId
- Specified by:
targetUserIdin interfaceEconomyTransaction
-
targetBalanceBefore
- Specified by:
targetBalanceBeforein interfaceEconomyTransaction
-
targetBalanceAfter
- Specified by:
targetBalanceAfterin interfaceEconomyTransaction
-
toString
-
hashCode
-
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.- Specified by:
idin interfaceEconomyTransaction- Returns:
- the value of the
idrecord component
-
details
Returns the value of thedetailsrecord component.- Specified by:
detailsin interfaceEconomyTransaction- Returns:
- the value of the
detailsrecord component
-
targetChange
Returns the value of thetargetChangerecord component.- Returns:
- the value of the
targetChangerecord component
-