Class CBLGroup

All Implemented Interfaces:
AbstractDataObject, IFormatTypes, ICBLBeanNGroup, ICBLContainer, ICBLDataType, IFieldContainer, ISMDataType, ISMGroup, ISMObject
Direct Known Subclasses:
BMSGroup

public class CBLGroup extends AbstractCBLField implements ISMGroup, ICBLBeanNGroup
Representation of a COBOL Group Item.
  • Field Details

  • Constructor Details

  • Method Details

    • getFormat

      public final Format getFormat()
      Description copied from class: AbstractCBLField
      used internally by the framework
      Overrides:
      getFormat in class AbstractCBLField
      Returns:
    • bytesSize

      public int bytesSize()
      Description copied from class: AbstractCBLField
      accounts for field sizes and Array SIZEs E.g. FIELD1 PIC X OCCURS 100 times. The cellsize is 1, but bytesSize() returns 100
      Specified by:
      bytesSize in interface ISMObject
      Specified by:
      bytesSize in class AbstractCBLField
    • retrieveField

      public final AbstractCBLField retrieveField(String name)
      Specified by:
      retrieveField in interface IFieldContainer
    • getField

      public final AbstractCBLField getField(int idx)
      Specified by:
      getField in interface ISMGroup
    • addField

      public final void addField(AbstractCBLField field)
    • addFieldWithoutNumOccurs

      public final void addFieldWithoutNumOccurs(AbstractCBLField field)
    • deleteField

      public final void deleteField(int idx)
    • deleteField

      public final void deleteField(String name)
    • fieldsCount

      public final int fieldsCount()
      Specified by:
      fieldsCount in interface ISMGroup
    • setObjectAsString

      public final void setObjectAsString(int[] indexes, String strValue)
    • isGroup

      public final boolean isGroup()
      Description copied from class: AbstractCBLField
      differentiate between fields and groups.
      Specified by:
      isGroup in class AbstractCBLField
    • resetDimensionByIndx

      protected final void resetDimensionByIndx(int dimensionValue, int dimensionIndx, AbstractCBLField owner)
      Description copied from class: AbstractCBLField
      Method used for reseting of dimensions for example if occurencies of this field depends from another field value (DEPENDING ON)
      Specified by:
      resetDimensionByIndx in class AbstractCBLField
      Parameters:
      dimensionValue -
      dimensionIndx -
      owner -
    • createSubField

      protected AbstractCBLField createSubField(int[] index)
      Specified by:
      createSubField in class AbstractCBLField
    • getDirectChildFields

      public final AbstractCBLField[] getDirectChildFields()
      get a list of all the DIRECT children (not the grand-children)
      Specified by:
      getDirectChildFields in interface ISMGroup
      Returns:
    • containsField

      public final boolean containsField(AbstractCBLField aField, boolean recursive)
      checks if Group contains the field. If 'recursive' = false, then only direct child fields are considered, If 'recursive' = false, then only direct child fields are considered,
      Parameters:
      aField - - field to look for
      recursive - - whether to look into owned groups.
      Returns:
    • retrievePrimitiveFields

      public final List<AbstractCBLField> retrievePrimitiveFields()
      get all the Primitive Fields (children, and grand-children) - ie ISMString, ISMInteger ... but all the Groups will be expanded to include their fields .
      Specified by:
      retrievePrimitiveFields in interface ICBLBeanNGroup
    • retrieveCompressedFields

      public List<AbstractCBLField> retrieveCompressedFields()
    • assignCorrespondingValue

      public void assignCorrespondingValue(CBLBean target)
      for translation of COBOL MOVE CORRESPONDING statements
      Parameters:
      target -
    • assignCorrespondingValue

      public void assignCorrespondingValue(CBLGroup target)
      for translation of COBOL MOVE CORRESPONDING statements
      Parameters:
      target -
    • addCorrespondingValue

      public void addCorrespondingValue(CBLBean target)
      for translation of COBOL MOVE CORRESPONDING statements
      Parameters:
      target -
    • addCorrespondingValue

      public void addCorrespondingValue(CBLGroup target)
      for translation of COBOL's ADD CORRESPONDING statements
      Parameters:
      target -
    • subtractCorrespondingValue

      public void subtractCorrespondingValue(CBLBean target)
      for translation of COBOL SUBTRACT CORRESPONDING statements
      Parameters:
      target -
    • subtractCorrespondingValue

      public void subtractCorrespondingValue(CBLGroup target)
      for translation of COBOL MOVE CORRESPONDING statements
      Parameters:
      target -
    • isEsql49LevelIndicator

      public final boolean isEsql49LevelIndicator()
      Specified by:
      isEsql49LevelIndicator in interface ISMGroup
    • setEsql49LevelIndicator

      public final void setEsql49LevelIndicator(boolean esql49LevelIndicator)
      Specified by:
      setEsql49LevelIndicator in interface ISMGroup
    • retrieveSQLObject

      public Object retrieveSQLObject(int[] indexes)
      used internally by framework for database access
      Specified by:
      retrieveSQLObject in interface ISMObject
      Specified by:
      retrieveSQLObject in class AbstractCBLField
    • toEbcdic

      public String toEbcdic()
      convert this record to Ebcdic
      Overrides:
      toEbcdic in class AbstractCBLField
    • initialize

      public void initialize()
      Specified by:
      initialize in interface ISMObject
      Specified by:
      initialize in class AbstractCBLField
    • readPointerAddressesFromWrapper

      public final void readPointerAddressesFromWrapper(CBLGroup source)
      method used internally by framework
      transfers the address of Pointers assigned to CBLBeans, from Source Structure to the target Structure
      Parameters:
      source - wrapper
    • assignBean

      public void assignBean(CBLBean sourceBean)
      Set value of the object
      Overrides:
      assignBean in class AbstractCBLField
    • assignGroup

      public void assignGroup(CBLGroup sourceGroup)
      Set value of the object
      Overrides:
      assignGroup in class AbstractCBLField
    • createBlank

      public AbstractCBLField createBlank()
      Specified by:
      createBlank in class AbstractCBLField
    • printFieldPosition

      public String printFieldPosition()
      returns the name of all fields and their memory position This method is used only for debugging purpose
      Returns: