|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jlf.dataMap.DataMapper
This class is used as the base of all data mapping mechanisms in the data mapping framework. A data mapper is used to abstract the mechanism for communicating with a data source or sink. It generally maintains some sort of connection to the data source/sink.
DataLocation
,
DataMappedObject
Field Summary | |
protected DataArray |
dataArray
Holds an array of data read in from a data location to be mapped to DataMappedObject s. |
protected DataLocation |
dataLocation
The DataLocation that spawned the mapper. |
Constructor Summary | |
DataMapper()
Allow the default constructor, but please use a parameterized constructor! |
|
DataMapper(DataLocation dataLocation)
Constructs a new data mapper which references back to the DataLocation who created it. |
Method Summary | |
abstract void |
close()
Close the data mapper so it can clean up any resources it may have allocated. |
abstract void |
commitWrites()
This method is an abstract method for the purpose of commiting all writes to the data sink and doing any necessary cleanup afterward. |
abstract java.util.Vector |
findBySearchCriteria(DataMappedObject dmo,
java.lang.String criteriaKey)
This method is an abstract method for the purpose of using the current data location mapper to read any number of objects according to the DataMappedObject's type and search criteria. |
protected DataAttribute |
findDataAttributeForReplacementString(DataMappedObject dmo,
java.lang.String replacementString)
Retrieves a data attribute from the data mapped object (or a relationship of the object if the attribute has "." in it, with the prefix being the relationship name) for the replacement string given. |
protected java.util.Vector |
getCascadedRelationships(DataMappedObject dmo)
Helper method to retrieve cascade write relationships for an object. |
DataLocation |
getDataLocation()
Returns the DataLocation that spawned the mapper. |
protected java.lang.String |
replaceAttributeParameters(java.lang.String parameterString,
DataMappedObject dmo)
Replaces parameters in braces {} with the corresponding values from the data mapped object. |
void |
rollbackWrites()
This method is an abstract method for the purpose of rolling back any writes to the data sink. |
void |
setDataLocation(DataLocation dataLocation)
|
protected java.lang.String |
stringForDataAttributeReplacement(DataMappedObject dmo,
java.lang.String replacementString)
Retrieves a data attribute for the data mapped object and replacement string, then converts that attribute into a useful string. |
abstract void |
write(DataMappedObject dmo,
Relationship relationship)
This method is an abstract method for the purpose of writing a data mapped object, potentially in the context of a relationship, to a data store. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected DataLocation dataLocation
DataLocation
that spawned the mapper.
protected DataArray dataArray
DataMappedObject
s.
Constructor Detail |
public DataMapper()
public DataMapper(DataLocation dataLocation)
DataLocation
who created it.
Method Detail |
public DataLocation getDataLocation()
DataLocation
that spawned the mapper.
public void setDataLocation(DataLocation dataLocation)
public abstract void close()
protected DataAttribute findDataAttributeForReplacementString(DataMappedObject dmo, java.lang.String replacementString)
protected java.lang.String stringForDataAttributeReplacement(DataMappedObject dmo, java.lang.String replacementString)
protected java.lang.String replaceAttributeParameters(java.lang.String parameterString, DataMappedObject dmo)
protected java.util.Vector getCascadedRelationships(DataMappedObject dmo)
public abstract java.util.Vector findBySearchCriteria(DataMappedObject dmo, java.lang.String criteriaKey)
public abstract void write(DataMappedObject dmo, Relationship relationship)
The relationship can be null if not in context of a relationship.
public void rollbackWrites()
public abstract void commitWrites()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |