cdac.medinfo.sdk.hl7282.baselibs

## Class ERL

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.baselibs.CompositeDataType
  - - cdac.medinfo.sdk.hl7282.baselibs.ERL

- All Implemented Interfaces:
    IDataType

      public class ERL
      extends CompositeDataType

  ERL - Error Location

  This data type identifies the segment and its constituent where an error has occurred.

  Represents an HL7 ERL data type. This data type has the following attributes:

  1. Segment ID (ST)Required
  2. Segment Sequence (NM)Required
  3. Field Position (NM)Optional
  4. Field Repetition (NM)Optional
  5. Component Number (NM)Optional
  6. Sub-Component Number (NM)Optional

  This class provides accessors & mutators for the elements mentioned above. This class override the equal method, to check whether some other object is "equal to" this one.

  User can also create Data Type through `DataElementFactory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ERL()` Default Constructor for ERL
    `ERL(int iComponentType, IDataTypeMap objIDataTypeMap)` Constructor for ERL class which takes two arguments and sets the value in the respective member variable.
    `ERL(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, IDataTypeMap objIDataTypeMap)` Constructor for ERL class which takes five arguments and sets the value in the respective member variable.
    `ERL(int iComponentType, int iMinLength, int iMaxLength, java.lang.String strCLength, int ITableNo, IDataTypeMap objIDataTypeMap)` Constructor for ERL class which takes six arguments and sets the value in the respective member variable.
    `ERL(int iMinLength, int iMaxLength, java.lang.String strCLength, int iComponentType)` Constructor for ERL class which takes four arguments and sets the value in the respective member variable.
    `ERL(int iMinLength, int iMaxLength, java.lang.String strCLength, int iTableNo, int iComponentType)` Constructor for ERL class which takes five arguments and sets the value in the respective member variable.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object objObject)` This method checks the equality of Object.
    `NM` | `getComponentNumber()` Returns Component Number
    `NM` | `getFieldPosition()` Returns Field Position
    `NM` | `getFieldRepetition()` Returns Field Repetition
    `ST` | `getSegmentID()` Returns Segment ID
    `NM` | `getSegmentSequence()` Returns Segment Sequence
    `NM` | `getSubComponentNumber()` Returns Sub-Component Number
    `void` | `setComponentNumber(NM objNM)` Sets the ComponentNumber.
    `void` | `setComponentNumber(java.lang.String strComponentNumber)` Sets the ComponentNumber.
    `void` | `setFieldPosition(NM objNM)` Sets the FieldPosition.
    `void` | `setFieldPosition(java.lang.String strFieldPosition)` Sets the FieldPosition.
    `void` | `setFieldRepetition(NM objNM)` Sets the FieldRepetition.
    `void` | `setFieldRepetition(java.lang.String strFieldRepetition)` Sets the FieldRepetition.
    `void` | `setSegmentId(ST objST)` Sets the SegmentId.
    `void` | `setSegmentId(java.lang.String strSegmentId)` Sets the SegmentId.
    `void` | `setSegmentSequence(NM objNM)` Sets the SegmentSequence.
    `void` | `setSegmentSequence(java.lang.String strSegmentSequence)` Sets the SegmentSequence.
    `void` | `setSubComponentNumber(NM objNM)` Sets the SubComponentNumber.
    `void` | `setSubComponentNumber(java.lang.String strSubComponentNumber)` Sets the SubComponentNumber.
    `boolean` | `validate()` The Method validates the Input value,and if validated properly then returns true.

    - ### Methods inherited from class cdac.medinfo.sdk.hl7282.baselibs.CompositeDataType

      `copy, dumpDataType, getAttributes, getDataTypeName, getLength, getValue, isPrimitive, read, setValue, write, writeToXML`

    - ### Methods inherited from class java.lang.Object

      `getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ERL

          public ERL()

      Default Constructor for ERL

    - #### ERL

          public ERL(int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             int iComponentType)
              throws InvalidComponentTypeException

      Constructor for ERL class which takes four arguments and sets the value in the respective member variable.
      Parameters:
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### ERL

          public ERL(int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             int iTableNo,
             int iComponentType)
              throws InvalidComponentTypeException

      Constructor for ERL class which takes five arguments and sets the value in the respective member variable.
      Parameters:
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iTableNo` - The Table number to which the value for the component is specified.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### ERL

          public ERL(int iComponentType,
             IDataTypeMap objIDataTypeMap)

      Constructor for ERL class which takes two arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### ERL

          public ERL(int iComponentType,
             int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             IDataTypeMap objIDataTypeMap)

      Constructor for ERL class which takes five arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

    - #### ERL

          public ERL(int iComponentType,
             int iMinLength,
             int iMaxLength,
             java.lang.String strCLength,
             int ITableNo,
             IDataTypeMap objIDataTypeMap)

      Constructor for ERL class which takes six arguments and sets the value in the respective member variable.
      Parameters:
        `objIDataTypeMap` - object of Data Type Map.
        `iComponentType` - The Type of the component i.e Component or a subcomponent.
        `iMinLength` - The Minimum length the DataType can have.
        `iMaxLength` - The Maximum length the DataType can have.
        `iCLength` - The Conformance length the DataType can have.
        `iTableNo` - The Table number to which the value for the component is specified.
      Throws:
        `InvalidComponentTypeException` - - if Component Type is not specified or valid.

  - ### Method Detail

    - #### setSegmentId

          public void setSegmentId(java.lang.String strSegmentId)

      Sets the SegmentId.
      Parameters:
        `strSegmentId` - Specifies the 3-letter name for the segment.

    - #### setSegmentId

          public void setSegmentId(ST objST)

      Sets the SegmentId.
      Parameters:
        `objST` - Specifies the 3-letter name for the segment.

    - #### setSegmentSequence

          public void setSegmentSequence(java.lang.String strSegmentSequence)

      Sets the SegmentSequence.
      Parameters:
        `strSegmentSequence` - Specifies the segment occurrence within the message.

    - #### setSegmentSequence

          public void setSegmentSequence(NM objNM)

      Sets the SegmentSequence.
      Parameters:
        `objNM` - Specifies the segment occurrence within the message.

    - #### setFieldPosition

          public void setFieldPosition(java.lang.String strFieldPosition)

      Sets the FieldPosition.
      Parameters:
        `strFieldPosition` - Specifies the number of the field within the segment.

    - #### setFieldPosition

          public void setFieldPosition(NM objNM)

      Sets the FieldPosition.
      Parameters:
        `objNM` - Specifies the number of the field within the segment.

    - #### setFieldRepetition

          public void setFieldRepetition(java.lang.String strFieldRepetition)

      Sets the FieldRepetition.
      Parameters:
        `strFieldRepetition` - Specifies the repetition number of the field.

    - #### setFieldRepetition

          public void setFieldRepetition(NM objNM)

      Sets the FieldRepetition.
      Parameters:
        `objNM` - Specifies the repetition number of the field.

    - #### setComponentNumber

          public void setComponentNumber(java.lang.String strComponentNumber)

      Sets the ComponentNumber.
      Parameters:
        `strComponentNumber` - Specifies the number of the component within the field.

    - #### setComponentNumber

          public void setComponentNumber(NM objNM)

      Sets the ComponentNumber.
      Parameters:
        `objNM` - Specifies the number of the component within the field.

    - #### setSubComponentNumber

          public void setSubComponentNumber(java.lang.String strSubComponentNumber)

      Sets the SubComponentNumber.
      Parameters:
        `strSubComponentNumber` - Specifies the number of the sub-component within the component.

    - #### setSubComponentNumber

          public void setSubComponentNumber(NM objNM)

      Sets the SubComponentNumber.
      Parameters:
        `objNM` - Specifies the number of the sub-component within the component.

    - #### getSegmentID

          public ST getSegmentID()

      Returns Segment ID
      Returns:
        ST - data type.

    - #### getSegmentSequence

          public NM getSegmentSequence()

      Returns Segment Sequence
      Returns:
        NM - data type.

    - #### getFieldPosition

          public NM getFieldPosition()

      Returns Field Position
      Returns:
        NM - data type.

    - #### getFieldRepetition

          public NM getFieldRepetition()

      Returns Field Repetition
      Returns:
        NM - data type.

    - #### getComponentNumber

          public NM getComponentNumber()

      Returns Component Number
      Returns:
        NM - data type.

    - #### getSubComponentNumber

          public NM getSubComponentNumber()

      Returns Sub-Component Number
      Returns:
        NM - data type.

    - #### validate

          public boolean validate()
                           throws InvalidDataTypeException

      The Method validates the Input value,and if validated properly then returns true. Here the validetion is based on the compulsory fields for the Datatype.
      Specified by:
        `validate` in interface `IDataType`
      Overrides:
        `validate` in class `CompositeDataType`
      Returns:
        boolean - true or false.
      Throws:
        `InvalidDataTypeException` - - if Invalid values is entered or Mandatory field is missing.

    - #### equals

          public boolean equals(java.lang.Object objObject)

      This method checks the equality of Object.
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `objObject` - object of Object class.
      Returns:
        boolean - shows success or failure of the comparison.