cdac.medinfo.sdk.hl7282.hl7net.commons

## Interface IBatch

-     public interface IBatch

  The implementor of this interface should provide Parse, Validate and Serialize method.
  This interface should be implemented by classes whose instances should be processed as Batch or Batch file.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `parse(IHL7Stream objIHL7Stream)` Parses HL7 Batch Strings from any Stream into HL7 Batch objects.
    `int` | `serialize(IHL7Stream objIHL7Stream)` Serializes HL7 Batch objects.
    `boolean` | `validate()` Validates HL7 Batch objects.

- - ### Method Detail

    - #### parse

          int parse(IHL7Stream objIHL7Stream)
                    throws ParseException,
                           java.io.IOException

      Parses HL7 Batch Strings from any Stream into HL7 Batch objects.
      Parameters:
        `objIHL7Stream` -
      Returns:
        the int - Success/Failure
      Throws:
        `ParseException` - the parse exception
        `java.io.IOException` - Signals that an I/O exception has occurred.

    - #### validate

          boolean validate()
                           throws BatchException

      Validates HL7 Batch objects.
      Returns:
        true - if successful false - otherwise
      Throws:
        `BatchException` - Thrown when Batch validation fails.

    - #### serialize

          int serialize(IHL7Stream objIHL7Stream)
                        throws SerializeException,
                               java.io.IOException

      Serializes HL7 Batch objects.
      Parameters:
        `objIHL7Stream` - Specified IHL7Stream to be serialized
      Returns:
        the int - Success/Failure
      Throws:
        `SerializeException` - the serialize exception
        `java.io.IOException` - Signals that an I/O exception has occurred.