Class DataCollectionNumberToLongNodeConverter
java.lang.Object
overit.geocallapp.wfm.core.bl.datacollection.converter.template.structure.node.DataCollectionNodeConverter
overit.geocallapp.wfm.core.bl.datacollection.converter.template.structure.node.DataCollectionNumberToLongNodeConverter
Convert a node old Number node to a new Long node.
- Since:
- 13.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DataCollectionNodeConversionResultconvertBody(overit.geocallapp.wfm.survey.template.TemplateTree currentNode, DataCollectionNodeConversionResult conversionResult) Contains the logic to convert an Number node into aDataCollectionNodeLong.protected LonggetLongValue(overit.geocallapp.wfm.survey.template.TemplateTree currentNode, String fieldName) Get the value of the fieldName as a Long.protected voidsetInitialValue(DataCollectionNode newNode, HashGetter data) Contains the logic to transform the old default value into the new initial value.Methods inherited from class overit.geocallapp.wfm.core.bl.datacollection.converter.template.structure.node.DataCollectionNodeConverter
convert, getDataCollectionNodeConversionResult, getLocalizedField, getLocalizedField, getStackTrace, initNode, loadDefaultFields
-
Field Details
-
ADTNLOWERLIMIT
- See Also:
-
ADTNUPPERLIMIT
- See Also:
-
-
Constructor Details
-
DataCollectionNumberToLongNodeConverter
public DataCollectionNumberToLongNodeConverter()
-
-
Method Details
-
convertBody
protected DataCollectionNodeConversionResult convertBody(overit.geocallapp.wfm.survey.template.TemplateTree currentNode, DataCollectionNodeConversionResult conversionResult) throws DataCollectionInitialValueException Contains the logic to convert an Number node into aDataCollectionNodeLong.- Specified by:
convertBodyin classDataCollectionNodeConverter- Parameters:
currentNode- the old nodeconversionResult- theDataCollectionNodeConversionResultto populate- Returns:
- the conversion result
DataCollectionNodeConversionResult - Throws:
DataCollectionInitialValueException
-
setInitialValue
Contains the logic to transform the old default value into the new initial value. If no default value where present this method does nothing.- Specified by:
setInitialValuein classDataCollectionNodeConverter- Parameters:
newNode- the new nodedata- old node data
-
getLongValue
protected Long getLongValue(overit.geocallapp.wfm.survey.template.TemplateTree currentNode, String fieldName) Get the value of the fieldName as a Long.- Parameters:
currentNode- the old nodefieldName- the field name- Returns:
- the value
-