Beispiel #1
0
 public AddressMutableState asMutable(AddressStringStateConverter converter) {
   return new AddressMutableState(
       converter.toAddressId(addressId),
       converter.toStreetName(streetName),
       converter.toZipcode(zipcode),
       converter.toCity(city));
 }
Beispiel #2
0
 public AddressStringState asStringState(AddressStringStateConverter converter) {
   return new AddressStringState(
       converter.addressIdToString(addressId),
       converter.streetNameToString(streetName),
       converter.zipcodeToString(zipcode),
       converter.cityToString(city));
 }
Beispiel #3
0
 public void validateZipcode(
     String value, Object rootElement, String parent, ValidationErrors.Builder errors) {
   try {
     converter.toZipcode(value);
   } catch (Exception e) {
     errors.addTypeConversionError(rootElement, "zipcode", parent);
   }
 }
Beispiel #4
0
 public void validateAddressId(
     String value, Object rootElement, String parent, ValidationErrors.Builder errors) {
   try {
     converter.toAddressId(value);
   } catch (Exception e) {
     errors.addTypeConversionError(rootElement, "addressId", parent);
   }
 }