gov.nih.nci.caarray.services.util.dataconverter
Class DataConverter
java.lang.Object
gov.nih.nci.caarray.services.util.dataconverter.DataConverter
public final class DataConverter
- extends java.lang.Object
- Author:
- TranP
Method Summary |
static java.lang.Object |
create(java.lang.Object[] sourceObjects,
java.lang.Class targetObjectClass)
Create an object of the specified class which data is provided by
the specified source objects. |
static java.lang.Object |
create(java.lang.Object sourceObject,
java.lang.Class targetObjectClass)
|
static void |
update(java.lang.Object[] sourceObject,
java.lang.Object targetObject)
|
static void |
update(java.lang.Object[] sourceObjects,
java.lang.Object targetObject,
boolean overwrite)
Update the specified target object with data provided by the specified
array of source objects. |
static void |
update(java.lang.Object sourceObject,
java.lang.Object targetObject)
|
static void |
update(java.lang.Object sourceObject,
java.lang.Object targetObject,
boolean overwrite)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
create
public static java.lang.Object create(java.lang.Object[] sourceObjects,
java.lang.Class targetObjectClass)
- Create an object of the specified class which data is provided by
the specified source objects.
- Parameters:
sourceObjects
- - An array containing objects of one or different
types that provide data for the object being createdtargetObjectClass
- - The class of which an object is created
- Returns:
- An object of the specified class
create
public static java.lang.Object create(java.lang.Object sourceObject,
java.lang.Class targetObjectClass)
update
public static void update(java.lang.Object[] sourceObjects,
java.lang.Object targetObject,
boolean overwrite)
- Update the specified target object with data provided by the specified
array of source objects.
Warning: Source fields containing NULL are also copied to the
the target object. This may overwrite data expected to remain in the
target field. This is applied to the source objects' mapped object
references or collection elements which fields contain NULL.
- Parameters:
sourceObjects
- - An array of source objects which classes are
mapped to the target objecttargetObject
- - The target object to which the source objects' data
are to copied/transferred to
update
public static void update(java.lang.Object sourceObject,
java.lang.Object targetObject,
boolean overwrite)
update
public static void update(java.lang.Object[] sourceObject,
java.lang.Object targetObject)
update
public static void update(java.lang.Object sourceObject,
java.lang.Object targetObject)