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_TYPECODEGenerated model type code constant.static java.lang.StringACTIVEGenerated constant - Attribute key ofAbstractConstraint.activeattribute defined at extensionvalidation.static java.lang.StringANNOTATIONGenerated constant - Attribute key ofAbstractConstraint.annotationattribute defined at extensionvalidation.static java.lang.StringCONSTRAINTGROUPSGenerated constant - Attribute key ofAbstractConstraint.constraintGroupsattribute defined at extensionvalidation.static java.lang.StringDEFAULTMESSAGEGenerated constant - Attribute key ofAbstractConstraint.defaultMessageattribute defined at extensionvalidation.static java.lang.StringIDGenerated constant - Attribute key ofAbstractConstraint.idattribute defined at extensionvalidation.static java.lang.StringMESSAGEGenerated constant - Attribute key ofAbstractConstraint.messageattribute defined at extensionvalidation.static java.lang.StringNEEDRELOADGenerated constant - Attribute key ofAbstractConstraint.needReloadattribute defined at extensionvalidation.static java.lang.StringSEVERITYGenerated constant - Attribute key ofAbstractConstraint.severityattribute defined at extensionvalidation.static java.lang.StringTARGETGenerated constant - Attribute key ofAbstractConstraint.targetattribute defined at extensionvalidation.static java.lang.StringTYPEGenerated constant - Attribute key ofAbstractConstraint.typeattribute 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.ClassgetAnnotation()Generated method - Getter of theAbstractConstraint.annotationattribute defined at extensionvalidation.java.util.Set<ConstraintGroupModel>getConstraintGroups()Generated method - Getter of theAbstractConstraint.constraintGroupsattribute defined at extensionvalidation.java.lang.StringgetDefaultMessage()Generated method - Getter of theAbstractConstraint.defaultMessageattribute defined at extensionvalidation.java.lang.StringgetDefaultMessage(java.util.Locale loc)Generated method - Getter of theAbstractConstraint.defaultMessageattribute defined at extensionvalidation.java.lang.StringgetId()Generated method - Getter of theAbstractConstraint.idattribute defined at extensionvalidation.java.lang.StringgetMessage()Generated method - Getter of theAbstractConstraint.messageattribute defined at extensionvalidation.java.lang.StringgetMessage(java.util.Locale loc)Generated method - Getter of theAbstractConstraint.messageattribute defined at extensionvalidation.SeveritygetSeverity()Generated method - Getter of theAbstractConstraint.severityattribute defined at extensionvalidation.java.lang.ClassgetTarget()Generated method - Getter of theAbstractConstraint.targetattribute defined at extensionvalidation.ComposedTypeModelgetType()Generated method - Getter of theAbstractConstraint.typeattribute defined at extensionvalidation.booleanisActive()Generated method - Getter of theAbstractConstraint.activeattribute defined at extensionvalidation.booleanisNeedReload()Generated method - Getter of theAbstractConstraint.needReloaddynamic attribute defined at extensionvalidation.voidsetActive(boolean value)Generated method - Setter ofAbstractConstraint.activeattribute defined at extensionvalidation.voidsetAnnotation(java.lang.Class value)Generated method - Setter ofAbstractConstraint.annotationattribute defined at extensionvalidation.voidsetConstraintGroups(java.util.Set<ConstraintGroupModel> value)Generated method - Setter ofAbstractConstraint.constraintGroupsattribute defined at extensionvalidation.voidsetId(java.lang.String value)Generated method - Setter ofAbstractConstraint.idattribute defined at extensionvalidation.voidsetMessage(java.lang.String value)Generated method - Setter ofAbstractConstraint.messageattribute defined at extensionvalidation.voidsetMessage(java.lang.String value, java.util.Locale loc)Generated method - Setter ofAbstractConstraint.messageattribute defined at extensionvalidation.voidsetSeverity(Severity value)Generated method - Setter ofAbstractConstraint.severityattribute defined at extensionvalidation.voidsetTarget(java.lang.Class value)Generated method - Setter ofAbstractConstraint.targetattribute defined at extensionvalidation.voidsetType(ComposedTypeModel value)Generated method - Setter ofAbstractConstraint.typeattribute 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.idattribute defined at extensionvalidation.- See Also:
- Constant Field Values
-
ACTIVE
public static final java.lang.String ACTIVE
Generated constant - Attribute key ofAbstractConstraint.activeattribute defined at extensionvalidation.- See Also:
- Constant Field Values
-
NEEDRELOAD
public static final java.lang.String NEEDRELOAD
Generated constant - Attribute key ofAbstractConstraint.needReloadattribute defined at extensionvalidation.- See Also:
- Constant Field Values
-
ANNOTATION
public static final java.lang.String ANNOTATION
Generated constant - Attribute key ofAbstractConstraint.annotationattribute defined at extensionvalidation.- See Also:
- Constant Field Values
-
SEVERITY
public static final java.lang.String SEVERITY
Generated constant - Attribute key ofAbstractConstraint.severityattribute defined at extensionvalidation.- See Also:
- Constant Field Values
-
DEFAULTMESSAGE
public static final java.lang.String DEFAULTMESSAGE
Generated constant - Attribute key ofAbstractConstraint.defaultMessageattribute defined at extensionvalidation.- See Also:
- Constant Field Values
-
MESSAGE
public static final java.lang.String MESSAGE
Generated constant - Attribute key ofAbstractConstraint.messageattribute defined at extensionvalidation.- See Also:
- Constant Field Values
-
TARGET
public static final java.lang.String TARGET
Generated constant - Attribute key ofAbstractConstraint.targetattribute defined at extensionvalidation.- See Also:
- Constant Field Values
-
TYPE
public static final java.lang.String TYPE
Generated constant - Attribute key ofAbstractConstraint.typeattribute defined at extensionvalidation.- See Also:
- Constant Field Values
-
CONSTRAINTGROUPS
public static final java.lang.String CONSTRAINTGROUPS
Generated constant - Attribute key ofAbstractConstraint.constraintGroupsattribute 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 typeAbstractConstraintat extensionvalidation_id- initial attribute declared by typeAbstractConstraintat 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 typeAbstractConstraintat extensionvalidation_id- initial attribute declared by typeAbstractConstraintat extensionvalidation_owner- initial attribute declared by typeItemat extensioncore
-
-
Method Detail
-
getAnnotation
@Accessor(qualifier="annotation", type=GETTER) public java.lang.Class getAnnotation()
Generated method - Getter of theAbstractConstraint.annotationattribute 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.constraintGroupsattribute 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.defaultMessageattribute 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.defaultMessageattribute 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.idattribute defined at extensionvalidation.- Returns:
- the id - Constraint identifier
-
getMessage
@Accessor(qualifier="message", type=GETTER) public java.lang.String getMessage()
Generated method - Getter of theAbstractConstraint.messageattribute 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.messageattribute 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.severityattribute defined at extensionvalidation.- Returns:
- the severity - Severity level
-
getTarget
@Accessor(qualifier="target", type=GETTER) public java.lang.Class getTarget()
Generated method - Getter of theAbstractConstraint.targetattribute 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.typeattribute defined at extensionvalidation.- Returns:
- the type
-
isActive
@Accessor(qualifier="active", type=GETTER) public boolean isActive()
Generated method - Getter of theAbstractConstraint.activeattribute 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.needReloaddynamic 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.activeattribute 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.annotationattribute 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.constraintGroupsattribute defined at extensionvalidation.- Parameters:
value- the constraintGroups
-
setId
@Accessor(qualifier="id", type=SETTER) public void setId(java.lang.String value)
Generated method - Setter ofAbstractConstraint.idattribute 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.messageattribute 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.messageattribute 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.severityattribute 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.targetattribute 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.typeattribute defined at extensionvalidation.- Parameters:
value- the type
-
-