Package org.cyclos.entities.banking
Class Transfer
- java.lang.Object
-
- org.cyclos.entities.SimpleEntity
-
- org.cyclos.entities.NetworkedEntity
-
- org.cyclos.entities.banking.Transfer
-
- All Implemented Interfaces:
Cloneable,HasCurrency,HasCurrencyAmount,Trans,HasNetwork,ProcessableForProxying,RatedEntity,HasTransactionNumber,IEntity,HasAmount
- Direct Known Subclasses:
AccountFeeTransfer,BalanceDisposalTransfer,ChargebackTransfer,ImportTransfer,InitialCreditTransfer,InstallmentTransfer,PaymentTransfer,TransferFeeTransfer
@Entity public abstract class Transfer extends NetworkedEntity implements Trans, RatedEntity
Abstract class for a single, atomic transfer between accounts
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cyclos.entities.SimpleEntity
SimpleEntity.EntityLoadNotifier
-
-
Field Summary
Fields Modifier and Type Field Description protected BooleanpendingNotificationFlag indicating whether this payment was already processed for sending notifications
-
Constructor Summary
Constructors Constructor Description Transfer()
-
Method Summary
-
Methods inherited from class org.cyclos.entities.NetworkedEntity
isGlobal
-
Methods inherited from class org.cyclos.entities.SimpleEntity
equals, getId, hashCode, id, ids, isPersistent, isTransient, register, setId, toShortString, toString, uniqueIds, uniqueIds
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cyclos.entities.banking.HasCurrency
round, withCurrency
-
Methods inherited from interface org.cyclos.entities.banking.HasCurrencyAmount
getCurrencyAmount
-
Methods inherited from interface org.cyclos.entities.ProcessableForProxying
getProxyClass
-
Methods inherited from interface org.cyclos.entities.banking.Trans
getActualAmount, getCustomValuesForExport, getFromOwnerOrType, getFromType, getFromUser, getRelatedAccount, getRelatedOwner, getToOwnerOrType, getToType, getToUser, getTransactionNumberOrId, isDebit, isFromSystem, isFromUser, isToSystem, isToUser
-
-
-
-
Field Detail
-
pendingNotification
protected Boolean pendingNotification
Flag indicating whether this payment was already processed for sending notifications
-
-
Method Detail
-
getAccessClient
public AccessClient getAccessClient()
- Specified by:
getAccessClientin interfaceTrans
-
getAmount
public BigDecimal getAmount()
-
getChannel
public Channel getChannel()
- Specified by:
getChannelin interfaceTrans
-
getChargedBackBy
public ChargebackTransfer getChargedBackBy()
-
getCurrency
public Currency getCurrency()
- Specified by:
getCurrencyin interfaceHasCurrency
-
getCustomValues
public Set<TransactionCustomFieldValue> getCustomValues()
- Specified by:
getCustomValuesin interfaceTrans
-
getEmissionDate
public Date getEmissionDate()
- Specified by:
getEmissionDatein interfaceRatedEntity
-
getExpirationDate
public Date getExpirationDate()
- Specified by:
getExpirationDatein interfaceRatedEntity
-
getFromName
public String getFromName()
- Specified by:
getFromNamein interfaceTrans
-
getFromOwner
public InternalAccountOwner getFromOwner()
- Specified by:
getFromOwnerin interfaceTrans
-
getNetwork
public Network getNetwork()
Description copied from interface:HasNetworkReturns the network this entity belongs to- Specified by:
getNetworkin interfaceHasNetwork
-
getParent
public Transfer getParent()
-
getRoot
public Transfer getRoot()
Returns the root transfer in the hierarchy. When this transfer is already a root, returns itself.
-
getStatus
public TransferStatus getStatus(TransferStatusFlow flow)
Returns the status for the given flow
-
getStatuses
public Set<TransferStatus> getStatuses()
Returns all statuses, one per flow
-
getToOwner
public InternalAccountOwner getToOwner()
- Specified by:
getToOwnerin interfaceTrans
-
getTransaction
public Transaction getTransaction()
-
getTransactionId
public final Long getTransactionId()
-
getTransactionNumber
public String getTransactionNumber()
- Specified by:
getTransactionNumberin interfaceHasTransactionNumber
-
getTransactionTransactionNumber
public String getTransactionTransactionNumber()
-
getTransferNature
public abstract TransferNature getTransferNature()
-
getType
public TransferType getType()
-
isPendingNotification
public boolean isPendingNotification()
-
setAmount
public void setAmount(BigDecimal amount)
-
setChargedBackBy
public void setChargedBackBy(ChargebackTransfer chargedBackBy)
-
setDate
public void setDate(Date date)
-
setEmissionDate
public void setEmissionDate(Date emissionDate)
- Specified by:
setEmissionDatein interfaceRatedEntity
-
setExpirationDate
public void setExpirationDate(Date expirationDate)
- Specified by:
setExpirationDatein interfaceRatedEntity
-
setFrom
public void setFrom(Account from)
-
setParent
public void setParent(Transfer parent)
-
setPendingNotification
public void setPendingNotification(boolean pendingNotification)
-
setStatus
public void setStatus(TransferStatusFlow flow, TransferStatus status)
Sets the status for this flow
-
setTo
public void setTo(Account to)
-
setTransaction
public void setTransaction(Transaction transaction)
-
setTransactionNumber
public void setTransactionNumber(String transactionNumber)
-
setType
public void setType(TransferType type)
-
fromTransaction
protected <T> T fromTransaction(Function<Transaction,T> getter)
-
-