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_ORDERDISCOUNTRELATIONGenerated relation code constant for relationOrderDiscountRelationdefining source attributeordersin extensioncore.static java.lang.String_TYPECODEGenerated model type code constant.static java.lang.StringDESCRIPTIONGenerated constant - Attribute key ofVoucher.descriptionattribute defined at extensionvoucher.static java.lang.StringFREESHIPPINGGenerated constant - Attribute key ofVoucher.freeShippingattribute defined at extensionvoucher.static java.lang.StringINVALIDATIONSGenerated constant - Attribute key ofVoucher.invalidationsattribute defined at extensionvoucher.static java.lang.StringRESTRICTIONSGenerated constant - Attribute key ofVoucher.restrictionsattribute defined at extensionvoucher.static java.lang.StringVALUESTRINGGenerated constant - Attribute key ofVoucher.valueStringattribute 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.StringgetDescription()Generated method - Getter of theVoucher.descriptionattribute defined at extensionvoucher.java.lang.StringgetDescription(java.util.Locale loc)Generated method - Getter of theVoucher.descriptionattribute defined at extensionvoucher.java.lang.BooleangetFreeShipping()Generated method - Getter of theVoucher.freeShippingattribute defined at extensionvoucher.java.util.Collection<VoucherInvalidationModel>getInvalidations()Generated method - Getter of theVoucher.invalidationsattribute defined at extensionvoucher.java.util.Set<RestrictionModel>getRestrictions()Generated method - Getter of theVoucher.restrictionsattribute defined at extensionvoucher.java.lang.StringgetValueString()Generated method - Getter of theVoucher.valueStringattribute defined at extensionvoucher.voidsetDescription(java.lang.String value)Generated method - Setter ofVoucher.descriptionattribute defined at extensionvoucher.voidsetDescription(java.lang.String value, java.util.Locale loc)Generated method - Setter ofVoucher.descriptionattribute defined at extensionvoucher.voidsetFreeShipping(java.lang.Boolean value)Generated method - Setter ofVoucher.freeShippingattribute defined at extensionvoucher.voidsetInvalidations(java.util.Collection<VoucherInvalidationModel> value)Generated method - Setter ofVoucher.invalidationsattribute defined at extensionvoucher.voidsetRestrictions(java.util.Set<RestrictionModel> value)Generated method - Setter ofVoucher.restrictionsattribute 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 relationOrderDiscountRelationdefining source attributeordersin extensioncore.- See Also:
- Constant Field Values
-
DESCRIPTION
public static final java.lang.String DESCRIPTION
Generated constant - Attribute key ofVoucher.descriptionattribute defined at extensionvoucher.- See Also:
- Constant Field Values
-
FREESHIPPING
public static final java.lang.String FREESHIPPING
Generated constant - Attribute key ofVoucher.freeShippingattribute defined at extensionvoucher.- See Also:
- Constant Field Values
-
VALUESTRING
public static final java.lang.String VALUESTRING
Generated constant - Attribute key ofVoucher.valueStringattribute defined at extensionvoucher.- See Also:
- Constant Field Values
-
RESTRICTIONS
public static final java.lang.String RESTRICTIONS
Generated constant - Attribute key ofVoucher.restrictionsattribute defined at extensionvoucher.- See Also:
- Constant Field Values
-
INVALIDATIONS
public static final java.lang.String INVALIDATIONS
Generated constant - Attribute key ofVoucher.invalidationsattribute 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 typeVoucherat 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 typeVoucherat extensionvoucher_owner- initial attribute declared by typeItemat extensioncore
-
-
Method Detail
-
getDescription
@Accessor(qualifier="description", type=GETTER) public java.lang.String getDescription()
Generated method - Getter of theVoucher.descriptionattribute 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.descriptionattribute 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.freeShippingattribute 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.invalidationsattribute 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.restrictionsattribute 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.valueStringattribute 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.descriptionattribute 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.descriptionattribute 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.freeShippingattribute 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.invalidationsattribute 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.restrictionsattribute defined at extensionvoucher.- Parameters:
value- the restrictions
-
-