@Entity public abstract class Transaction extends NetworkedEntity implements Trans, EntityWithCustomValues<TransactionCustomField,TransactionCustomFieldPossibleValueCategory,TransactionCustomFieldPossibleValue,TransactionCustomFieldValue>
Transfers.| Modifier and Type | Field and Description |
|---|---|
protected TransactionAuthorizationStatus |
authorizationStatus
This represents the authorization status of the transaction.
|
protected TransactionAuthorizationType |
authorizationType
This represents the authorization status type of the transaction.
|
protected java.lang.Boolean |
showToReceiver
This represents if a transaction is shown to receiver.
|
protected java.lang.String |
status
This represents the status of the transaction.
|
protected Transaction |
transaction
This represents the generated transaction after this transaction was processed.
|
| Constructor and Description |
|---|
Transaction() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.math.BigDecimal |
doGetActualAmount(InternalAccountOwner owner) |
AccessClient |
getAccessClient() |
java.math.BigDecimal |
getActualAmount(InternalAccountOwner owner)
Return the amount as is or negated according to the from/to owners and the specific implementation.
|
BasicUser |
getActualBy()
Returns the user that made the payment: the from owner or the the by user.
|
java.math.BigDecimal |
getAmount() |
BasicUser |
getBy()
Returns the user that made the payment only if different from the "from account owner".
|
Channel |
getChannel() |
Currency |
getCurrency() |
CurrencyAmount |
getCurrencyAmount() |
java.lang.Class<TransactionCustomField> |
getCustomFieldClass()
Returns custom field the class on this entity
|
java.lang.Class<TransactionCustomFieldValue> |
getCustomFieldValueClass()
Returns the class for storing custom field values
|
java.util.Set<TransactionCustomFieldValue> |
getCustomValues()
Returns all custom field values
|
java.util.Date |
getDate() |
java.lang.String |
getDescription() |
abstract AccountLocator |
getDestinationAccountLocator()
Returns the locator for the to owner account (it could be null for Tickets and IS null for ExternalPayments).
|
BasicUser |
getDestinationUser()
Returns the actual
BasicUser which is the destination of this transaction |
java.lang.String |
getFromName() |
InternalAccountOwner |
getFromOwner() |
User |
getFromUser() |
abstract Location |
getLocation() |
abstract TransactionNature |
getNature() |
Network |
getNetwork()
Returns the network this entity belongs to
|
PrincipalType |
getPrincipalType() |
abstract java.util.Date |
getProcessDate()
Returns the date the transaction was actually processed
|
abstract AccountLocator |
getSourceAccountLocator()
Returns the locator for the from owner account (from owner never is null).
|
BasicUser |
getSourceUser()
Returns the actual
BasicUser which is the source of this transaction |
java.lang.String |
getToName() |
AccountOwner |
getToOwner() |
User |
getToUser() |
java.lang.String |
getTransactionNumber() |
TransferType |
getType() |
boolean |
isFromSystem() |
boolean |
isFromUser() |
boolean |
isToSystem() |
boolean |
isToUser() |
void |
setAccessClient(AccessClient accessClient) |
void |
setAmount(java.math.BigDecimal amount) |
void |
setBy(BasicUser by) |
void |
setBySelf(boolean bySelf) |
void |
setChannel(Channel channel) |
void |
setCustomValues(java.util.Set<TransactionCustomFieldValue> customValues) |
void |
setDate(java.util.Date date) |
void |
setDescription(java.lang.String description) |
void |
setFromName(java.lang.String fromName) |
void |
setFromOwner(InternalAccountOwner from) |
void |
setPrincipalType(PrincipalType principalType) |
void |
setToName(java.lang.String toName) |
void |
setToOwner(AccountOwner to) |
void |
setTransactionNumber(java.lang.String transactionNumber) |
void |
setType(TransferType type) |
isGlobalclone, equals, getId, getId, getIds, getUniqueIds, getUniqueIds, hashCode, isPersistent, isTransient, toStringprotected Transaction transaction
Ticket, PaymentRequest, ExternalPayment but we put it here so we
can make (DB) queries simpler.
Here we have only the property the corresponding get/set methods are in each subclass with the right type.protected java.lang.String status
Ticket, PaymentRequest, ExternalPayment, RecurringPayment,
ScheduledPayment but we put it here so we can make (DB) queries simpler.
Here we have only the property the corresponding get/set methods are in each subclass with the right enum type.protected java.lang.Boolean showToReceiver
RecurringPayment, ScheduledPayment but we put it here so we can make (DB) queries simpler.
Here we have only the property the corresponding get/set methods are in each subclass.protected TransactionAuthorizationStatus authorizationStatus
BasePayment and its subclasses,
but we put it here so we can make (DB) queries simpler.
Here we have only the property the corresponding get/set methods are in the proper subclass.protected TransactionAuthorizationType authorizationType
BasePayment and its subclasses,
but we put it here so we can make (DB) queries simpler.
Here we have only the property the corresponding get/set methods are in the proper subclass.public AccessClient getAccessClient()
public final java.math.BigDecimal getActualAmount(InternalAccountOwner owner)
doGetActualAmount(InternalAccountOwner)public BasicUser getActualBy()
public BasicUser getBy()
SystemSessionData).ScriptSessionData) without a logged user.getActualBy() that will take into account the cases described above and also
won't return null if the the payment was made by the from owner (this method will).getActualBy()public Channel getChannel()
getChannel in interface Transpublic Currency getCurrency()
getCurrency in interface HasCurrencypublic CurrencyAmount getCurrencyAmount()
public java.lang.Class<TransactionCustomField> getCustomFieldClass()
EntityWithCustomValuespublic java.lang.Class<TransactionCustomFieldValue> getCustomFieldValueClass()
EntityWithCustomValuespublic java.util.Set<TransactionCustomFieldValue> getCustomValues()
EntityWithCustomValuesgetCustomValues in interface TransgetCustomValues in interface EntityWithCustomValues<TransactionCustomField,TransactionCustomFieldPossibleValueCategory,TransactionCustomFieldPossibleValue,TransactionCustomFieldValue>public java.lang.String getDescription()
public abstract AccountLocator getDestinationAccountLocator()
getDestinationAccountLocator in interface Transpublic BasicUser getDestinationUser()
BasicUser which is the destination of this transactionBasePayment.getDestinationUser()public java.lang.String getFromName()
public InternalAccountOwner getFromOwner()
public User getFromUser()
public abstract Location getLocation()
public abstract TransactionNature getNature()
public Network getNetwork()
NetworkedEntitygetNetwork in class NetworkedEntitypublic PrincipalType getPrincipalType()
public abstract java.util.Date getProcessDate()
public abstract AccountLocator getSourceAccountLocator()
getSourceAccountLocator in interface Transpublic BasicUser getSourceUser()
BasicUser which is the source of this transactionBasePayment.getSourceUser()public java.lang.String getToName()
public AccountOwner getToOwner()
public User getToUser()
public java.lang.String getTransactionNumber()
getTransactionNumber in interface HasTransactionNumberpublic TransferType getType()
public boolean isFromSystem()
public boolean isFromUser()
public boolean isToSystem()
public boolean isToUser()
public void setAccessClient(AccessClient accessClient)
public void setAmount(java.math.BigDecimal amount)
public void setBy(BasicUser by)
public void setBySelf(boolean bySelf)
public void setChannel(Channel channel)
public void setCustomValues(java.util.Set<TransactionCustomFieldValue> customValues)
public void setDate(java.util.Date date)
public void setDescription(java.lang.String description)
public void setFromName(java.lang.String fromName)
public void setFromOwner(InternalAccountOwner from)
public void setPrincipalType(PrincipalType principalType)
public void setToName(java.lang.String toName)
public void setToOwner(AccountOwner to)
public void setTransactionNumber(java.lang.String transactionNumber)
public void setType(TransferType type)
protected abstract java.math.BigDecimal doGetActualAmount(InternalAccountOwner owner)