Class AbstractConstraintModel
- java.lang.Object
-
- de.hybris.platform.servicelayer.model.AbstractItemModel
-
- de.hybris.platform.core.model.ItemModel
-
- de.hybris.platform.validation.model.constraints.AbstractConstraintModel
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AttributeConstraintModel
,TypeConstraintModel
public class AbstractConstraintModel extends ItemModel
Generated model class for type AbstractConstraint first defined at extension validation.Abstract constraint base definition for all constraint types.
- 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
_TYPECODE
Generated model type code constant.static java.lang.String
ACTIVE
Generated constant - Attribute key ofAbstractConstraint.active
attribute defined at extensionvalidation
.static java.lang.String
ANNOTATION
Generated constant - Attribute key ofAbstractConstraint.annotation
attribute defined at extensionvalidation
.static java.lang.String
CONSTRAINTGROUPS
Generated constant - Attribute key ofAbstractConstraint.constraintGroups
attribute defined at extensionvalidation
.static java.lang.String
DEFAULTMESSAGE
Generated constant - Attribute key ofAbstractConstraint.defaultMessage
attribute defined at extensionvalidation
.static java.lang.String
ID
Generated constant - Attribute key ofAbstractConstraint.id
attribute defined at extensionvalidation
.static java.lang.String
MESSAGE
Generated constant - Attribute key ofAbstractConstraint.message
attribute defined at extensionvalidation
.static java.lang.String
NEEDRELOAD
Generated constant - Attribute key ofAbstractConstraint.needReload
attribute defined at extensionvalidation
.static java.lang.String
SEVERITY
Generated constant - Attribute key ofAbstractConstraint.severity
attribute defined at extensionvalidation
.static java.lang.String
TARGET
Generated constant - Attribute key ofAbstractConstraint.target
attribute defined at extensionvalidation
.static java.lang.String
TYPE
Generated constant - Attribute key ofAbstractConstraint.type
attribute defined at extensionvalidation
.-
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 AbstractConstraintModel()
Generated constructor - Default constructor for generic creation.AbstractConstraintModel(ItemModelContext ctx)
Generated constructor - Default constructor for creation with existing contextAbstractConstraintModel(java.lang.Class _annotation, java.lang.String _id)
Deprecated, for removal: This API element is subject to removal in a future version.since 4.1.1 Please use the default constructor without parametersAbstractConstraintModel(java.lang.Class _annotation, java.lang.String _id, 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.Class
getAnnotation()
Generated method - Getter of theAbstractConstraint.annotation
attribute defined at extensionvalidation
.java.util.Set<ConstraintGroupModel>
getConstraintGroups()
Generated method - Getter of theAbstractConstraint.constraintGroups
attribute defined at extensionvalidation
.java.lang.String
getDefaultMessage()
Generated method - Getter of theAbstractConstraint.defaultMessage
attribute defined at extensionvalidation
.java.lang.String
getDefaultMessage(java.util.Locale loc)
Generated method - Getter of theAbstractConstraint.defaultMessage
attribute defined at extensionvalidation
.java.lang.String
getId()
Generated method - Getter of theAbstractConstraint.id
attribute defined at extensionvalidation
.java.lang.String
getMessage()
Generated method - Getter of theAbstractConstraint.message
attribute defined at extensionvalidation
.java.lang.String
getMessage(java.util.Locale loc)
Generated method - Getter of theAbstractConstraint.message
attribute defined at extensionvalidation
.Severity
getSeverity()
Generated method - Getter of theAbstractConstraint.severity
attribute defined at extensionvalidation
.java.lang.Class
getTarget()
Generated method - Getter of theAbstractConstraint.target
attribute defined at extensionvalidation
.ComposedTypeModel
getType()
Generated method - Getter of theAbstractConstraint.type
attribute defined at extensionvalidation
.boolean
isActive()
Generated method - Getter of theAbstractConstraint.active
attribute defined at extensionvalidation
.boolean
isNeedReload()
Generated method - Getter of theAbstractConstraint.needReload
dynamic attribute defined at extensionvalidation
.void
setActive(boolean value)
Generated method - Setter ofAbstractConstraint.active
attribute defined at extensionvalidation
.void
setAnnotation(java.lang.Class value)
Generated method - Setter ofAbstractConstraint.annotation
attribute defined at extensionvalidation
.void
setConstraintGroups(java.util.Set<ConstraintGroupModel> value)
Generated method - Setter ofAbstractConstraint.constraintGroups
attribute defined at extensionvalidation
.void
setId(java.lang.String value)
Generated method - Setter ofAbstractConstraint.id
attribute defined at extensionvalidation
.void
setMessage(java.lang.String value)
Generated method - Setter ofAbstractConstraint.message
attribute defined at extensionvalidation
.void
setMessage(java.lang.String value, java.util.Locale loc)
Generated method - Setter ofAbstractConstraint.message
attribute defined at extensionvalidation
.void
setSeverity(Severity value)
Generated method - Setter ofAbstractConstraint.severity
attribute defined at extensionvalidation
.void
setTarget(java.lang.Class value)
Generated method - Setter ofAbstractConstraint.target
attribute defined at extensionvalidation
.void
setType(ComposedTypeModel value)
Generated method - Setter ofAbstractConstraint.type
attribute defined at extensionvalidation
.-
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
-
ID
public static final java.lang.String ID
Generated constant - Attribute key ofAbstractConstraint.id
attribute defined at extensionvalidation
.- See Also:
- Constant Field Values
-
ACTIVE
public static final java.lang.String ACTIVE
Generated constant - Attribute key ofAbstractConstraint.active
attribute defined at extensionvalidation
.- See Also:
- Constant Field Values
-
NEEDRELOAD
public static final java.lang.String NEEDRELOAD
Generated constant - Attribute key ofAbstractConstraint.needReload
attribute defined at extensionvalidation
.- See Also:
- Constant Field Values
-
ANNOTATION
public static final java.lang.String ANNOTATION
Generated constant - Attribute key ofAbstractConstraint.annotation
attribute defined at extensionvalidation
.- See Also:
- Constant Field Values
-
SEVERITY
public static final java.lang.String SEVERITY
Generated constant - Attribute key ofAbstractConstraint.severity
attribute defined at extensionvalidation
.- See Also:
- Constant Field Values
-
DEFAULTMESSAGE
public static final java.lang.String DEFAULTMESSAGE
Generated constant - Attribute key ofAbstractConstraint.defaultMessage
attribute defined at extensionvalidation
.- See Also:
- Constant Field Values
-
MESSAGE
public static final java.lang.String MESSAGE
Generated constant - Attribute key ofAbstractConstraint.message
attribute defined at extensionvalidation
.- See Also:
- Constant Field Values
-
TARGET
public static final java.lang.String TARGET
Generated constant - Attribute key ofAbstractConstraint.target
attribute defined at extensionvalidation
.- See Also:
- Constant Field Values
-
TYPE
public static final java.lang.String TYPE
Generated constant - Attribute key ofAbstractConstraint.type
attribute defined at extensionvalidation
.- See Also:
- Constant Field Values
-
CONSTRAINTGROUPS
public static final java.lang.String CONSTRAINTGROUPS
Generated constant - Attribute key ofAbstractConstraint.constraintGroups
attribute defined at extensionvalidation
.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractConstraintModel
public AbstractConstraintModel()
Generated constructor - Default constructor for generic creation.
-
AbstractConstraintModel
public AbstractConstraintModel(ItemModelContext ctx)
Generated constructor - Default constructor for creation with existing context- Parameters:
ctx
- the model context to be injected, must not be null
-
AbstractConstraintModel
@Deprecated(since="4.1.1", forRemoval=true) public AbstractConstraintModel(java.lang.Class _annotation, java.lang.String _id)
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:
_annotation
- initial attribute declared by typeAbstractConstraint
at extensionvalidation
_id
- initial attribute declared by typeAbstractConstraint
at extensionvalidation
-
AbstractConstraintModel
@Deprecated(since="4.1.1", forRemoval=true) public AbstractConstraintModel(java.lang.Class _annotation, java.lang.String _id, 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:
_annotation
- initial attribute declared by typeAbstractConstraint
at extensionvalidation
_id
- initial attribute declared by typeAbstractConstraint
at extensionvalidation
_owner
- initial attribute declared by typeItem
at extensioncore
-
-
Method Detail
-
getAnnotation
@Accessor(qualifier="annotation", type=GETTER) public java.lang.Class getAnnotation()
Generated method - Getter of theAbstractConstraint.annotation
attribute defined at extensionvalidation
.- Returns:
- the annotation - Full class name literal for a corresponding annotation
-
getConstraintGroups
@Accessor(qualifier="constraintGroups", type=GETTER) public java.util.Set<ConstraintGroupModel> getConstraintGroups()
Generated method - Getter of theAbstractConstraint.constraintGroups
attribute defined at extensionvalidation
. Consider using FlexibleSearchService::searchRelation for pagination support of large result sets.- Returns:
- the constraintGroups
-
getDefaultMessage
@Accessor(qualifier="defaultMessage", type=GETTER) public java.lang.String getDefaultMessage()
Generated method - Getter of theAbstractConstraint.defaultMessage
attribute defined at extensionvalidation
.- Returns:
- the defaultMessage - Localized resource bundle evaluated error message
-
getDefaultMessage
@Accessor(qualifier="defaultMessage", type=GETTER) public java.lang.String getDefaultMessage(java.util.Locale loc)
Generated method - Getter of theAbstractConstraint.defaultMessage
attribute defined at extensionvalidation
.- Parameters:
loc
- the value localization key- Returns:
- the defaultMessage - Localized resource bundle evaluated error message
- Throws:
java.lang.IllegalArgumentException
- if localization key cannot be mapped to data language
-
getId
@Accessor(qualifier="id", type=GETTER) public java.lang.String getId()
Generated method - Getter of theAbstractConstraint.id
attribute defined at extensionvalidation
.- Returns:
- the id - Constraint identifier
-
getMessage
@Accessor(qualifier="message", type=GETTER) public java.lang.String getMessage()
Generated method - Getter of theAbstractConstraint.message
attribute defined at extensionvalidation
.- Returns:
- the message - Localized error message
-
getMessage
@Accessor(qualifier="message", type=GETTER) public java.lang.String getMessage(java.util.Locale loc)
Generated method - Getter of theAbstractConstraint.message
attribute defined at extensionvalidation
.- Parameters:
loc
- the value localization key- Returns:
- the message - Localized error message
- Throws:
java.lang.IllegalArgumentException
- if localization key cannot be mapped to data language
-
getSeverity
@Accessor(qualifier="severity", type=GETTER) public Severity getSeverity()
Generated method - Getter of theAbstractConstraint.severity
attribute defined at extensionvalidation
.- Returns:
- the severity - Severity level
-
getTarget
@Accessor(qualifier="target", type=GETTER) public java.lang.Class getTarget()
Generated method - Getter of theAbstractConstraint.target
attribute defined at extensionvalidation
.- Returns:
- the target - Target class for covered with validation logic
-
getType
@Accessor(qualifier="type", type=GETTER) public ComposedTypeModel getType()
Generated method - Getter of theAbstractConstraint.type
attribute defined at extensionvalidation
.- Returns:
- the type
-
isActive
@Accessor(qualifier="active", type=GETTER) public boolean isActive()
Generated method - Getter of theAbstractConstraint.active
attribute defined at extensionvalidation
.- Returns:
- the active - Enabled flag for a constraint
-
isNeedReload
@Accessor(qualifier="needReload", type=GETTER) public boolean isNeedReload()
Generated method - Getter of theAbstractConstraint.needReload
dynamic attribute defined at extensionvalidation
.- Returns:
- the needReload - true if the constraint (+values) was never loaded (in the current state) into the framework.
-
setActive
@Accessor(qualifier="active", type=SETTER) public void setActive(boolean value)
Generated method - Setter ofAbstractConstraint.active
attribute defined at extensionvalidation
.- Parameters:
value
- the active - Enabled flag for a constraint
-
setAnnotation
@Accessor(qualifier="annotation", type=SETTER) public void setAnnotation(java.lang.Class value)
Generated method - Setter ofAbstractConstraint.annotation
attribute defined at extensionvalidation
.- Parameters:
value
- the annotation - Full class name literal for a corresponding annotation
-
setConstraintGroups
@Accessor(qualifier="constraintGroups", type=SETTER) public void setConstraintGroups(java.util.Set<ConstraintGroupModel> value)
Generated method - Setter ofAbstractConstraint.constraintGroups
attribute defined at extensionvalidation
.- Parameters:
value
- the constraintGroups
-
setId
@Accessor(qualifier="id", type=SETTER) public void setId(java.lang.String value)
Generated method - Setter ofAbstractConstraint.id
attribute defined at extensionvalidation
.- Parameters:
value
- the id - Constraint identifier
-
setMessage
@Accessor(qualifier="message", type=SETTER) public void setMessage(java.lang.String value)
Generated method - Setter ofAbstractConstraint.message
attribute defined at extensionvalidation
.- Parameters:
value
- the message - Localized error message
-
setMessage
@Accessor(qualifier="message", type=SETTER) public void setMessage(java.lang.String value, java.util.Locale loc)
Generated method - Setter ofAbstractConstraint.message
attribute defined at extensionvalidation
.- Parameters:
value
- the message - Localized error messageloc
- the value localization key- Throws:
java.lang.IllegalArgumentException
- if localization key cannot be mapped to data language
-
setSeverity
@Accessor(qualifier="severity", type=SETTER) public void setSeverity(Severity value)
Generated method - Setter ofAbstractConstraint.severity
attribute defined at extensionvalidation
.- Parameters:
value
- the severity - Severity level
-
setTarget
@Accessor(qualifier="target", type=SETTER) public void setTarget(java.lang.Class value)
Generated method - Setter ofAbstractConstraint.target
attribute defined at extensionvalidation
.- Parameters:
value
- the target - Target class for covered with validation logic
-
setType
@Accessor(qualifier="type", type=SETTER) public void setType(ComposedTypeModel value)
Generated method - Setter ofAbstractConstraint.type
attribute defined at extensionvalidation
.- Parameters:
value
- the type
-
-