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 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.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 |
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 DimensionsDTO dimensions(int width, int height)
public static boolean equals(LatLongDTO first, LatLongDTO second)
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)
LatLongDTO