Package de.hybris.platform.voucher.model
Class RestrictionModel
- java.lang.Object
-
- de.hybris.platform.servicelayer.model.AbstractItemModel
-
- de.hybris.platform.core.model.ItemModel
-
- de.hybris.platform.voucher.model.RestrictionModel
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
DateRestrictionModel,NewCustomerRestrictionModel,OrderRestrictionModel,ProductRestrictionModel,RegularCustomerOrderQuantityRestrictionModel,RegularCustomerOrderTotalRestrictionModel,UserRestrictionModel
public class RestrictionModel extends ItemModel
Generated model class for type Restriction 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_TYPECODEGenerated model type code constant.static java.lang.String_VOUCHERRESTRICTIONSRELATIONGenerated relation code constant for relationVoucherRestrictionsRelationdefining source attributevoucherin extensionvoucher.static java.lang.StringDESCRIPTIONGenerated constant - Attribute key ofRestriction.descriptionattribute defined at extensionvoucher.static java.lang.StringPOSITIVEGenerated constant - Attribute key ofRestriction.positiveattribute defined at extensionvoucher.static java.lang.StringRESTRICTIONTYPEGenerated constant - Attribute key ofRestriction.restrictionTypeattribute defined at extensionvoucher.static java.lang.StringVIOLATIONMESSAGEGenerated constant - Attribute key ofRestriction.violationMessageattribute defined at extensionvoucher.static java.lang.StringVOUCHERGenerated constant - Attribute key ofRestriction.voucherattribute defined at extensionvoucher.static java.lang.StringVOUCHERPOSGenerated constant - Attribute key ofRestriction.voucherPOSattribute defined at extensionvoucher.-
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 RestrictionModel()Generated constructor - Default constructor for generic creation.RestrictionModel(ItemModel _owner, VoucherModel _voucher)Deprecated, for removal: This API element is subject to removal in a future version.since 4.1.1 Please use the default constructor without parametersRestrictionModel(ItemModelContext ctx)Generated constructor - Default constructor for creation with existing contextRestrictionModel(VoucherModel _voucher)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 theRestriction.descriptionattribute defined at extensionvoucher.java.lang.StringgetDescription(java.util.Locale loc)Generated method - Getter of theRestriction.descriptionattribute defined at extensionvoucher.java.lang.BooleangetPositive()Generated method - Getter of theRestriction.positiveattribute defined at extensionvoucher.java.lang.StringgetRestrictionType()Generated method - Getter of theRestriction.restrictionTypeattribute defined at extensionvoucher.java.lang.StringgetRestrictionType(java.util.Locale loc)Generated method - Getter of theRestriction.restrictionTypeattribute defined at extensionvoucher.java.lang.StringgetViolationMessage()Generated method - Getter of theRestriction.violationMessageattribute defined at extensionvoucher.java.lang.StringgetViolationMessage(java.util.Locale loc)Generated method - Getter of theRestriction.violationMessageattribute defined at extensionvoucher.VoucherModelgetVoucher()Generated method - Getter of theRestriction.voucherattribute defined at extensionvoucher.voidsetDescription(java.lang.String value)Generated method - Setter ofRestriction.descriptionattribute defined at extensionvoucher.voidsetDescription(java.lang.String value, java.util.Locale loc)Generated method - Setter ofRestriction.descriptionattribute defined at extensionvoucher.voidsetPositive(java.lang.Boolean value)Generated method - Setter ofRestriction.positiveattribute defined at extensionvoucher.voidsetViolationMessage(java.lang.String value)Generated method - Setter ofRestriction.violationMessageattribute defined at extensionvoucher.voidsetViolationMessage(java.lang.String value, java.util.Locale loc)Generated method - Setter ofRestriction.violationMessageattribute defined at extensionvoucher.voidsetVoucher(VoucherModel value)Generated method - Initial setter ofRestriction.voucherattribute defined at extensionvoucher.-
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
-
_VOUCHERRESTRICTIONSRELATION
public static final java.lang.String _VOUCHERRESTRICTIONSRELATION
Generated relation code constant for relationVoucherRestrictionsRelationdefining source attributevoucherin extensionvoucher.- See Also:
- Constant Field Values
-
POSITIVE
public static final java.lang.String POSITIVE
Generated constant - Attribute key ofRestriction.positiveattribute defined at extensionvoucher.- See Also:
- Constant Field Values
-
DESCRIPTION
public static final java.lang.String DESCRIPTION
Generated constant - Attribute key ofRestriction.descriptionattribute defined at extensionvoucher.- See Also:
- Constant Field Values
-
VIOLATIONMESSAGE
public static final java.lang.String VIOLATIONMESSAGE
Generated constant - Attribute key ofRestriction.violationMessageattribute defined at extensionvoucher.- See Also:
- Constant Field Values
-
RESTRICTIONTYPE
public static final java.lang.String RESTRICTIONTYPE
Generated constant - Attribute key ofRestriction.restrictionTypeattribute defined at extensionvoucher.- See Also:
- Constant Field Values
-
VOUCHERPOS
public static final java.lang.String VOUCHERPOS
Generated constant - Attribute key ofRestriction.voucherPOSattribute defined at extensionvoucher.- See Also:
- Constant Field Values
-
VOUCHER
public static final java.lang.String VOUCHER
Generated constant - Attribute key ofRestriction.voucherattribute defined at extensionvoucher.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RestrictionModel
public RestrictionModel()
Generated constructor - Default constructor for generic creation.
-
RestrictionModel
public RestrictionModel(ItemModelContext ctx)
Generated constructor - Default constructor for creation with existing context- Parameters:
ctx- the model context to be injected, must not be null
-
RestrictionModel
@Deprecated(since="4.1.1", forRemoval=true) public RestrictionModel(VoucherModel _voucher)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:
_voucher- initial attribute declared by typeRestrictionat extensionvoucher
-
RestrictionModel
@Deprecated(since="4.1.1", forRemoval=true) public RestrictionModel(ItemModel _owner, VoucherModel _voucher)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:
_owner- initial attribute declared by typeItemat extensioncore_voucher- initial attribute declared by typeRestrictionat extensionvoucher
-
-
Method Detail
-
getDescription
@Accessor(qualifier="description", type=GETTER) public java.lang.String getDescription()
Generated method - Getter of theRestriction.descriptionattribute defined at extensionvoucher.- Returns:
- the description - the description of the restriction.
-
getDescription
@Accessor(qualifier="description", type=GETTER) public java.lang.String getDescription(java.util.Locale loc)
Generated method - Getter of theRestriction.descriptionattribute defined at extensionvoucher.- Parameters:
loc- the value localization key- Returns:
- the description - the description of the restriction.
- Throws:
java.lang.IllegalArgumentException- if localization key cannot be mapped to data language
-
getPositive
@Accessor(qualifier="positive", type=GETTER) public java.lang.Boolean getPositive()
Generated method - Getter of theRestriction.positiveattribute defined at extensionvoucher.- Returns:
- the positive - Specifies if this restriction is a positive (true) or negative (false) one.
-
getRestrictionType
@Accessor(qualifier="restrictionType", type=GETTER) public java.lang.String getRestrictionType()
Generated method - Getter of theRestriction.restrictionTypeattribute defined at extensionvoucher.- Returns:
- the restrictionType - the type of this restriction.
-
getRestrictionType
@Accessor(qualifier="restrictionType", type=GETTER) public java.lang.String getRestrictionType(java.util.Locale loc)
Generated method - Getter of theRestriction.restrictionTypeattribute defined at extensionvoucher.- Parameters:
loc- the value localization key- Returns:
- the restrictionType - the type of this restriction.
- Throws:
java.lang.IllegalArgumentException- if localization key cannot be mapped to data language
-
getViolationMessage
@Accessor(qualifier="violationMessage", type=GETTER) public java.lang.String getViolationMessage()
Generated method - Getter of theRestriction.violationMessageattribute defined at extensionvoucher.- Returns:
- the violationMessage - the message to return if the restriction is violated (not fulfilled).
-
getViolationMessage
@Accessor(qualifier="violationMessage", type=GETTER) public java.lang.String getViolationMessage(java.util.Locale loc)
Generated method - Getter of theRestriction.violationMessageattribute defined at extensionvoucher.- Parameters:
loc- the value localization key- Returns:
- the violationMessage - the message to return if the restriction is violated (not fulfilled).
- Throws:
java.lang.IllegalArgumentException- if localization key cannot be mapped to data language
-
getVoucher
@Accessor(qualifier="voucher", type=GETTER) public VoucherModel getVoucher()
Generated method - Getter of theRestriction.voucherattribute defined at extensionvoucher.- Returns:
- the voucher
-
setDescription
@Accessor(qualifier="description", type=SETTER) public void setDescription(java.lang.String value)
Generated method - Setter ofRestriction.descriptionattribute defined at extensionvoucher.- Parameters:
value- the description - the description of the restriction.
-
setDescription
@Accessor(qualifier="description", type=SETTER) public void setDescription(java.lang.String value, java.util.Locale loc)
Generated method - Setter ofRestriction.descriptionattribute defined at extensionvoucher.- Parameters:
value- the description - the description of the restriction.loc- the value localization key- Throws:
java.lang.IllegalArgumentException- if localization key cannot be mapped to data language
-
setPositive
@Accessor(qualifier="positive", type=SETTER) public void setPositive(java.lang.Boolean value)
Generated method - Setter ofRestriction.positiveattribute defined at extensionvoucher.- Parameters:
value- the positive - Specifies if this restriction is a positive (true) or negative (false) one.
-
setViolationMessage
@Accessor(qualifier="violationMessage", type=SETTER) public void setViolationMessage(java.lang.String value)
Generated method - Setter ofRestriction.violationMessageattribute defined at extensionvoucher.- Parameters:
value- the violationMessage - the message to return if the restriction is violated (not fulfilled).
-
setViolationMessage
@Accessor(qualifier="violationMessage", type=SETTER) public void setViolationMessage(java.lang.String value, java.util.Locale loc)
Generated method - Setter ofRestriction.violationMessageattribute defined at extensionvoucher.- Parameters:
value- the violationMessage - the message to return if the restriction is violated (not fulfilled).loc- the value localization key- Throws:
java.lang.IllegalArgumentException- if localization key cannot be mapped to data language
-
setVoucher
@Accessor(qualifier="voucher", type=SETTER) public void setVoucher(VoucherModel value)
Generated method - Initial setter ofRestriction.voucherattribute defined at extensionvoucher. Can only be used at creation of model - before first save.- Parameters:
value- the voucher
-
-