Class TravelBackofficeCommonValidator
java.lang.Object
de.hybris.platform.travelbackofficeservices.validator.TravelBackofficeCommonValidator
Validator to provide functionality for custom validation for the backoffice wizards.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TravelBackofficeGenericDaovoidsetTravelBackofficeGenericDao(TravelBackofficeGenericDao travelBackofficeGenericDao) booleanvalidateUniqueForAttributes(Map<String, Object> attributes, String typeCode) This method checks if a model of type corresponding to the typeCode for the specified attributes.
-
Constructor Details
-
TravelBackofficeCommonValidator
public TravelBackofficeCommonValidator()
-
-
Method Details
-
validateUniqueForAttributes
This method checks if a model of type corresponding to the typeCode for the specified attributes. Attributes is a Map<String, Object> where the key is the name of the attributes and the value is the value of that attribute. If a ModelNotFoundException is caught, it means that no items exist, so the validation result is true; if no exceptions are caught, it means that at least one model exists, so the validation result is false.- Parameters:
attributes- the map of the name of the attribute and the valuetypeCode- the typeCode- Returns:
- true if the validation is successful, false otherwise
-
getTravelBackofficeGenericDao
- Returns:
- the travelBackofficeGenericDao
-
setTravelBackofficeGenericDao
- Parameters:
travelBackofficeGenericDao- the travelBackofficeGenericDao to set
-