Package org.cyclos.entities.banking
Class VoucherType
- java.lang.Object
-
- org.cyclos.entities.SimpleEntity
-
- org.cyclos.entities.NetworkedEntity
-
- org.cyclos.entities.BaseEntity
-
- org.cyclos.entities.NamedEntity
-
- org.cyclos.entities.ConfigurationEntity
-
- org.cyclos.entities.banking.VoucherType
-
- All Implemented Interfaces:
Cloneable,Comparable<NamedEntity>,HasCurrency,HasNetwork,ProcessableForProxying,ImageOwner<VoucherType,VoucherTypeImage>,IEntity,IInternalNamedEntity,INamedEntity
@Entity public class VoucherType extends ConfigurationEntity implements HasCurrency, ImageOwner<VoucherType,VoucherTypeImage>
A voucher type defines how vouchers will be generated, and several restrictions over them.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cyclos.entities.SimpleEntity
SimpleEntity.EntityLoadNotifier
-
-
Constructor Summary
Constructors Constructor Description VoucherType()VoucherType(Long id)
-
Method Summary
-
Methods inherited from class org.cyclos.entities.ConfigurationEntity
getDescription, getInternalName, setDescription, setInternalName, toShortString, toString
-
Methods inherited from class org.cyclos.entities.NamedEntity
compareTo, getName, getNames, setName
-
Methods inherited from class org.cyclos.entities.BaseEntity
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, 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.model.IInternalNamedEntity
matches
-
Methods inherited from interface org.cyclos.entities.system.ImageOwner
getImages, setImages
-
Methods inherited from interface org.cyclos.entities.ProcessableForProxying
getProxyClass
-
-
-
-
Constructor Detail
-
VoucherType
public VoucherType()
-
VoucherType
public VoucherType(Long id)
-
-
Method Detail
-
getAccountName
public String getAccountName()
-
getBuyAllowedGroups
public Set<BasicGroup> getBuyAllowedGroups()
-
getBuyUntilDate
public Date getBuyUntilDate()
-
getCategory
public VoucherCategory getCategory()
-
getConfiguration
public VoucherConfiguration getConfiguration()
-
getCurrency
public Currency getCurrency()
- Specified by:
getCurrencyin interfaceHasCurrency
-
getCustomFields
public Set<VoucherCustomField> getCustomFields()
-
getDataTranslationType
public DataTranslationType getDataTranslationType()
Description copied from class:BaseEntityIf this entity allows data translation, should return the translation type- Overrides:
getDataTranslationTypein classBaseEntity
-
getExpirationDate
public Date getExpirationDate()
-
getExpirationInterval
public TimeInterval getExpirationInterval()
-
getExpirationType
public VoucherExpirationType getExpirationType()
-
getFixedBuyAmount
public BigDecimal getFixedBuyAmount()
-
getGift
public VoucherGiftOption getGift()
-
getImage
public VoucherTypeImage getImage()
Description copied from interface:ImageOwnerEither the single image or a de-normalized reference to the first image- Specified by:
getImagein interfaceImageOwner<VoucherType,VoucherTypeImage>
-
getMaxBalance
public BigDecimal getMaxBalance()
-
getMaxBuyAmount
public BigDecimal getMaxBuyAmount()
-
getMaxBuyAmountActualPeriod
public DatePeriod getMaxBuyAmountActualPeriod()
-
getMaxBuyAmountActualSum
public BigDecimal getMaxBuyAmountActualSum()
-
getMaxBuyAmountPeriod
public TimeInterval getMaxBuyAmountPeriod()
-
getMaxBuyAmountPerPeriod
public BigDecimal getMaxBuyAmountPerPeriod()
-
getMaxOpenAmountPerUser
public BigDecimal getMaxOpenAmountPerUser()
-
getMaxTopUpAmount
public BigDecimal getMaxTopUpAmount()
-
getMaxTotalBuy
public Integer getMaxTotalBuy()
-
getMaxTotalOpenAmount
public BigDecimal getMaxTotalOpenAmount()
-
getMaxVouchersPerBuy
public Integer getMaxVouchersPerBuy()
-
getMinBuyAmount
public BigDecimal getMinBuyAmount()
-
getMinimumTimeToRedeem
public TimeInterval getMinimumTimeToRedeem()
-
getMinTopUpAmount
public BigDecimal getMinTopUpAmount()
-
getNetwork
public Network getNetwork()
Description copied from interface:HasNetworkReturns the network this entity belongs to- Specified by:
getNetworkin interfaceHasNetwork
-
getPaymentDestination
public VoucherPaymentDestination getPaymentDestination()
-
getPaymentDestinationUser
public User getPaymentDestinationUser()
-
getRedeemAllowedGroups
public Set<BasicGroup> getRedeemAllowedGroups()
-
getRedeemRestrict
public VoucherRedeemRestrictTo getRedeemRestrict()
-
getTemplate
public VoucherTemplate getTemplate()
-
getUploadedImage
public TempImage getUploadedImage()
-
getVoucherDescription
public String getVoucherDescription()
-
getVoucherTitle
public String getVoucherTitle()
-
isAllowBuying
public boolean isAllowBuying()
-
isAllowPartialRedeems
public boolean isAllowPartialRedeems()
-
isBuyUntilDateExpirationNotified
public boolean isBuyUntilDateExpirationNotified()
-
isEnabled
public boolean isEnabled()
-
isHideBalanceInRedeem
public boolean isHideBalanceInRedeem()
-
isLimitBuyAmountPerPeriod
public boolean isLimitBuyAmountPerPeriod()
-
isUseFixedBuyAmount
public boolean isUseFixedBuyAmount()
-
setAccountName
public void setAccountName(String accountName)
-
setAllowBuying
public void setAllowBuying(boolean allowBuying)
-
setAllowPartialRedeems
public void setAllowPartialRedeems(boolean allowPartialRedeems)
-
setBuyAllowedGroups
public void setBuyAllowedGroups(Set<BasicGroup> buyAllowedGroups)
-
setBuyUntilDate
public void setBuyUntilDate(Date buyUntilDate)
-
setBuyUntilDateExpirationNotified
public void setBuyUntilDateExpirationNotified(boolean buyUntilDateExpirationNotified)
-
setCategory
public void setCategory(VoucherCategory category)
-
setConfiguration
public void setConfiguration(VoucherConfiguration configuration)
-
setCustomFields
public void setCustomFields(Set<VoucherCustomField> customFields)
-
setEnabled
public void setEnabled(boolean enabled)
-
setExpirationDate
public void setExpirationDate(Date expirationDate)
-
setExpirationInterval
public void setExpirationInterval(TimeInterval expirationInterval)
-
setExpirationType
public void setExpirationType(VoucherExpirationType expirationType)
-
setGift
public void setGift(VoucherGiftOption gift)
-
setHideBalanceInRedeem
public void setHideBalanceInRedeem(Boolean hideBalanceInRedeem)
-
setImage
public void setImage(VoucherTypeImage image)
Description copied from interface:ImageOwnerEither the single image or a de-normalized reference to the first image- Specified by:
setImagein interfaceImageOwner<VoucherType,VoucherTypeImage>
-
setMaxBalance
public void setMaxBalance(BigDecimal maxBalance)
-
setMaxBuyAmount
public void setMaxBuyAmount(BigDecimal maxBuyAmount)
-
setMaxBuyAmountActualPeriod
public void setMaxBuyAmountActualPeriod(DatePeriod maxBuyAmountActualPeriod)
-
setMaxBuyAmountActualSum
public void setMaxBuyAmountActualSum(BigDecimal maxBuyAmountActualSum)
-
setMaxBuyAmountPeriod
public void setMaxBuyAmountPeriod(TimeInterval maxBuyAmountPeriod)
-
setMaxBuyAmountPerPeriod
public void setMaxBuyAmountPerPeriod(BigDecimal maxBuyAmountPerPeriod)
-
setMaxOpenAmountPerUser
public void setMaxOpenAmountPerUser(BigDecimal maxOpenAmountPerUser)
-
setMaxTopUpAmount
public void setMaxTopUpAmount(BigDecimal maxTopUpAmount)
-
setMaxTotalBuy
public void setMaxTotalBuy(Integer maxTotalBuy)
-
setMaxTotalOpenAmount
public void setMaxTotalOpenAmount(BigDecimal maxTotalOpenAmount)
-
setMaxVouchersPerBuy
public void setMaxVouchersPerBuy(Integer maxVouchersPerBuy)
-
setMinBuyAmount
public void setMinBuyAmount(BigDecimal minBuyAmount)
-
setMinimumTimeToRedeem
public void setMinimumTimeToRedeem(TimeInterval minimumTimeToRedeem)
-
setMinTopUpAmount
public void setMinTopUpAmount(BigDecimal minTopUpAmount)
-
setPaymentDestination
public void setPaymentDestination(VoucherPaymentDestination paymentDestination)
-
setPaymentDestinationUser
public void setPaymentDestinationUser(User paymentDestinationUser)
-
setRedeemAllowedGroups
public void setRedeemAllowedGroups(Set<BasicGroup> redeemAllowedGroups)
-
setRedeemRestrict
public void setRedeemRestrict(VoucherRedeemRestrictTo redeemRestrict)
-
setTemplate
public void setTemplate(VoucherTemplate template)
-
setUploadedImage
public void setUploadedImage(TempImage uploadedImage)
-
setVoucherDescription
public void setVoucherDescription(String voucherDescription)
-
setVoucherTitle
public void setVoucherTitle(String voucherTitle)
-
-