public class AddressHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AddressHelper.AddressSnapshot
It's an address DTO's snapshot
|
| Constructor and Description |
|---|
AddressHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getDefaultValue(AddressFields field,
AddressConfigurationData config)
Returns the default value for the given field under the given configuration
|
static Property<java.lang.String,AddressDTO> |
getDTOPropertyForField(AddressFields field)
Returns the correspondent property object of an optional address field from the given address
|
static java.lang.String |
getValue(AddressFields field,
IAddress address)
Returns the value for a given optional field for the given address
|
static Property<java.lang.String,AddressVO> |
getVOPropertyForField(AddressFields field)
Returns the correspondent property object of an optional address field from the AddressVO bean.
|
static boolean |
isEquals(IAddress address1,
IAddress address2)
Returns true if the address1 is equals to address2 by comparing it's fields
|
static boolean |
isRequired(java.util.List<AddressFields> requiredAddressFields,
AddressFields field)
Returns true if the given address field is included in the given required address fields
|
static MessageKey |
resolveKey(java.util.Collection<AddressFields> enabledAddressFields,
AddressFields field)
Returns the message key of the given field according to the enabled address fields
|
static void |
setValue(AddressFields field,
IAddress address,
java.lang.String value)
Sets the value for a given optional field on the given address
|
static AddressHelper.AddressSnapshot |
snapshot(java.util.Collection<AddressFields> fields,
AddressDTO dto)
It takes a snapshot of the address dto parameter taking into account the specified fields
|
public static java.lang.String getDefaultValue(AddressFields field, AddressConfigurationData config)
public static Property<java.lang.String,AddressDTO> getDTOPropertyForField(AddressFields field)
public static java.lang.String getValue(AddressFields field, IAddress address)
public static Property<java.lang.String,AddressVO> getVOPropertyForField(AddressFields field)
public static boolean isEquals(IAddress address1, IAddress address2)
public static boolean isRequired(java.util.List<AddressFields> requiredAddressFields, AddressFields field)
public static MessageKey resolveKey(java.util.Collection<AddressFields> enabledAddressFields, AddressFields field)
public static void setValue(AddressFields field, IAddress address, java.lang.String value)
public static AddressHelper.AddressSnapshot snapshot(java.util.Collection<AddressFields> fields, AddressDTO dto)