public class ModelHelper
extends java.lang.Object
CurrencyAmountDTOs| Constructor and Description |
|---|
ModelHelper() |
| Modifier and Type | Method and Description |
|---|---|
static AmountSummaryVO |
amountSummary(java.math.BigDecimal sum,
java.math.BigDecimal average,
int count,
CurrencyVO currency)
Creates an amount summary
|
static void |
clearIds(java.lang.Iterable<? extends EntityModel> models)
Sets the ids of all models to null
|
static CurrencyAmountDTO |
currencyAmount(CurrencyVO currency,
java.math.BigDecimal amount)
Creates a new
CurrencyAmountDTO. |
static DictionaryVO |
dictionary(java.lang.String dictionary,
java.lang.String label)
Creates a new
DictionaryVO. |
static DimensionsDTO |
dimensions(int width,
int height)
Creates a dimensions dto
|
static boolean |
equals(LatLongDTO first,
LatLongDTO second)
Check if both coordinates are the same
|
static java.lang.String |
getEmailValidationMesssage(UserValidationResult result,
MessageProducer mProducer) |
static java.lang.String |
getPublicRegistrationMesssage(UserRegistrationResult result,
MessageProducer mProducer) |
static java.util.Comparator<UserLocatorVO> |
getUserLocatorComparator() |
static IntegerRangeDTO |
integerRange(int min,
int max)
Creates a new
IntegerRangeDTO |
static boolean |
isValid(DistanceDTO distance)
Returns whether the given latitude / longitude is valid
|
static boolean |
isValid(LatLongDTO latLong)
Returns whether the given latitude / longitude is valid
|
static boolean |
isValid(UserLocatorVO user)
Returns whether the given user locator is valid
|
static LatLongDTO |
latLong(java.math.BigDecimal latitude,
java.math.BigDecimal longitude)
Creates a new
LatLongDTO |
static LatLongDTO |
latLong(double latitude,
double longitude)
Creates a new
LatLongDTO |
static Property<?,? super UserWithFieldsVO> |
userWithFieldsProperty(BasicProfileField profileField)
Returns the property from
UserWithFieldsVO which matches the given profile field, or null if not
applicable |
public static AmountSummaryVO amountSummary(java.math.BigDecimal sum, java.math.BigDecimal average, int count, CurrencyVO currency)
public static void clearIds(java.lang.Iterable<? extends EntityModel> models)
public static CurrencyAmountDTO currencyAmount(CurrencyVO currency, java.math.BigDecimal amount)
CurrencyAmountDTO.public static DictionaryVO dictionary(java.lang.String dictionary, java.lang.String label)
DictionaryVO.public static DimensionsDTO dimensions(int width, int height)
public static boolean equals(LatLongDTO first, LatLongDTO second)
public static java.lang.String getEmailValidationMesssage(UserValidationResult result, MessageProducer mProducer)
public static java.lang.String getPublicRegistrationMesssage(UserRegistrationResult result, MessageProducer mProducer)
public static java.util.Comparator<UserLocatorVO> getUserLocatorComparator()
public static IntegerRangeDTO integerRange(int min, int max)
IntegerRangeDTOpublic static boolean isValid(DistanceDTO distance)
public static boolean isValid(LatLongDTO latLong)
public static boolean isValid(UserLocatorVO user)
public static LatLongDTO latLong(java.math.BigDecimal latitude, java.math.BigDecimal longitude)
LatLongDTOpublic static LatLongDTO latLong(double latitude, double longitude)
LatLongDTOpublic static Property<?,? super UserWithFieldsVO> userWithFieldsProperty(BasicProfileField profileField)
UserWithFieldsVO which matches the given profile field, or null if not
applicable