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:
Serializable
- Direct Known Subclasses:
PromotionVoucherModel,SerialVoucherModel
Generated model class for type Voucher first defined at extension voucher.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.model.AbstractItemModel
AbstractItemModel.NewModelContextFactory -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringGenerated relation code constant for relationOrderDiscountRelationdefining source attributeordersin extensioncore.static final StringGenerated model type code constant.static final StringGenerated constant - Attribute key ofVoucher.descriptionattribute defined at extensionvoucher.static final StringGenerated constant - Attribute key ofVoucher.freeShippingattribute defined at extensionvoucher.static final StringGenerated constant - Attribute key ofVoucher.invalidationsattribute defined at extensionvoucher.static final StringGenerated constant - Attribute key ofVoucher.restrictionsattribute defined at extensionvoucher.static final StringGenerated 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, VALUEFields inherited from class de.hybris.platform.core.model.ItemModel
_COMMENTITEMRELATION, COMMENTS, CREATIONTIME, ITEMTYPE, MODIFIEDTIME, OWNER, PK, SEALEDFields inherited from class de.hybris.platform.servicelayer.model.AbstractItemModel
LANGUAGE_FALLBACK_ENABLED_SERVICE_LAYER, MODEL_CONTEXT_FACTORY -
Constructor Summary
ConstructorsConstructorDescriptionGenerated constructor - Default constructor for generic creation.Generated constructor - Default constructor for creation with existing contextVoucherModel(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(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
Modifier and TypeMethodDescriptionGenerated method - Getter of theVoucher.descriptionattribute defined at extensionvoucher.getDescription(Locale loc) Generated method - Getter of theVoucher.descriptionattribute defined at extensionvoucher.Generated method - Getter of theVoucher.freeShippingattribute defined at extensionvoucher.Generated method - Getter of theVoucher.invalidationsattribute defined at extensionvoucher.Generated method - Getter of theVoucher.restrictionsattribute defined at extensionvoucher.Generated method - Getter of theVoucher.valueStringattribute defined at extensionvoucher.voidsetDescription(String value) Generated method - Setter ofVoucher.descriptionattribute defined at extensionvoucher.voidsetDescription(String value, Locale loc) Generated method - Setter ofVoucher.descriptionattribute defined at extensionvoucher.voidsetFreeShipping(Boolean value) Generated method - Setter ofVoucher.freeShippingattribute defined at extensionvoucher.voidGenerated method - Setter ofVoucher.invalidationsattribute defined at extensionvoucher.voidsetRestrictions(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, setValueMethods inherited from class de.hybris.platform.core.model.ItemModel
getComments, getCreationtime, getModifiedtime, getOwner, isSealed, setComments, setCreationtime, setModifiedtime, setOwnerMethods 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 Details
-
_TYPECODE
Generated model type code constant.- See Also:
-
_ORDERDISCOUNTRELATION
Generated relation code constant for relationOrderDiscountRelationdefining source attributeordersin extensioncore.- See Also:
-
DESCRIPTION
Generated constant - Attribute key ofVoucher.descriptionattribute defined at extensionvoucher.- See Also:
-
FREESHIPPING
Generated constant - Attribute key ofVoucher.freeShippingattribute defined at extensionvoucher.- See Also:
-
VALUESTRING
Generated constant - Attribute key ofVoucher.valueStringattribute defined at extensionvoucher.- See Also:
-
RESTRICTIONS
Generated constant - Attribute key ofVoucher.restrictionsattribute defined at extensionvoucher.- See Also:
-
INVALIDATIONS
Generated constant - Attribute key ofVoucher.invalidationsattribute defined at extensionvoucher.- See Also:
-
-
Constructor Details
-
VoucherModel
public VoucherModel()Generated constructor - Default constructor for generic creation. -
VoucherModel
Generated constructor - Default constructor for creation with existing context- Parameters:
ctx- the model context to be injected, must not be null
-
VoucherModel
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, 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 Details
-
getDescription
Generated method - Getter of theVoucher.descriptionattribute defined at extensionvoucher.- Returns:
- the description - the description of the voucher.
-
getDescription
Generated method - Getter of theVoucher.descriptionattribute defined at extensionvoucher.- Parameters:
loc- the value localization key- Returns:
- the description - the description of the voucher.
- Throws:
IllegalArgumentException- if localization key cannot be mapped to data language
-
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 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
Generated method - Getter of theVoucher.restrictionsattribute defined at extensionvoucher. Consider using FlexibleSearchService::searchRelation for pagination support of large result sets.- Returns:
- the restrictions
-
getValueString
Generated method - Getter of theVoucher.valueStringattribute defined at extensionvoucher.- Returns:
- the valueString - the value of this voucher to display.
-
setDescription
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(String value, 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:
IllegalArgumentException- if localization key cannot be mapped to data language
-
setFreeShipping
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(Collection<VoucherInvalidationModel> value) Generated method - Setter ofVoucher.invalidationsattribute defined at extensionvoucher.- Parameters:
value- the invalidations
-
setRestrictions
@Accessor(qualifier="restrictions", type=SETTER) public void setRestrictions(Set<RestrictionModel> value) Generated method - Setter ofVoucher.restrictionsattribute defined at extensionvoucher.- Parameters:
value- the restrictions
-