gov.nih.nci.caarray.services.util.dataconverter.assembler
Class AssemblerFactory
java.lang.Object
gov.nih.nci.caarray.services.util.dataconverter.assembler.AssemblerFactory
- Direct Known Subclasses:
- BibliographicReferenceAssembler, DefaultAssembler, ExperimentAssembler, HybridizationFileUploadAssembler, HybridizationFileUploadEntryAssembler, MeasuredBioAssayAssembler, TreatmentAssembler
public abstract class AssemblerFactory
- extends java.lang.Object
This class is an abstract factory for creating and updating of an object
which data is provided by one or more source objects. The source objects
must be mapped to the target object by having the mapping defined in the
mapper repository file.
A subclass extending this class is reponsible for providing the specific
processing for producing or updating the target object given the source
objects. The typical processing includes mapping each of the source objects
to the target object. Additional processing may include creating those
attributes of the target object that contain a computed/aggregated value and
have no corresponding attribute from the source objects.
- Author:
- TranP
Method Summary |
abstract java.lang.Object |
create(java.lang.Object[] sourceObjects)
Create an object which properties has the value provided by the specified
objects as mapped by mapper-repository.xml |
static AssemblerFactory |
getAssembler(java.lang.Class targetObjectClass)
|
protected static java.lang.Object |
getMatchedObject(java.util.List objects,
java.lang.Class searchedClass)
|
protected static ClassMapperRepository |
getRepository()
|
protected static int |
indexOfInstanceOfClass(java.util.List objects,
java.lang.Class searchedClass)
|
protected static void |
update(java.lang.Class[] matchedSourceClasses,
java.util.List sourceObjects,
java.lang.Object targetObject,
boolean overwrite)
|
protected static void |
update(java.util.List matchedSourceClasses,
java.util.List sourceObjects,
java.lang.Object targetObject,
boolean overwrite)
|
abstract void |
update(java.util.List sourceObjects,
java.lang.Object targetObject,
boolean overwrite)
|
void |
update(java.lang.Object[] sourceObjects,
java.lang.Object targetObject,
boolean overwrite)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AssemblerFactory
public AssemblerFactory()
create
public abstract java.lang.Object create(java.lang.Object[] sourceObjects)
- Create an object which properties has the value provided by the specified
objects as mapped by mapper-repository.xml
- Parameters:
sourceObjects
-
- Returns:
update
public abstract void update(java.util.List sourceObjects,
java.lang.Object targetObject,
boolean overwrite)
update
public void update(java.lang.Object[] sourceObjects,
java.lang.Object targetObject,
boolean overwrite)
update
protected static void update(java.lang.Class[] matchedSourceClasses,
java.util.List sourceObjects,
java.lang.Object targetObject,
boolean overwrite)
update
protected static void update(java.util.List matchedSourceClasses,
java.util.List sourceObjects,
java.lang.Object targetObject,
boolean overwrite)
indexOfInstanceOfClass
protected static int indexOfInstanceOfClass(java.util.List objects,
java.lang.Class searchedClass)
getMatchedObject
protected static java.lang.Object getMatchedObject(java.util.List objects,
java.lang.Class searchedClass)
getRepository
protected static ClassMapperRepository getRepository()
getAssembler
public static AssemblerFactory getAssembler(java.lang.Class targetObjectClass)