Class CustomConstraintDao

  • All Implemented Interfaces:
    de.hybris.platform.servicelayer.internal.dao.Dao, de.hybris.platform.validation.daos.ConstraintDao

    public class CustomConstraintDao
    extends de.hybris.platform.validation.daos.impl.DefaultConstraintDao
    Overrides the DefaultConstraintDao to allow more than 1 ClassificationNotBlankConstraint per target (= type to be checked). As the ClassificationNotBlankConstraint inherits from TypeConstraint the DefaultConstraintDao would select the constraints by the attributes target, annotation and active only. But the ClassificationNotBlankConstraints need to have the additional attributes category and classification to be unique.
    • Field Summary

      • Fields inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao

        flexibleSearchService, modelService
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<AbstractConstraintModel> getConstraintDuplicates​(AbstractConstraintModel constraint)  
      • Methods inherited from class de.hybris.platform.validation.daos.impl.DefaultConstraintDao

        getAllConstraints, getConstraintedComposedTypes, getPojoRelatedConstraints, getTargetClass
      • Methods inherited from class de.hybris.platform.servicelayer.internal.dao.AbstractItemDao

        getAllSources, getFlexibleSearchService, getModelService, getSource, load, loadAll, search, search, searchUnique, setFlexibleSearchService, setModelService
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CustomConstraintDao

        public CustomConstraintDao()
    • Method Detail

      • getConstraintDuplicates

        public java.util.List<AbstractConstraintModel> getConstraintDuplicates​(AbstractConstraintModel constraint)
        Specified by:
        getConstraintDuplicates in interface de.hybris.platform.validation.daos.ConstraintDao
        Overrides:
        getConstraintDuplicates in class de.hybris.platform.validation.daos.impl.DefaultConstraintDao