Class TmaGeoraphicAddressValidator

  • All Implemented Interfaces:
    org.springframework.validation.Validator

    public class TmaGeoraphicAddressValidator
    extends java.lang.Object
    implements org.springframework.validation.Validator
    Validator for GeographicAddress.
    Since:
    2003
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean supports​(java.lang.Class<?> aClass)  
      void validate​(java.lang.Object object, org.springframework.validation.Errors errors)  
      protected void validateCountry​(GeographicAddress geographicAddress, org.springframework.validation.Errors errors)
      Checks is the country code is empty
      protected void validatePostCode​(GeographicAddress geographicAddress, org.springframework.validation.Errors errors)
      Checks if the post code is empty
      • Methods inherited from class java.lang.Object

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

      • TmaGeoraphicAddressValidator

        public TmaGeoraphicAddressValidator()
    • Method Detail

      • supports

        public boolean supports​(java.lang.Class<?> aClass)
        Specified by:
        supports in interface org.springframework.validation.Validator
      • validate

        public void validate​(java.lang.Object object,
                             org.springframework.validation.Errors errors)
        Specified by:
        validate in interface org.springframework.validation.Validator
      • validateCountry

        protected void validateCountry​(GeographicAddress geographicAddress,
                                       org.springframework.validation.Errors errors)
        Checks is the country code is empty
        Parameters:
        geographicAddress - the geographic address
        errors - the errors found
      • validatePostCode

        protected void validatePostCode​(GeographicAddress geographicAddress,
                                        org.springframework.validation.Errors errors)
        Checks if the post code is empty
        Parameters:
        geographicAddress - the geographic address
        errors - the errors found