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