public final class MergeObjectExtensions extends Object
MergeObjectExtensions provide extension methods for merge a source object with
another object.| Constructor and Description |
|---|
MergeObjectExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static List<ChangedAttributeResult> |
getChangedData(Object sourceOjbect,
Object objectToCompare)
Gets the changed data.
|
static Map<Object,ChangedAttributeResult> |
getChangedDataMap(Object sourceOjbect,
Object objectToCompare)
Compares the given two objects and gets the changed data.
|
static <TO,WITH> void |
merge(TO toObject,
WITH withObject)
Merge the given to object with the given 'with' object.
|
static <TO,WITH> void |
mergeProperty(TO toObject,
WITH withObject,
PropertyDescriptor propertyDescriptor)
Merge the given property to the given 'to' object with the given 'with' object.
|
public static final <TO,WITH> void merge(TO toObject,
WITH withObject)
throws InvocationTargetException,
IllegalAccessException
TO - the generic type of the object to merge inWITH - the generic type of the object to merge withtoObject - the object to merge inwithObject - the object to merge withInvocationTargetException - if the property accessor method throws an exceptionIllegalAccessException - if the caller does not have access to the property accessor methodpublic static final <TO,WITH> void mergeProperty(TO toObject,
WITH withObject,
PropertyDescriptor propertyDescriptor)
throws IllegalAccessException,
InvocationTargetException
TO - the generic type of the object to merge inWITH - the generic type of the object to merge withtoObject - the object to merge inwithObject - the object to merge withpropertyDescriptor - the property descriptorInvocationTargetException - if the property accessor method throws an exceptionIllegalAccessException - if the caller does not have access to the property accessor methodpublic static List<ChangedAttributeResult> getChangedData(Object sourceOjbect, Object objectToCompare) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
sourceOjbect - the source ojbectobjectToCompare - the object to compareIllegalAccessException - Thrown if this Method object is enforcing Java language access control
and the underlying method is inaccessible.InvocationTargetException - Thrown if the property accessor method throws an exceptionNoSuchMethodException - Thrown if this Method object is enforcing Java language access control
and the underlying method is inaccessible.public static Map<Object,ChangedAttributeResult> getChangedDataMap(Object sourceOjbect, Object objectToCompare) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
sourceOjbect - the source ojbectobjectToCompare - the object to compareIllegalAccessException - the illegal access exceptionInvocationTargetException - the invocation target exceptionNoSuchMethodException - the no such method exceptionCopyright © 2015–2016 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.