Class FixLenRow

java.lang.Object
com.onenetwork.platform.integ.fixlen.FixLenRow

public class FixLenRow
extends java.lang.Object
Represents a row of values in a fixed-length format file
  • Constructor Summary

    Constructors 
    Constructor Description
    FixLenRow​(java.util.Map<java.lang.String,​java.util.List<java.lang.Integer>> map)  
  • Method Summary

    Modifier and Type Method Description
    FixLenField addField​(java.lang.String fieldName, int occurrence, java.lang.String fieldValue)
    Sets the field value for the given field name.
    FixLenField addField​(java.lang.String fieldName, java.lang.String fieldValue)
    Sets the field value for the given field name in the FixLenRow.
    java.util.List<FixLenField> getFields()  
    java.lang.String getFieldValue​(java.lang.String fieldName)
    Gets the field value using field name - fetches the first field with the name if multiple fields have the same name
    java.lang.String getFieldValue​(java.lang.String fieldName, int occurrenceNumber)
    Gets the field value using field name and occurrenceNumber - if multiple fields have the same name, the occurenceNumber (1st, 2nd, etc) is used to fetch the field
    FixLenField getFixLenField​(int fieldPosition)
    Fetches the FixLenField from the FixLenRow using fieldPosition
    java.lang.String getRawData()  
    void setFields​(java.util.List<FixLenField> fields)  
    void setRawData​(java.lang.String rawData)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FixLenRow

      public FixLenRow​(java.util.Map<java.lang.String,​java.util.List<java.lang.Integer>> map)
  • Method Details

    • getFields

      public java.util.List<FixLenField> getFields()
    • setFields

      public void setFields​(java.util.List<FixLenField> fields)
    • getFieldValue

      public java.lang.String getFieldValue​(java.lang.String fieldName)
      Gets the field value using field name - fetches the first field with the name if multiple fields have the same name
      Parameters:
      fieldName - name of the field to be fetched
      Returns:
      field value
    • getFieldValue

      public java.lang.String getFieldValue​(java.lang.String fieldName, int occurrenceNumber)
      Gets the field value using field name and occurrenceNumber - if multiple fields have the same name, the occurenceNumber (1st, 2nd, etc) is used to fetch the field
      Parameters:
      fieldName - name of the field to be fetched
      occurrenceNumber - 1-based indexed field's occurrence number (1st occurrence, 2nd occurrence, etc)
      Returns:
      field value
    • getFixLenField

      public FixLenField getFixLenField​(int fieldPosition)
      Fetches the FixLenField from the FixLenRow using fieldPosition
      Parameters:
      position - Position of the field in the FixLenRow - starts with 1
      Returns:
      fixLenField FixLenField at the specified fieldPosition
    • addField

      public FixLenField addField​(java.lang.String fieldName, java.lang.String fieldValue)
      Sets the field value for the given field name in the FixLenRow. If the same field name occurs more than once, the one that occurs first is set
      Parameters:
      fieldName -
      fieldValue -
      Returns:
      fixLenField
    • addField

      public FixLenField addField​(java.lang.String fieldName, int occurrence, java.lang.String fieldValue)
      Sets the field value for the given field name. If the same field name occurs more than once, the occurrence number is to be provided
      Parameters:
      fieldName -
      occurrence - 1-based indexed field's occurrence number (1st occurrence, 2nd occurrence, etc)
      fieldValue -
      Returns:
      fixLenField
    • getRawData

      public java.lang.String getRawData()
      Returns:
      the current row's content in raw format, not split into fields
    • setRawData

      public void setRawData​(java.lang.String rawData)
      Parameters:
      rawData - current row's content in raw format, not split into fields