Class DefaultConstraintService
- java.lang.Object
-
- de.hybris.platform.validation.services.impl.DefaultConstraintService
-
- All Implemented Interfaces:
ConstraintService
public class DefaultConstraintService extends java.lang.Object implements ConstraintService
Default implementation of theConstraintServiceinterface.
-
-
Constructor Summary
Constructors Constructor Description DefaultConstraintService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<AbstractConstraintModel>getAllConstraints()Gets all constraints instances.java.util.List<ComposedTypeModel>getConstraintedComposedTypes()Gets the list of composed type 'affected' by any attached constraint, this means haveAbstractConstraintModel.TYPEset as reference to existing type in system.java.util.List<AbstractConstraintModel>getPojoRelatedConstraints()Gets the list of theAbstractConstraintModelwhich are attached to any POJO and are not attached to any model, this means not have haveAbstractConstraintModel.TYPEset as reference to existing type in system.booleanisConstraintDuplicated(AbstractConstraintModel constraint)voidsetConstraintDao(ConstraintDao constraintDao)
-
-
-
Method Detail
-
getAllConstraints
public java.util.List<AbstractConstraintModel> getAllConstraints()
Description copied from interface:ConstraintServiceGets all constraints instances.- Specified by:
getAllConstraintsin interfaceConstraintService
-
getConstraintedComposedTypes
public java.util.List<ComposedTypeModel> getConstraintedComposedTypes()
Description copied from interface:ConstraintServiceGets the list of composed type 'affected' by any attached constraint, this means haveAbstractConstraintModel.TYPEset as reference to existing type in system.- Specified by:
getConstraintedComposedTypesin interfaceConstraintService
-
getPojoRelatedConstraints
public java.util.List<AbstractConstraintModel> getPojoRelatedConstraints()
Description copied from interface:ConstraintServiceGets the list of theAbstractConstraintModelwhich are attached to any POJO and are not attached to any model, this means not have haveAbstractConstraintModel.TYPEset as reference to existing type in system.- Specified by:
getPojoRelatedConstraintsin interfaceConstraintService
-
setConstraintDao
public void setConstraintDao(ConstraintDao constraintDao)
-
isConstraintDuplicated
public boolean isConstraintDuplicated(AbstractConstraintModel constraint)
- Specified by:
isConstraintDuplicatedin interfaceConstraintService- Parameters:
constraint- constraint instance which duplicates of are searched for- Returns:
trueif there is at least one constraint of- the same type annotation
AbstractConstraintModel.ANNOTATION - which is attached to the same
GeneratedCatalogConstants.Attributes.ComposedType/POJO ( via parameterAbstractConstraintModel.TARGET) or to the sameAttributeDescriptor/POJO's attribute ( via parameterAbstractConstraintModel.TARGET.AttributeConstraintModel.QUALIFIER)AttributeConstraintModel.QUALIFIER) - and is active
AbstractConstraintModel.ACTIVE
false- the same type annotation
-
-