| Constructor and Description |
|---|
DtoUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected Field |
findField(Class<?> clazz,
String name)
Find field.
|
static <A> A |
getAdapter(Class<A> type,
Object dto)
Returns the adapter which has proper type from the given dto.
|
static Field |
getDirtyField(Class<?> clazz)
Returns the dispose field.
|
static Method |
getDirtyGetter(Class<?> clazz)
Returns the dispose field.
|
static Method |
getDirtySetter(Class<?> clazz)
Returns the dispose field.
|
static Field |
getDisposeField(Class<?> clazz)
Returns the dispose field.
|
static Method |
getDisposeMethod(Class<?> clazz)
Returns the dispose method.
|
static Field |
getDomainDescriptionField(Class<?> clazz)
Returns the domain description field.
|
static Field |
getDomainKeyField(Class<?> clazz)
Returns the domain key field.
|
protected static org.eclipse.osbp.runtime.common.annotations.DtoUtils.Info |
getInfo(Class<?> clazz)
Returns the info for the given class.
|
static Object |
getValue(Object instance,
String idProperty)
Returns the id key field.
|
static boolean |
invokeDirtyGetter(Object obj)
Tries to invoke the isDirty method.
|
static boolean |
invokeDirtySetter(Object obj,
boolean value)
Tries to invoke the setDirty method.
|
static boolean |
invokeDisposeMethod(Object obj)
Tries to invoke the dispose method.
|
static boolean |
isDirty(Object obj)
Tries to invoke the dirty getter.
|
static boolean |
isDirtyField(Class<?> clazz,
String fieldName)
Returns true, if the given field is a dirty field.
|
static boolean |
isDisposeField(Class<?> clazz,
String fieldName)
Returns true, if the given field is a dispose field.
|
static boolean |
isDisposeMethod(Class<?> clazz,
String methodName)
Returns true, if the given method is a dispose method.
|
static void |
registerAdapter(PropertyChangeListener adapter,
Object dto)
Registers the adapter as a property changed listener.
|
public DtoUtils()
public static Field getDisposeField(Class<?> clazz)
Dispose.clazz - the clazzpublic static Field getDirtyField(Class<?> clazz)
Dirty.clazz - the clazzpublic static Field getDomainKeyField(Class<?> clazz)
DomainKey.clazz - the clazzpublic static Object getValue(Object instance, String idProperty)
Id.instance - the instanceidProperty - the id propertypublic static Field getDomainDescriptionField(Class<?> clazz)
clazz - the clazzpublic static Method getDirtyGetter(Class<?> clazz)
Dirty.clazz - the clazzpublic static Method getDirtySetter(Class<?> clazz)
Dirty.clazz - the clazzpublic static Method getDisposeMethod(Class<?> clazz)
Dispose.clazz - the clazzpublic static boolean isDisposeField(Class<?> clazz, String fieldName)
clazz - the clazzfieldName - the field namepublic static boolean isDirtyField(Class<?> clazz, String fieldName)
clazz - the clazzfieldName - the field namepublic static boolean isDisposeMethod(Class<?> clazz, String methodName)
clazz - the clazzmethodName - the method namepublic static boolean invokeDisposeMethod(Object obj)
obj - the objpublic static boolean invokeDirtySetter(Object obj, boolean value)
obj - the objvalue - the valuepublic static boolean isDirty(Object obj) throws IllegalAccessException
IllegalAccessException.obj - the objIllegalAccessException - the illegal access exceptionpublic static boolean invokeDirtyGetter(Object obj) throws IllegalAccessException
obj - the objIllegalAccessException - the illegal access exceptionprotected static org.eclipse.osbp.runtime.common.annotations.DtoUtils.Info getInfo(Class<?> clazz)
clazz - the clazzpublic static <A> A getAdapter(Class<A> type, Object dto)
null if no adapter is available.A - the generic typetype - the typedto - the dtopublic static void registerAdapter(PropertyChangeListener adapter, Object dto)
adapter - the adapterdto - the dtoCopyright © 2013-2016 Loetz GmbH&Co.KG - Heidelberg - Germany, Eclipse OSBP Project, OS.bee