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 <MERGE_IN,WITH> |
merge(MERGE_IN mergeInObject,
WITH withObject)
Merge the given to object with the given 'with' object.
|
static <MERGE_IN,WITH> |
mergeOrCopyQuietly(MERGE_IN mergeInObject,
WITH withObject)
Try first to merge quietly the given merge in object(destination) with the given 'with' object, if this fails try to copy.
|
static <MERGE_IN,WITH> |
mergeProperty(MERGE_IN mergeInObject,
WITH withObject,
PropertyDescriptor propertyDescriptor)
Merge the given property to the given 'to' object with the given 'with' object.
|
static <MERGE_IN,WITH> |
mergeQuietly(MERGE_IN mergeInObject,
WITH withObject)
Merge quietly the given merge in object(destination) with the given 'with' object.
|
public static final <MERGE_IN,WITH> MERGE_IN merge(MERGE_IN mergeInObject,
WITH withObject)
throws InvocationTargetException,
IllegalAccessException,
IllegalArgumentException
MERGE_IN - the generic type of the object to merge inWITH - the generic type of the object to merge withmergeInObject - 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 methodIllegalArgumentException - if the mergeInObject or withObject argument is null or if
the mergeInObject property type is different from the source type and
the relevant converter has not been registered.public static final <MERGE_IN,WITH> MERGE_IN mergeQuietly(MERGE_IN mergeInObject,
WITH withObject)
MERGE_IN - the generic type of the object to merge inWITH - the generic type of the object to merge withmergeInObject - the object to merge inwithObject - the object to merge withpublic static final <MERGE_IN,WITH> MERGE_IN mergeOrCopyQuietly(MERGE_IN mergeInObject,
WITH withObject)
MERGE_IN - the generic type of the object to merge inWITH - the generic type of the object to merge withmergeInObject - the object to merge inwithObject - the object to merge withpublic static final <MERGE_IN,WITH> void mergeProperty(MERGE_IN mergeInObject,
WITH withObject,
PropertyDescriptor propertyDescriptor)
throws IllegalAccessException,
InvocationTargetException,
IllegalArgumentException
MERGE_IN - the generic type of the object to merge inWITH - the generic type of the object to merge withmergeInObject - 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 methodIllegalArgumentException - if the mergeInObject or withObject argument is null or if
the mergeInObject property type is different from the source type and
the relevant converter has not been registered.public 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–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.