@SuppressWarnings({"rawtypes", "unchecked"}) public class MappingUtils extends Object
Utility methods for mapping logic.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static Collection |
createConcreteCollection(Class interfaceType)Creates a concrete collection for the supplied interface |
|
public static Field |
getDeclaredField(Class javaClass, String propertyName)Get a declared field, searching super classes for the field if it is not found in the class. |
|
public static Class |
getGenericType(Class propertyType) |
|
public static Class |
getGenericTypeForMapProperty(Class javaClass, String propertyName, boolean isKeyType) |
|
public static Class |
getGenericTypeForProperty(Class javaClass, String propertyName) |
|
public static String |
getGetterName(String propertyName)Calculate the name for a getter method to retrieve the specified property |
|
public static String |
getSetterName(String propertyName)Retrieves the name of a setter for the specified property name |
|
public static String |
getTargetKey(PersistentProperty property) |
Creates a concrete collection for the supplied interface
interfaceType - The interfaceGet a declared field, searching super classes for the field if it is not found in the class.
javaClass - The class to search.propertyName - The name of the field.Calculate the name for a getter method to retrieve the specified property
Retrieves the name of a setter for the specified property name
propertyName - The property name