Package org.cyclos.entities.banking
Class Voucher
- java.lang.Object
-
- org.cyclos.entities.SimpleEntity
-
- org.cyclos.entities.NetworkedEntity
-
- org.cyclos.entities.BaseEntity
-
- org.cyclos.entities.banking.Voucher
-
- All Implemented Interfaces:
Cloneable,HasCurrency,HasCurrencyAmount,HasNetwork,ProcessableForProxying,EntityWithCustomValues<VoucherCustomField,VoucherCustomFieldPossibleValueCategory,VoucherCustomFieldPossibleValue,VoucherCustomFieldValue>,IEntity,HasAmount
@Entity public class Voucher extends BaseEntity implements HasCurrencyAmount, EntityWithCustomValues<VoucherCustomField,VoucherCustomFieldPossibleValueCategory,VoucherCustomFieldPossibleValue,VoucherCustomFieldValue>
A voucher represents a physical code that can be redeemed by a user to get a payment in his account
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cyclos.entities.SimpleEntity
SimpleEntity.EntityLoadNotifier
-
-
Constructor Summary
Constructors Constructor Description Voucher()
-
Method Summary
-
Methods inherited from class org.cyclos.entities.BaseEntity
getDataTranslationType, getVersion
-
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.ProcessableForProxying
getProxyClass
-
-
-
-
Method Detail
-
getActivation
public VoucherTopUp getActivation()
-
getActualExpirationDate
public Date getActualExpirationDate()
-
getAmount
public BigDecimal getAmount()
-
getAmountDereservation
@Deprecated public VoucherAmountReservation getAmountDereservation()
Deprecated.
-
getAmountDereservations
public Set<VoucherAmountReservation> getAmountDereservations()
-
getBalance
public BigDecimal getBalance()
-
getBalanceCurrencyAmount
public CurrencyAmount getBalanceCurrencyAmount()
-
getConfiguration
public VoucherConfiguration getConfiguration()
-
getCurrency
public Currency getCurrency()
- Specified by:
getCurrencyin interfaceHasCurrency
-
getCurrencyAmount
public CurrencyAmount getCurrencyAmount()
- Specified by:
getCurrencyAmountin interfaceHasCurrencyAmount
-
getCustomFieldClass
public Class<VoucherCustomField> getCustomFieldClass()
Description copied from interface:EntityWithCustomValuesReturns custom field the class on this entity
-
getCustomFieldValueClass
public Class<VoucherCustomFieldValue> getCustomFieldValueClass()
Description copied from interface:EntityWithCustomValuesReturns the class for storing custom field values
-
getCustomValues
public Set<VoucherCustomFieldValue> getCustomValues()
Description copied from interface:EntityWithCustomValuesReturns all custom field values
-
getEmail
public String getEmail()
-
getExpirationDate
public Date getExpirationDate()
-
getExpirationDateComments
public String getExpirationDateComments()
-
getMobilePhone
public String getMobilePhone()
-
getNetwork
public Network getNetwork()
Description copied from interface:HasNetworkReturns the network this entity belongs to- Specified by:
getNetworkin interfaceHasNetwork
-
getOwner
public User getOwner()
-
getOwnerOrBuyer
public User getOwnerOrBuyer()
Returns the owner, if any. If not, returns the buyer, if any.
-
getPack
public VoucherPack getPack()
-
getPin
public String getPin()
-
getPinBlockedUntil
public Date getPinBlockedUntil()
-
getPinStatusForRedeem
public VoucherPinStatusForRedeem getPinStatusForRedeem()
-
getRefund
public Payment getRefund()
-
getSingleRedeem
public VoucherRedeem getSingleRedeem()
-
getStatus
public VoucherStatus getStatus()
-
getTemplate
public VoucherTemplate getTemplate()
-
getToken
public String getToken()
-
getTransactions
public Set<VoucherTransaction> getTransactions()
-
getType
public VoucherType getType()
-
getUnblockAmountReservation
public VoucherUnblockAmountReservation getUnblockAmountReservation()
-
hasCustomExpirationDate
public boolean hasCustomExpirationDate()
-
hasNotificationMedium
public boolean hasNotificationMedium()
-
isAboutToExpireNotified
public boolean isAboutToExpireNotified()
-
isAssigned
public boolean isAssigned()
-
isBlocked
public boolean isBlocked()
-
isBlockedGift
public boolean isBlockedGift()
-
isCanceled
public boolean isCanceled()
-
isEnableNotifications
public boolean isEnableNotifications()
-
isExpirationNotified
public boolean isExpirationNotified()
-
isExpired
public boolean isExpired()
-
isInactive
public boolean isInactive()
-
isOpen
public boolean isOpen()
-
isPending
public boolean isPending()
-
isPinBlocked
public boolean isPinBlocked()
-
isPrinted
public boolean isPrinted()
-
isRedeemed
public boolean isRedeemed()
-
setAboutToExpireNotified
public void setAboutToExpireNotified(boolean aboutToExpireNotified)
-
setActivation
public void setActivation(VoucherTopUp activation)
-
setAmount
public void setAmount(BigDecimal amount)
-
setAmountDereservation
@Deprecated public void setAmountDereservation(VoucherAmountReservation amountDereservation)
Deprecated.
-
setAmountDereservations
public void setAmountDereservations(Set<VoucherAmountReservation> amountDereservations)
-
setBalance
public void setBalance(BigDecimal balance)
-
setCustomValues
public void setCustomValues(Set<VoucherCustomFieldValue> customValues)
-
setEmail
public void setEmail(String email)
-
setEnableNotifications
public void setEnableNotifications(boolean enableNotifications)
-
setExpirationDate
public void setExpirationDate(Date expirationDate)
-
setExpirationDateComments
public void setExpirationDateComments(String expirationDateComments)
-
setExpirationNotified
public void setExpirationNotified(boolean expirationNotified)
-
setMobilePhone
public void setMobilePhone(String mobilePhone)
-
setOwner
public void setOwner(User owner)
-
setPack
public void setPack(VoucherPack pack)
-
setPin
public void setPin(String pin)
-
setPinBlockedUntil
public void setPinBlockedUntil(Date pinBlockedUntil)
-
setPrinted
public void setPrinted(boolean printed)
-
setRefund
public void setRefund(Payment refund)
-
setStatus
public void setStatus(VoucherStatus status)
-
setToken
public void setToken(String token)
-
setTransactions
public void setTransactions(Set<VoucherTransaction> transactions)
-
setUnblockAmountReservation
public void setUnblockAmountReservation(VoucherUnblockAmountReservation amountReservation)
-
-