com.partnersoft.v3x.apps.Staker.interfaces
Class RecordTranslator

java.lang.Object
  extended by com.partnersoft.v3x.apps.Staker.interfaces.RecordTranslator
All Implemented Interfaces:
java.io.Serializable

public class RecordTranslator
extends java.lang.Object
implements java.io.Serializable

Translates a Record or Bean using a vector of FieldTranslators.

See Also:
Serialized Form

Constructor Summary
RecordTranslator()
           
 
Method Summary
 java.util.HashMap getFieldTranslatorHash()
           
 java.util.ArrayList getFieldTranslators()
           
 java.util.ArrayList getMapManglers()
          Optional ordered list of permutations to apply to the input dictionary or bean property set before doing fieldwise translations.
 java.lang.Class getToClass()
          The class being converted to.
 void merge(java.util.Map destination, java.util.Map fieldValues)
          Merges the fieldValues dictionary by translating each field and setting the new values onto the destination object.
 void merge(java.lang.Object destination, java.util.Map fieldValues)
          Does the merge, this time for an object rather than a Map.
 void setFieldTranslators(java.util.ArrayList newTranslators)
           
 void setMapManglers(java.util.ArrayList newManglers)
           
 void setToClass(java.lang.Class newClass)
           
 java.lang.Object translate(java.util.Map fieldValues)
          Converts a Map of field values into an object of the class specified by the toClass property.
 java.lang.Object translate(java.lang.Object original)
          Converts object into object of the class specified by the toClass property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordTranslator

public RecordTranslator()
Method Detail

translate

public java.lang.Object translate(java.lang.Object original)
Converts object into object of the class specified by the toClass property.


translate

public java.lang.Object translate(java.util.Map fieldValues)
Converts a Map of field values into an object of the class specified by the toClass property.


merge

public void merge(java.util.Map destination,
                  java.util.Map fieldValues)
Merges the fieldValues dictionary by translating each field and setting the new values onto the destination object. Pass in a log if you want to find out what happened.


merge

public void merge(java.lang.Object destination,
                  java.util.Map fieldValues)
Does the merge, this time for an object rather than a Map.


getFieldTranslatorHash

public java.util.HashMap getFieldTranslatorHash()

getFieldTranslators

public java.util.ArrayList getFieldTranslators()

setFieldTranslators

public void setFieldTranslators(java.util.ArrayList newTranslators)

getToClass

public java.lang.Class getToClass()
The class being converted to.


setToClass

public void setToClass(java.lang.Class newClass)

getMapManglers

public java.util.ArrayList getMapManglers()
Optional ordered list of permutations to apply to the input dictionary or bean property set before doing fieldwise translations.


setMapManglers

public void setMapManglers(java.util.ArrayList newManglers)