org.broadleafcommerce.openadmin.server.service.persistence.validation
Class BasicFieldTypeValidator
java.lang.Object
org.broadleafcommerce.openadmin.server.service.persistence.validation.BasicFieldTypeValidator
- All Implemented Interfaces:
- PopulateValueRequestValidator
@Component(value="blBasicFieldTypeValidator")
public class BasicFieldTypeValidator
- extends Object
- implements PopulateValueRequestValidator
Validates that values are actually of their required types before trying to populate it. Integers should be integers,
dates should parse correctly, etc.
- Author:
- Phillip Verheyden (phillipuniverse)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicFieldTypeValidator
public BasicFieldTypeValidator()
validate
public PropertyValidationResult validate(PopulateValueRequest populateValueRequest,
Serializable instance)
- Description copied from interface:
PopulateValueRequestValidator
- Validates a population request prior to invoking any
FieldPersistenceProviders. If no validation could be
performed for the given PopulateValueRequest then return true to let it pass on to a different
PopulateValueRequestValidator or on to a FieldPersistenceProvider.
- Specified by:
validate in interface PopulateValueRequestValidator
- Parameters:
populateValueRequest - the PopulateValueRequest that should be validatedinstance - the Hibernate entity that will attempt to be populated
- Returns:
- false if the
PopulateValueRequest failed validation. In this case, the request should not be passed
to any FieldPersistenceProviders.
Copyright © 2013. All Rights Reserved.