Package de.hybris.platform.voucher.model
Class VoucherModel
- java.lang.Object
-
- de.hybris.platform.servicelayer.model.AbstractItemModel
-
- de.hybris.platform.core.model.ItemModel
-
- de.hybris.platform.core.model.order.price.DiscountModel
-
- de.hybris.platform.voucher.model.VoucherModel
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
PromotionVoucherModel
,SerialVoucherModel
public class VoucherModel extends DiscountModel
Generated model class for type Voucher first defined at extension voucher.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.model.AbstractItemModel
AbstractItemModel.NewModelContextFactory
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_ORDERDISCOUNTRELATION
Generated relation code constant for relationOrderDiscountRelation
defining source attributeorders
in extensioncore
.static java.lang.String
_TYPECODE
Generated model type code constant.static java.lang.String
DESCRIPTION
Generated constant - Attribute key ofVoucher.description
attribute defined at extensionvoucher
.static java.lang.String
FREESHIPPING
Generated constant - Attribute key ofVoucher.freeShipping
attribute defined at extensionvoucher
.static java.lang.String
INVALIDATIONS
Generated constant - Attribute key ofVoucher.invalidations
attribute defined at extensionvoucher
.static java.lang.String
RESTRICTIONS
Generated constant - Attribute key ofVoucher.restrictions
attribute defined at extensionvoucher
.static java.lang.String
VALUESTRING
Generated constant - Attribute key ofVoucher.valueString
attribute defined at extensionvoucher
.-
Fields inherited from class de.hybris.platform.core.model.order.price.DiscountModel
ABSOLUTE, CODE, CURRENCY, DISCOUNTSTRING, GLOBAL, NAME, ORDERS, PRIORITY, VALUE
-
Fields inherited from class de.hybris.platform.core.model.ItemModel
_COMMENTITEMRELATION, COMMENTS, CREATIONTIME, ITEMTYPE, MODIFIEDTIME, OWNER, PK, SEALED
-
Fields inherited from class de.hybris.platform.servicelayer.model.AbstractItemModel
LANGUAGE_FALLBACK_ENABLED_SERVICE_LAYER, MODEL_CONTEXT_FACTORY
-
-
Constructor Summary
Constructors Constructor Description VoucherModel()
Generated constructor - Default constructor for generic creation.VoucherModel(ItemModelContext ctx)
Generated constructor - Default constructor for creation with existing contextVoucherModel(java.lang.String _code)
Deprecated, for removal: This API element is subject to removal in a future version.since 4.1.1 Please use the default constructor without parametersVoucherModel(java.lang.String _code, ItemModel _owner)
Deprecated, for removal: This API element is subject to removal in a future version.since 4.1.1 Please use the default constructor without parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
Generated method - Getter of theVoucher.description
attribute defined at extensionvoucher
.java.lang.String
getDescription(java.util.Locale loc)
Generated method - Getter of theVoucher.description
attribute defined at extensionvoucher
.java.lang.Boolean
getFreeShipping()
Generated method - Getter of theVoucher.freeShipping
attribute defined at extensionvoucher
.java.util.Collection<VoucherInvalidationModel>
getInvalidations()
Generated method - Getter of theVoucher.invalidations
attribute defined at extensionvoucher
.java.util.Set<RestrictionModel>
getRestrictions()
Generated method - Getter of theVoucher.restrictions
attribute defined at extensionvoucher
.java.lang.String
getValueString()
Generated method - Getter of theVoucher.valueString
attribute defined at extensionvoucher
.void
setDescription(java.lang.String value)
Generated method - Setter ofVoucher.description
attribute defined at extensionvoucher
.void
setDescription(java.lang.String value, java.util.Locale loc)
Generated method - Setter ofVoucher.description
attribute defined at extensionvoucher
.void
setFreeShipping(java.lang.Boolean value)
Generated method - Setter ofVoucher.freeShipping
attribute defined at extensionvoucher
.void
setInvalidations(java.util.Collection<VoucherInvalidationModel> value)
Generated method - Setter ofVoucher.invalidations
attribute defined at extensionvoucher
.void
setRestrictions(java.util.Set<RestrictionModel> value)
Generated method - Setter ofVoucher.restrictions
attribute defined at extensionvoucher
.-
Methods inherited from class de.hybris.platform.core.model.order.price.DiscountModel
getAbsolute, getCode, getCurrency, getDiscountstring, getDiscountString, getGlobal, getName, getName, getOrders, getPriority, getValue, setCode, setCurrency, setGlobal, setName, setName, setOrders, setPriority, setValue
-
Methods inherited from class de.hybris.platform.core.model.ItemModel
getComments, getCreationtime, getModifiedtime, getOwner, isSealed, setComments, setCreationtime, setModifiedtime, setOwner
-
Methods inherited from class de.hybris.platform.servicelayer.model.AbstractItemModel
equals, getItemModelContext, getItemtype, getPersistenceContext, getPk, getProperty, getProperty, getTenantId, hashCode, readResolve, setProperty, setProperty, toObject, toObject, toObject, toObject, toObject, toObject, toObject, toObject, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toPrimitive, toString, writeReplace
-
-
-
-
Field Detail
-
_TYPECODE
public static final java.lang.String _TYPECODE
Generated model type code constant.- See Also:
- Constant Field Values
-
_ORDERDISCOUNTRELATION
public static final java.lang.String _ORDERDISCOUNTRELATION
Generated relation code constant for relationOrderDiscountRelation
defining source attributeorders
in extensioncore
.- See Also:
- Constant Field Values
-
DESCRIPTION
public static final java.lang.String DESCRIPTION
Generated constant - Attribute key ofVoucher.description
attribute defined at extensionvoucher
.- See Also:
- Constant Field Values
-
FREESHIPPING
public static final java.lang.String FREESHIPPING
Generated constant - Attribute key ofVoucher.freeShipping
attribute defined at extensionvoucher
.- See Also:
- Constant Field Values
-
VALUESTRING
public static final java.lang.String VALUESTRING
Generated constant - Attribute key ofVoucher.valueString
attribute defined at extensionvoucher
.- See Also:
- Constant Field Values
-
RESTRICTIONS
public static final java.lang.String RESTRICTIONS
Generated constant - Attribute key ofVoucher.restrictions
attribute defined at extensionvoucher
.- See Also:
- Constant Field Values
-
INVALIDATIONS
public static final java.lang.String INVALIDATIONS
Generated constant - Attribute key ofVoucher.invalidations
attribute defined at extensionvoucher
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VoucherModel
public VoucherModel()
Generated constructor - Default constructor for generic creation.
-
VoucherModel
public VoucherModel(ItemModelContext ctx)
Generated constructor - Default constructor for creation with existing context- Parameters:
ctx
- the model context to be injected, must not be null
-
VoucherModel
@Deprecated(since="4.1.1", forRemoval=true) public VoucherModel(java.lang.String _code)
Deprecated, for removal: This API element is subject to removal in a future version.since 4.1.1 Please use the default constructor without parametersGenerated constructor - Constructor with all mandatory attributes.- Parameters:
_code
- initial attribute declared by typeVoucher
at extensionvoucher
-
VoucherModel
@Deprecated(since="4.1.1", forRemoval=true) public VoucherModel(java.lang.String _code, ItemModel _owner)
Deprecated, for removal: This API element is subject to removal in a future version.since 4.1.1 Please use the default constructor without parametersGenerated constructor - for all mandatory and initial attributes.- Parameters:
_code
- initial attribute declared by typeVoucher
at extensionvoucher
_owner
- initial attribute declared by typeItem
at extensioncore
-
-
Method Detail
-
getDescription
@Accessor(qualifier="description", type=GETTER) public java.lang.String getDescription()
Generated method - Getter of theVoucher.description
attribute defined at extensionvoucher
.- Returns:
- the description - the description of the voucher.
-
getDescription
@Accessor(qualifier="description", type=GETTER) public java.lang.String getDescription(java.util.Locale loc)
Generated method - Getter of theVoucher.description
attribute defined at extensionvoucher
.- Parameters:
loc
- the value localization key- Returns:
- the description - the description of the voucher.
- Throws:
java.lang.IllegalArgumentException
- if localization key cannot be mapped to data language
-
getFreeShipping
@Accessor(qualifier="freeShipping", type=GETTER) public java.lang.Boolean getFreeShipping()
Generated method - Getter of theVoucher.freeShipping
attribute defined at extensionvoucher
.- Returns:
- the freeShipping - Specifies if the order this voucher is applied to is shipped for free (true) or not (false). Default is not (false).
-
getInvalidations
@Accessor(qualifier="invalidations", type=GETTER) public java.util.Collection<VoucherInvalidationModel> getInvalidations()
Generated method - Getter of theVoucher.invalidations
attribute defined at extensionvoucher
. Consider using FlexibleSearchService::searchRelation for pagination support of large result sets.- Returns:
- the invalidations
-
getRestrictions
@Accessor(qualifier="restrictions", type=GETTER) public java.util.Set<RestrictionModel> getRestrictions()
Generated method - Getter of theVoucher.restrictions
attribute defined at extensionvoucher
. Consider using FlexibleSearchService::searchRelation for pagination support of large result sets.- Returns:
- the restrictions
-
getValueString
@Accessor(qualifier="valueString", type=GETTER) public java.lang.String getValueString()
Generated method - Getter of theVoucher.valueString
attribute defined at extensionvoucher
.- Returns:
- the valueString - the value of this voucher to display.
-
setDescription
@Accessor(qualifier="description", type=SETTER) public void setDescription(java.lang.String value)
Generated method - Setter ofVoucher.description
attribute defined at extensionvoucher
.- Parameters:
value
- the description - the description of the voucher.
-
setDescription
@Accessor(qualifier="description", type=SETTER) public void setDescription(java.lang.String value, java.util.Locale loc)
Generated method - Setter ofVoucher.description
attribute defined at extensionvoucher
.- Parameters:
value
- the description - the description of the voucher.loc
- the value localization key- Throws:
java.lang.IllegalArgumentException
- if localization key cannot be mapped to data language
-
setFreeShipping
@Accessor(qualifier="freeShipping", type=SETTER) public void setFreeShipping(java.lang.Boolean value)
Generated method - Setter ofVoucher.freeShipping
attribute defined at extensionvoucher
.- Parameters:
value
- the freeShipping - Specifies if the order this voucher is applied to is shipped for free (true) or not (false). Default is not (false).
-
setInvalidations
@Accessor(qualifier="invalidations", type=SETTER) public void setInvalidations(java.util.Collection<VoucherInvalidationModel> value)
Generated method - Setter ofVoucher.invalidations
attribute defined at extensionvoucher
.- Parameters:
value
- the invalidations
-
setRestrictions
@Accessor(qualifier="restrictions", type=SETTER) public void setRestrictions(java.util.Set<RestrictionModel> value)
Generated method - Setter ofVoucher.restrictions
attribute defined at extensionvoucher
.- Parameters:
value
- the restrictions
-
-