public class MappingUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static ThreadLocal<DomainAccess.InternalDomainAccess> |
internalDomainAccess |
| Constructor and Description |
|---|
MappingUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
convertFromProperty(Object value,
Class<?> targetType) |
static Object |
convertFromProperty(Object value,
Class<?> targetType,
Class<?> componentType,
Class<?> concreteFieldType) |
static Object |
convertToProperty(Object value) |
static long |
dateToLong(Date date) |
static String |
dateToString(Date date) |
static JcPrimitive |
fromType(Class<?> type,
String name)
Answer an appropriate instance of a JcPrimitive for the given simple-type and name.
|
static Object[] |
getEnumValues(Class<? extends Enum<?>> clazz)
finds enum values in normal enum classes and in dynamically created ones.
|
static boolean |
isSimpleType(Class<?> type) |
static Date |
longToDate(long millis,
Class<?> dateType) |
static boolean |
mapsToProperty(Class<?> type) |
static Date |
stringToDate(String date,
Class<?> dateType) |
public static ThreadLocal<DomainAccess.InternalDomainAccess> internalDomainAccess
public static long dateToLong(Date date)
public static boolean mapsToProperty(Class<?> type)
public static boolean isSimpleType(Class<?> type)
public static Object convertFromProperty(Object value, Class<?> targetType)
value - targetType - public static Object convertFromProperty(Object value, Class<?> targetType, Class<?> componentType, Class<?> concreteFieldType)
value - targetType - componentType - may be null in case when targetType is not a collection,
or when the listComponentType cannot be determinedconcreteFieldType - public static JcPrimitive fromType(Class<?> type, String name)
type - name - Copyright © 2016. All rights reserved.