Class DataCollectionTemplateConversionMap

java.lang.Object
overit.geocallapp.wfm.core.bl.datacollection.converter.template.structure.DataCollectionTemplateConversionMap

public class DataCollectionTemplateConversionMap extends Object
Stores data collection template structure conversion information. i.e. mapping between old node id and new node code This class is serialized as a json string and stored in supportModel field of BODataCollectionTemplateVersionConversion
Since:
13.0
GCApi:
bo
  • Constructor Details

    • DataCollectionTemplateConversionMap

      public DataCollectionTemplateConversionMap()
  • Method Details

    • get

      public String get(Long key)
      Get the new node code
      Parameters:
      key - old node id
      Returns:
      the new node code
    • put

      public String put(Long key, String value)
      Put the mapping between old node id and new node code.
      Parameters:
      key - the old node id
      value - the new node code
      Returns:
      the new node code
    • put

      public void put(Long oldNodeId, DataCollectionNodeConversionResult conversionResult)
      Put the association between old node id and the node conversion result. This method is also responsible for maintaining total, error and warning node count.
      Parameters:
      oldNodeId - the old node id
      conversionResult - the node conversion result
    • getNodeDescription

      protected String getNodeDescription(DataCollectionNodeConversionResult conversionResult)
      Get the node description in current language if present, the node code otherwise.
      Parameters:
      conversionResult - the node conversion result
      Returns:
      the node description in current language if present, the node code otherwise
    • getOldTemplateHeaderId

      public Long getOldTemplateHeaderId()
      Get the old template id.
      Returns:
      the old template id
    • setOldTemplateHeaderId

      public void setOldTemplateHeaderId(Long oldTemplateHeaderId)
      Set the old template id.
      Parameters:
      oldTemplateHeaderId - the old template id
    • getOldTemplateRootNodeId

      public Long getOldTemplateRootNodeId()
      Get old template root node id.
      Returns:
      the old template root node id
    • setOldTemplateRootNodeId

      public void setOldTemplateRootNodeId(Long oldTemplateRootNodeId)
      Set the old template root node id.
      Parameters:
      oldTemplateRootNodeId - the old template root node id
    • getNewTemplateId

      public Long getNewTemplateId()
      Get the new template id.
      Returns:
      the new template id
    • setNewTemplateId

      public void setNewTemplateId(Long newTemplateId)
      Set the new template id.
      Parameters:
      newTemplateId - the new template id
    • getNodeMap

      public Map<Long,String> getNodeMap()
      Get the node map containing the association between old node id and new node code.
      Returns:
      the node map containing the association between old node id and new node code
    • setNodeMap

      public void setNodeMap(Map<Long,String> nodeMap)
      Set the node map containing the association between old node id and new node code.
      Parameters:
      nodeMap - the node map containing the association between old node id and new node code
    • getErrorCount

      public Long getErrorCount()
      Get the number of error occurred during the structure conversion.
      Returns:
      the number of error occurred during the structure conversion
    • setErrorCount

      public void setErrorCount(Long errorCount)
      Set the number of error occurred during the structure conversion.
      Parameters:
      errorCount - the number of error occurred during the structure conversion
    • getWarningCount

      public Long getWarningCount()
      Get the number of waring occurred during the structure conversion.
      Returns:
      the number of waring occurred during the structure conversion.
    • setWarningCount

      public void setWarningCount(Long warningCount)
      Set the number of waring occurred during the structure conversion.
      Parameters:
      warningCount - the number of waring occurred during the structure conversion
    • getTotalNodeCount

      public Long getTotalNodeCount()
      Get the number of node present in structure.
      Returns:
      the number of node present in structure
    • setTotalNodeCount

      public void setTotalNodeCount(Long totalNodeCount)
      Set the number of node present in structure.
      Parameters:
      totalNodeCount - the number of node present in structure
    • getWarningMessageMap

      public Map<Long,String> getWarningMessageMap()
      Get the mapping between old node id and the warning message (if present).
      Returns:
      the mapping between old node id and the warning message (if present)
    • setWarningMessageMap

      public void setWarningMessageMap(Map<Long,String> warningMessageMap)
      Set the mapping between old node id and the warning message (if present).
      Parameters:
      warningMessageMap - the mapping between old node id and the warning message (if present)
    • getErrorMessageMap

      public Map<Long,String> getErrorMessageMap()
      Get the mapping between old node id and the error message (if present).
      Returns:
      the mapping between old node id and the error message (if present)
    • setErrorMessageMap

      public void setErrorMessageMap(Map<Long,String> errorMessageMap)
      Set the mapping between old node id and the error message (if present).
      Parameters:
      errorMessageMap - the mapping between old node id and the error message (if present)