Class AbstractCBLField

java.lang.Object
com.softwaremining.wrappers.AbstractCBLField
All Implemented Interfaces:
AbstractDataObject, IFormatTypes, ICBLContainer, ICBLDataType, ISMDataType, ISMObject
Direct Known Subclasses:
AbstractCBLPrimitive, CBLGroup

public abstract class AbstractCBLField extends Object implements AbstractDataObject, ISMObject, IFormatTypes, ICBLDataType
For internal use only
Abstract datatype designed to support COBOL statements such as REDEFINES, COMPUTATIONALS, OCCURS-DEPENDING, precise formatting, POINTERS, ...
  • Field Details

    • NEEDS_FORMATING

      protected static final boolean NEEDS_FORMATING
      See Also:
    • STRINGIFY_BEFORE_FORMATTING

      protected static final boolean STRINGIFY_BEFORE_FORMATTING
      See Also:
    • format

      protected Format format
    • log

      protected static transient Log log
    • totalRuntime_getSubField

      public static long totalRuntime_getSubField
      for internal use only ... profiling information
    • totalruntime_getSubFields_b

      public static long totalruntime_getSubFields_b
    • totalRuntime_getSubFieldHelper

      public static long totalRuntime_getSubFieldHelper
    • totalRuntime_setInternalValue

      public static long totalRuntime_setInternalValue
    • totalRuntime_getWrapperOffset

      public static long totalRuntime_getWrapperOffset
    • totalRuntime_resetWrapperOffset

      public static long totalRuntime_resetWrapperOffset
    • totalRuntime_cachingTime

      public static long totalRuntime_cachingTime
    • totalRuntime_ACMFieldConstructor

      public static long totalRuntime_ACMFieldConstructor
    • totalRuntime_arrayUtilityReadjustIndex

      public static long totalRuntime_arrayUtilityReadjustIndex
    • readjustIndex_counter

      public static long readjustIndex_counter
    • totalRuntime_getSubField_createSubField_count

      public static long totalRuntime_getSubField_createSubField_count
    • totalRuntime_getSubField_createSubField

      public static long totalRuntime_getSubField_createSubField
    • totalRuntime_getSubField_setSubFieldHelper

      public static long totalRuntime_getSubField_setSubFieldHelper
    • resetWrapperOffsetCount

      public static int resetWrapperOffsetCount
    • wrapperOffsetCount

      public static int wrapperOffsetCount
  • Constructor Details

    • AbstractCBLField

      protected AbstractCBLField()
      for internal use only
  • Method Details

    • getFormat

      public Format getFormat()
      used internally by the framework
      Returns:
    • isSubField

      public final boolean isSubField()
      for internal use only
    • fetchParentArray

      public final AbstractCBLField fetchParentArray()
    • getParentGroup

      public final CBLGroup getParentGroup()
    • setParentGroup

      public final void setParentGroup(CBLGroup parentGroup)
      for internal use only
    • getDimensions

      public final int[] getDimensions()
      to get the overall dimensions of an arrayed field For example, if we have
       
         05 GROUP-1 OCCURS 10 TIMES.
            10 FIELD-A OCCURS 30 TIMES.
         The field_A.getDimensions will return the following int[] : { 10, 30 };
      Returns:
    • getOffsets

      public final int[] getOffsets()
      for internal use only
      Returns:
    • isFiller

      public boolean isFiller()
      used internally by the framework to indicate if a field represents COBOL FILLER
      Specified by:
      isFiller in interface ISMObject
      Returns:
    • getReverseRedefines

      public List<AbstractCBLField> getReverseRedefines()
    • redefinesAnotherField

      public boolean redefinesAnotherField()
      shows if this field or any of the parents REDEFINED another field. I.e. is this field involved in a redefinition.
      This method is used in external classes such as EbcdicConvertor
      Returns:
    • assignRedefines

      public void assignRedefines(AbstractCBLField redefineField)
      used internally by the framework to manage the COBOL redefinitions
      Parameters:
      _redefines -
    • assignRedefines

      public void assignRedefines(CBLPointer redefineField)
      used internally by the framework to manage the COBOL redefinitions
      Parameters:
      _redefines -
    • isUsedInRedefines

      public boolean isUsedInRedefines()
      Used Internally by SoftwareMining Framework is this field used in redefines ?
      Returns:
    • getRedefines

      public final AbstractCBLField getRedefines()
      Used internally by the framework to return the Redefines items for this field
      Returns:
    • assignDependingField

      public final void assignDependingField(AbstractCBLField dependingField)
      Support for COBOL OCCURS DEPENDING
      Parameters:
      dependingField -
    • addDependedField

      public final void addDependedField(ISMObject dependedObject)
      Support for COBOL OCCURS DEPENDING
      Parameters:
      dependedField -
    • getDependedFieldsList

      public final List<AbstractCBLField> getDependedFieldsList()
      returns list of fields dependent on this field
      Returns:
    • getNumOccurs

      public final int getNumOccurs()
      Used internally by the framework to indicate the size of the occurs
      Returns:
    • getNumberOfSQLColumns

      public int getNumberOfSQLColumns()
      this method is used in building SQL Tables. When the inherited array size is greater than 1 .. the system will generate separate columns for each inherited array.
      Returns:
    • setNumberOfSQLColumns

      public void setNumberOfSQLColumns(int numOccursInherited)
    • setWrapper

      protected final void setWrapper(CBLBean wrapper)
      Set underlying wrapper
    • retrieveWrapper

      public final CBLBean retrieveWrapper()
      Used internally by the framework Get underlying wrapper class
      Specified by:
      retrieveWrapper in interface ISMObject
    • setNumOccurs

      public final void setNumOccurs(AbstractCBLField owner)
      for internal use only Used during the declarations of Data Holders and persistence data-holders
      Parameters:
      owner -
    • resetDimensionByIndx

      protected abstract void resetDimensionByIndx(int dimensionValue, int dimensionIndx, AbstractCBLField owner)
      Method used for reseting of dimensions for example if occurencies of this field depends from another field value (DEPENDING ON)
      Parameters:
      dimensionValue -
      dimensionIndx -
      owner -
    • initialize

      public abstract void initialize()
      Specified by:
      initialize in interface ISMObject
    • createBlank

      public abstract AbstractCBLField createBlank()
    • retrieveName

      public final String retrieveName()
      get Field name
      Specified by:
      retrieveName in interface ISMObject
      Returns:
    • isCachedArrayLengthActual

      protected boolean isCachedArrayLengthActual()
      Checking of cached array length actuality (if any depending field in wrapper was changed after previous caching of arrayLength)
      Returns:
      true/false
    • getArrayLength

      public final int getArrayLength()
      used internally by the framework to indicate the lenght of an array field
      Returns:
    • setOmitted

      public final void setOmitted(boolean omitted)
      used internally by the framework
      Parameters:
      omitted -
    • setSeparateTable

      public final void setSeparateTable(boolean separateTable)
      Deprecated.
      - use assignSeparateTable
    • assignSeparateTable

      public final void assignSeparateTable(boolean separateTable)
      Used for in object persistence : determines whether the Multi-dimensional arrays are being kept in a separate table or contained within a single column (packed) in the parent table.
      Parameters:
      separateTable -
    • isExcludedFromSQLTable

      public boolean isExcludedFromSQLTable()
      Specified by:
      isExcludedFromSQLTable in interface ISMObject
    • assignExcludeFromSQLTable

      public void assignExcludeFromSQLTable(boolean excludeFromSQLTable)
      Specified by:
      assignExcludeFromSQLTable in interface ISMObject
    • isSeparateTable

      public final boolean isSeparateTable()
      used internally by the framework. Indicates whether the separate SQL tables are used for representation of the arrayed field
      Returns:
    • setSeparateColumn

      public final void setSeparateColumn(boolean separateColumn)
      Deprecated.
      use assignSeparateColumn
    • assignSeparateColumn

      public final void assignSeparateColumn(boolean separateColumn)
      Used for in object persistence : determines whether the Multi-dimensional arrays are being kept in multiple column for each of the arrayed objects a single column (packed) in the parent table.
      Parameters:
      separateTable -
    • isSeparateColumns

      public final boolean isSeparateColumns()
      used internally by the framework. Indicates whether the separate SQL tables are used for representation of the arrayed field
      Returns:
    • isArrayOfArrays

      public final boolean isArrayOfArrays()
      used internally by the framework. indicates if the field was an array of arrays. For example, if lets say we have defined : VAR1[10][20] In this case, VAR1[5] is an array with [20] elements in it. Therefore VAR1[5] is an array, but VAR1[5][2] is not an array
      Returns:
    • assignHighValues

      public final void assignHighValues()
      Equivalent of COBOL HIGH VALUES
    • setHighValues

      public final void setHighValues()
      Deprecated.
      - please use assignHighValues
      Equivalent of COBOL HIGH VALUES
    • setHighValues

      public final void setHighValues(int startPos, int length)
      Deprecated.
      - please use assignHighValues
      Equivalent of COBOL HIGH VALUES
      Parameters:
      startPos -
      length -
    • assignHighValues

      public final void assignHighValues(int startPos, int length)
      Equivalent of COBOL HIGH VALUES
      Parameters:
      startPos -
      length -
    • setLowValues

      public final void setLowValues(int startPos, int length)
      Deprecated.
      - please use assignLowValues
      Equivalent of COBOL LOW VALUES
    • assignLowValues

      public final void assignLowValues(int startPos, int length)
      Equivalent of COBOL LOW VALUES
    • assignLowValues

      public final void assignLowValues()
      Equivalent of COBOL LOW VALUES
    • setLowValues

      public final void setLowValues()
      Deprecated.
      - please use assignLowValues
      Equivalent of COBOL LOW VALUES
    • fill

      public final void fill(int filler)
      Equivalent of COBOL FILL statement
    • fill

      public final void fill(byte filler)
      Equivalent of COBOL FILL statement
    • fill

      public final void fill(String filler)
      Equivalent of COBOL FILL statement
      Specified by:
      fill in interface ISMObject
    • fill

      public final void fill(long startPos, long len, int filler)
      Equivalant of COBOL FILL statement
    • fill

      public final void fill(long startPos, long len, String filler)
      Equivalant of COBOL FILL statement
    • getSubFields

      public final AbstractCBLField[] getSubFields()
      Used internally by the framework
      used primarily for ACMInitialize.initialize ... ensure that all arrays are initialized get Arrayed subfields Used to get an instance of an array object. For example, ACMFieldString XYZ OCCURS 20 times. the XYZ[0] ... XYZ[19] each is represented thru a different instance of ACMFieldString. This method will create ALL sub-fields, which can be VERY expensive.
      Note that if an application only accessees XYZ[12], then only that instance will be created. However, if you INITIALIZE, or FILL "XYZ", then it has to create the whole lot, and this is expensive.
      Parameters:
      indexes -
      Returns:
    • getAllSubFields

      public final AbstractCBLField[] getAllSubFields()
    • isLowValues

      public final boolean isLowValues()
      Is object filled with COBOL Low Values ?
    • isHighValues

      public final boolean isHighValues()
      Is object filled with COBOL HIGH Values ?
    • isSpaces

      public final boolean isSpaces()
      Is object filled with SPACES
    • isZeros

      public final boolean isZeros()
      Is object filled with ZEROS
    • isFilled

      public boolean isFilled(byte filler)
      Is object filled with 'filler'
    • isFilled

      public boolean isFilled(String filler)
      Is object filled with 'filler'
    • isFilled

      public boolean isFilled(int filler)
      Is object filled with 'filler'
    • isFilled

      public boolean isFilled(char filler)
      Is object filled with 'filler'
    • equalsRightTrimmed

      public boolean equalsRightTrimmed(String theVal)
      used for test of equality in 88 level Constants
    • assignValue

      public void assignValue(AbstractCBLField field)
      Set value of the object
    • assignValue

      public final void assignValue(int[] indexes, AbstractDataObject theValue)
    • assignValue

      public void assignValue(AbstractDataObject field)
    • assignBean

      protected void assignBean(CBLBean sourceBean)
    • assignGroup

      protected void assignGroup(CBLGroup sourceGroup)
    • assignValue

      public void assignValue(Object object)
      Assign a value to the field
      Specified by:
      assignValue in interface ISMObject
    • assignValue

      public void assignValue(AbstractCBLField field, int[] indexes)
      Method Used internally by framework Set value of the object
    • assignValue

      public void assignValue(int idx, Object newValue)
      Assign a value to an arrayed field
      Parameters:
      idx - - array-index
      newValue -
    • assignValue

      public final void assignValue(int[] indexes, String value)
      Method Used internally by framework Set value of the object
    • assignValue

      public void assignValue(int value)
      Method Used internally by framework Set value of the object
    • assignInt

      public void assignInt(int value)
      Method Used internally by framework Set value of the object
    • assignLong

      public void assignLong(long value)
      Method Used internally by framework Set value of the object
    • assignDouble

      public void assignDouble(double value)
      Method Used internally by framework Set value of the object
    • assignBigDecimal

      public void assignBigDecimal(BigDecimal value)
      Method Used internally by framework Set value of the object
    • assignValue

      public final void assignValue(Integer value)
      Method Used internally by framework Set value of the object
    • assignValue

      public final void assignValue(int[] indexes, long value)
      Method Used internally by framework Set value of the object
    • assignValue

      public final void assignValue(int[] indexes, Long value)
      Method Used internally by framework Set value of the object
    • assignValue

      public void assignValue(long value)
      Method Used internally by framework Set value of the object
    • assignValue

      public final void assignValue(Long value)
      Method Used internally by framework Set value of the object
    • assignValue

      public final void assignValue(int[] indexes, double value)
      Method Used internally by framework Set value of the object
    • assignValue

      public final void assignValue(int[] indexes, BigDecimal value)
      Method Used internally by framework Set value of the object
    • assignValue

      public final void assignValue(int[] indexes, Double value)
      Method Used internally by framework Set value of the object
    • assignValue

      public void assignValue(double value)
      Method Used internally by framework Set value of the object
    • assignValue

      public final void assignValue(Double value)
      Method Used internally by framework Set value of the object
    • assignValue

      public final void assignValue(BigDecimal value)
      Method Used internally by framework Set value of the object
    • assignValue

      public final void assignValue(int[] indexes, CBLDate value)
      Method Used internally by framework Set value of the object
    • assignValue

      public void assignValue(CBLDate value)
      Method Used internally by framework Set value of the object
    • assignValue

      public void assignValue(int[] indexes, CBLTime value)
      Method Used internally by framework Set value of the object
    • assignValue

      public void assignValue(CBLTime value)
      Method Used internally by framework Set value of the object
    • assignSubstring

      public final void assignSubstring(int start, int end, AbstractCBLField value)
      translation of MOVE 'A' TO ABC (5:4)
    • setSubstring

      public final void setSubstring(int start, AbstractCBLField value)
      Deprecated.
      - please use assignSubstring
      translation of MOVE 'A' TO ABC (5:)
    • assignSubstring

      public final void assignSubstring(int start, AbstractCBLField value)
      translation of MOVE 'A' TO ABC (5:)
    • setSubstring

      public final void setSubstring(int start, String value)
      Deprecated.
      - please use assignSubstring
      translation of MOVE 'A' TO ABC (5:)
    • assignSubstring

      public final void assignSubstring(int start, String value)
      translation of MOVE 'A' TO ABC (5:)
    • setSubstring

      public final void setSubstring(int offset, int length, String value)
      Deprecated.
      - please use assignSubstring
      translation of MOVE 'A' TO ABC (5:4)
      Parameters:
      offset -
      length -
      value -
    • assignSubstring

      public final void assignSubstring(int offset, int length, String value)
      translation of MOVE 'A' TO ABC (5:4)
      Specified by:
      assignSubstring in interface ISMObject
      Parameters:
      offset -
      length -
      value -
    • assignSubstringDeprecated

      public final void assignSubstringDeprecated(int offset, String value)
      Set substring of Field
      Parameters:
      offset -
      value -
    • setSubstring

      public final void setSubstring(int offset, int length, int value)
      Deprecated.
      - please use assignSubstring
      Set substring of Field
      Parameters:
      offset -
      length -
      value -
    • assignSubstring

      public final void assignSubstring(int offset, int length, int value)
      Set substring of Field
      Parameters:
      offset -
      length -
      value -
    • retrieveSubstring

      public final String retrieveSubstring(int offset, int length)
    • getMemoryPosition

      public final int getMemoryPosition()
      Shows the position of the field within the underlying character-array This method is used only for debugging purpose
      Specified by:
      getMemoryPosition in interface ICBLDataType
      Returns:
      position of field
    • retrieveSubstring

      public final String retrieveSubstring(int offset)
    • retrieveSQLObject

      public Object retrieveSQLObject()
      used internally by framework for database access
      Specified by:
      retrieveSQLObject in interface ISMDataType
      Specified by:
      retrieveSQLObject in interface ISMObject
    • retrieveSQLObject

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

      public final void assignObject(int[] indexes, Object value)
      used internally by framework for setting object values
      Specified by:
      assignObject in interface ISMObject
    • retrieveSubField

      public AbstractCBLField retrieveSubField(int[] indexes)
      Used internally by the framework to get an array element Used to get an instance of an array object. For example, ACMFieldString XYZ OCCURS 20 times. the XYZ[0] ... XYZ[19] each is represented thru a different instance of ACMFieldString. This method will return the particular instance represented by "indexes" (the input parameters).
      Specified by:
      retrieveSubField in interface ISMObject
      Parameters:
      indexes -
      Returns:
    • createSubField

      protected abstract AbstractCBLField createSubField(int[] indexes)
    • bytesSize

      public abstract int bytesSize()
      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
    • retrieveStorageCellSize

      public final int retrieveStorageCellSize()
      used internally by the framework to return the internal storage size of the field - e.g. PIC x(10) will have a size of 10. or PIC S9(4) will have a size of 2
      Specified by:
      retrieveStorageCellSize in interface AbstractDataObject
      Specified by:
      retrieveStorageCellSize in interface ISMDataType
      Specified by:
      retrieveStorageCellSize in interface ISMObject
    • retrieveStorageChars

      public char[] retrieveStorageChars()
    • retrieveStorageChars

      public char[] retrieveStorageChars(int[] indexes)
      used internally by framework for getting stringified object values THis method is not used a great deal !
    • assignValue

      public void assignValue(String value)
      used internally by framework for setting object values
      Specified by:
      assignValue in interface AbstractDataObject
      Specified by:
      assignValue in interface ISMDataType
      Specified by:
      assignValue in interface ISMObject
    • assignValueUnFormatted

      public void assignValueUnFormatted(String value)
      used internally by framework for setting object values Avoids any formatting on object ... therefore is faster than standard assignValue(); Should not be used if formatting is important. (Currently only used for reading CSVFile class).
    • assignString

      public void assignString(String value)
      set the value of object
      Specified by:
      assignString in interface ISMObject
      Parameters:
      value -
    • assignString

      public void assignString(int[] indexes, String strValue)
    • assignStringFormatted

      public void assignStringFormatted(String formattedString)
      The input string is already formatted. used internally by framework for setting object values
      Specified by:
      assignStringFormatted in interface ISMObject
    • assignStringFormatted

      public void assignStringFormatted(int[] indexes, String formattedString)
      The input string is already formatted
    • retrieveAsStringFormatted

      public String retrieveAsStringFormatted()
      used internally by framework for getting Stringified object values Returns the "storage" format of the field - for computational fields this would be binary
      Specified by:
      retrieveAsStringFormatted in interface ISMObject
    • retrieveAsStringFormatted

      public String retrieveAsStringFormatted(int[] indexes)
      used internally by framework for getting stringified object values THis method is not used a great deal !
    • retrieveAsString

      public String retrieveAsString()
      For a group item - it returns the fully expanded String representing the group. Ie if
         Group contains FIELD-1 PIC (X) OCCURS 4 time.
         field1[0].set("A");
         group.stringValue() returns : "A   " ;
       
      For a field - it returns the value. Ie for an integer (PIC X(5)) value 10 it would return "10" , Please also see retrieveAsStringFormatted which would return "10 "
      Specified by:
      retrieveAsString in interface AbstractDataObject
      Specified by:
      retrieveAsString in interface ISMDataType
      Specified by:
      retrieveAsString in interface ISMObject
      Returns:
      String representation of a group
    • stringValue

      public String stringValue()
      Specified by:
      stringValue in interface ISMDataType
    • getAsString

      public String getAsString()
    • retrieveAsString

      public String retrieveAsString(int[] indexes)
      used internally by framework to get object values as String
      Parameters:
      indexes -
      Returns:
    • isGroup

      public abstract boolean isGroup()
      differentiate between fields and groups.
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • printDetailAndValue

      public final String printDetailAndValue()
    • printDetails

      public final String printDetails()
    • equals

      public boolean equals(RangeItem[] value)
      check against 88-RangeItems
    • equals

      public boolean equals(ISMObject value)
      if field1 == field2
      Parameters:
      value -
      Returns:
    • equals

      public boolean equals(CBLPointer pointerField)
      checks if field is pointing to same area as the PointerField
      Parameters:
      value -
      Returns:
    • equals

      public boolean equals(int value)
      if field1 == field2
      Parameters:
      value -
      Returns:
    • equals

      public boolean equals(double value)
      if field1 == field2
      Parameters:
      value -
      Returns:
    • equals

      public boolean equals(long value)
      if field1 == field2
      Parameters:
      value -
      Returns:
    • equals

      public boolean equals(String value)
      if field1 == field2
      Parameters:
      value -
      Returns:
    • isGreaterThan

      public final boolean isGreaterThan(ISMObject value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterThan

      public final boolean isGreaterThan(CBLBean wrapper)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterThan

      public boolean isGreaterThan(String value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterThan

      public boolean isGreaterThan(double value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterThan

      public boolean isGreaterThan(BigDecimal value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterThan

      public boolean isGreaterThan(int value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterThan

      public boolean isGreaterThan(char value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterThan

      public boolean isGreaterThan(long value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterOrEqualTo

      public final boolean isGreaterOrEqualTo(ISMObject value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterOrEqualTo

      public boolean isGreaterOrEqualTo(int value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterOrEqualTo

      public boolean isGreaterOrEqualTo(String value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterOrEqualTo

      public boolean isGreaterOrEqualTo(BigDecimal value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterOrEqualTo

      public boolean isGreaterOrEqualTo(double value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isGreaterOrEqualTo

      public boolean isGreaterOrEqualTo(long value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isLessThan

      public final boolean isLessThan(ISMObject value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isLessThan

      public boolean isLessThan(int value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isLessThan

      public boolean isLessThan(String value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isLessThan

      public boolean isLessThan(double value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isLessThan

      public boolean isLessThan(long value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isLessThan

      public boolean isLessThan(BigDecimal value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isLessOrEqualTo

      public final boolean isLessOrEqualTo(ISMObject value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isLessOrEqualTo

      public boolean isLessOrEqualTo(int value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isLessOrEqualTo

      public boolean isLessOrEqualTo(String value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isLessOrEqualTo

      public boolean isLessOrEqualTo(BigDecimal value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isLessOrEqualTo

      public boolean isLessOrEqualTo(double value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • isLessOrEqualTo

      public boolean isLessOrEqualTo(long value)
      compare values of this field with the target field
      Parameters:
      value -
      Returns:
    • retrieveObject

      public final Object retrieveObject()
      Used internally by the framework get the field as an object if there is a cached value - then return the cached value
      Specified by:
      retrieveObject in interface ISMObject
    • getObject

      public final Object getObject(int[] indexes)
      method used internally by softwaremining framework
      Parameters:
      indexes -
      Returns:
    • isEqualToAll

      public final boolean isEqualToAll(String filler)
      to do .. IF abcd = ALL '9'
      Parameters:
      filler -
      value1 -
      Returns:
    • setCachedValue

      public void setCachedValue(Object theValue)
      For internal use only set cached Value..
    • getCachedValue

      public final Object getCachedValue()
      get Cached value
      Returns:
      - either the cached object or null if no cached value exists
    • isCachable

      public final boolean isCachable()
      Used internally by the framework to indicate whether a caching strategy is in place. not all fields may be cached . E.g. Groups or subFields cannot be cached.
      Returns:
    • resetCachedValue

      public final void resetCachedValue()
      for internal use only
    • assignDefaultValue

      public void assignDefaultValue(Object defaultValue)
      Used to set the Default values passed to a COBOL field. e.g.
      05 FIELD-1 PIC X VALUE "-"
    • assignDefaultValue

      public void assignDefaultValue(double doubleValue)
      Used to set the Default values passed to a COBOL field. e.g.
      05 FIELD-1 PIC 9 VALUE 1
    • getDefaultValue

      public Object getDefaultValue()
      Used internally to retrieve the default values set by the original cobol application. E.g.
      05 FIELD-1 PIC 9 VALUE 1
    • enableSizeErrDetectionOnNextOp

      public void enableSizeErrDetectionOnNextOp()
      Enables on Size-Error detection. When enabled, if size of the new-value is greater than that defined by the fields PICTURE, then the new value will not be assigned and field will keep its PREVIOUS value. The subsequent call to method onSizeError() will return true
    • onSizeError

      public boolean onSizeError()
      Handling COBOL ONSIZE ERROR Only works when EnableSizeErrDetectionOnNextOp has been called.
      Returns:
    • invokeSizeError

      public void invokeSizeError()
      manually set the SizeError flag - used in Division operations to catch Division-By-Zero
    • lengthOf

      public int lengthOf()
      Equivalent to IBM COBOL LENGTH OF function: Number of bytes. used by a data item
      Returns:
      the STORAGE Length as defined by the PICTURE. Ie PIC 9(10) VALUE 123 will return 10 (not 3)
    • toEbcdic

      public String toEbcdic()
      convert field to Ebcdic
    • isCacheStateOK

      public boolean isCacheStateOK()
      (For backward compatibility) for internal use only ... checks the integrity of caches.
      Returns:
    • assignExternal

      public void assignExternal(AbstractCBLField externalField)
      Support for COBOL EXTERNAL fields ... e.g.
        
          01 SQLCA.
            ...
             05 SQLSTATE pic X(5).
            ...
          01 DAO2.
            ...
             05 SQLSTATE pic X(5) EXTERNAL.
        
      In this case, changes to SQLCA.sqlstate will be reflected in DAO2.sqlstate
      Parameters:
      externalField -
    • assignToAddressOf

      public void assignToAddressOf(CBLPointer pointerField)
      Translation of COBOL's
      SET pointer (this) TO ADDRESS OF targetField
      Parameters:
      targetField -
    • assignToAddressOf

      public void assignToAddressOf(AbstractCBLField targetField)
      Translation of COBOL's

      SET pointer (this) TO ADDRESS OF targetField

      This (source) will read data from the character array of Target
      Specified by:
      assignToAddressOf in interface ICBLContainer
      Parameters:
      targetField -
    • incrementPointerOffset

      public void incrementPointerOffset(double pointerOffst)
      POINTER ARITHMATIC - limited functionality. EG. in COBOL we can have
        ADD 2 TO WS-SAD-PTR
       
      This framework does not work with direct memory position - but instead it will offset the pointer position. THis means if it was pointing to a field X(10), incrementing the address by 2 is equivalant of field.substring(2);
    • assignPointerOffset

      public void assignPointerOffset(double pointerOffst)
      POINTER ARITHMATIC - limited functionality. EG. in COBOL we can have
        ADD 2 TO WS-SAD-PTR
       
      This framework does not work with direct memory position - but instead it will offset the pointer position. THis means if it was pointing to a field X(10), incrementing the address by 2 is equivalant of field.substring(2);
    • assignAddressTo

      public void assignAddressTo(CBLPointer pointerField)
      Translation of COBOL's
      SET ADDRESS OF a-variable TO pointer
      Parameters:
      pointerField -
    • assignToAddressOf

      public void assignToAddressOf(CBLBean targetField)
      Translation of COBOL's

      SET pointer (this) TO ADDRESS OF targetField

      This (source) will read data from the character array of Target
      Specified by:
      assignToAddressOf in interface ICBLContainer
      Parameters:
      targetField -
    • isEmpty

      public final boolean isEmpty()
      IS EMPTY is used in BULL DPS7
    • setBlankWhenZero

      public void setBlankWhenZero(boolean blankWhenZero)
      The function will assign spaces to memory representation of fields defined as Numeric-Edited-Format Ie only AFTER invoking this function - when the value of a field is set to ZERO, the system will internally store it as SPACES.
      Parameters:
      blankWhenZero -
    • isBMSString

      public boolean isBMSString()
      For internal use only.
      This provides same functionality of if (this instanceOf BMSString) without building a dependency on CICS libraries.
      Returns:
    • retrieveSQLTableNameOverride

      public String retrieveSQLTableNameOverride()
      Description copied from interface: ISMObject
      For Unisys DMS Support
      Specified by:
      retrieveSQLTableNameOverride in interface ISMObject
    • assignOverrideSQLTableName

      public void assignOverrideSQLTableName(String tableName)
      Description copied from interface: ISMObject
      For Unisys DMS Support
      Specified by:
      assignOverrideSQLTableName in interface ISMObject
    • retrieveMasterSQLColumnsForArrays

      public String[] retrieveMasterSQLColumnsForArrays()
      Description copied from interface: ISMObject
      For Unisys DMS Support
      Specified by:
      retrieveMasterSQLColumnsForArrays in interface ISMObject
    • assignMasterSQLColumnsForArrays

      public void assignMasterSQLColumnsForArrays(String[] columnNames)
      Description copied from interface: ISMObject
      For Unisys DMS Support
      Specified by:
      assignMasterSQLColumnsForArrays in interface ISMObject