Package com.softwaremining.wrappers
Class CBLPointer
- All Implemented Interfaces:
AbstractDataObject
,IFormatTypes
,ICBLContainer
,ICBLDataType
,IFieldContainer
,ISMDataType
,ISMInteger
,ISMNumeric
,ISMObject
- Direct Known Subclasses:
CBLObject
Data Type used for emulation of COBOL Pointer fields.
Classes declaring this data-type must inherit from CBLBean (or one of its subclasses).
-
Field Summary
Fields inherited from class com.softwaremining.wrappers.AbstractCBLField
format, log, NEEDS_FORMATING, readjustIndex_counter, resetWrapperOffsetCount, STRINGIFY_BEFORE_FORMATTING, totalRuntime_ACMFieldConstructor, totalRuntime_arrayUtilityReadjustIndex, totalRuntime_cachingTime, totalRuntime_getSubField, totalRuntime_getSubField_createSubField, totalRuntime_getSubField_createSubField_count, totalRuntime_getSubField_setSubFieldHelper, totalRuntime_getSubFieldHelper, totalruntime_getSubFields_b, totalRuntime_getWrapperOffset, totalRuntime_resetWrapperOffset, totalRuntime_setInternalValue, wrapperOffsetCount
Fields inherited from interface com.softwaremining.wrappers.format.IFormatTypes
COMP_MODE_COMP, COMP_MODE_COMP_1, COMP_MODE_COMP_2, COMP_MODE_COMP_3, COMP_MODE_COMP_4, COMP_MODE_COMP_5, COMP_MODE_COMP_6, COMP_MODE_COMP_7, COMP_MODE_COMP_8, COMP_MODE_COMP_MCP, COMP_MODE_COMP_X, COMP_MODE_DISPLAY, COMP_MODE_DISPLAY_SIGN_IS_LEADING, COMP_MODE_DISPLAY_SIGN_IS_SEPARATE_LEADING, COMP_MODE_DISPLAY_SIGN_IS_SEPARATE_TRAILING, COMP_MODE_DISPLAY_SIGN_IS_TRAILING, COMP_MODE_IDS_DB_KEY, COMP_MODE_NATIVE_2, COMP_MODE_NATIVE_4, COMP_MODE_NATIVE_8, COMP_MODE_REAL, COMP_MODE_UNSUPPORTED, JUSTIFIED_RIGHT_FALSE, JUSTIFIED_RIGHT_TRUE
-
Constructor Summary
ConstructorDescriptionCBLPointer
(AbstractCBLPrimitive parent, int[] index) CBLPointer
(String name, int[] theDim, CBLBean owner) CBLPointer
(String name, int[] theDim, String picture, CBLBean owner) Deprecated.CBLPointer
(String name, int[] theDim, String picture, CBLBean owner, int compMode) CBLPointer
(String name, CBLBean owner) when the Pointer is redefined - it means the offset maybe passed to it via the Redefined field e.g.CBLPointer
(String name, String picture, CBLBean owner) Deprecated.CBLPointer
(String name, String picture, CBLBean owner, int compMode) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
final void
assignExemptFromMemRelease
(boolean exempt) void
assignRedefines
(AbstractCBLField field) used internally by the framework to manage the COBOL redefinitionsfinal void
void
assignToAddressOf
(AbstractCBLField targetField) Translation of COBOL's
SET pointer (this) TO ADDRESS OF targetFieldvoid
assignToAddressOf
(CBLBean targetWrapper) Translation of COBOL's
SET pointer (this) TO ADDRESS OF targetFieldvoid
assignToAddressOf
(CBLBean targetWrapper, long index) Translation of COBOL's
SET pointer (this) TO ADDRESS OF targetField
The POINTER dao is expected to be an array of pointers, and the 'index' refers to Pointer array Item.final void
assignToAddressOf
(CBLPointer sourcePointer) Translation of COBOL's
SET pointer (this) TO ADDRESS OF targetFieldvoid
assignValue
(double newValue) Method Used internally by framework Set value of the objectvoid
assignValue
(int newValue) Method Used internally by framework Set value of the objectvoid
assignValue
(long newValue) Method Used internally by framework Set value of the objectfinal void
final void
assignValue
(AbstractDataObject data, int index) Used internally by SM/ET Generated DAO objects for arrayed Pointersvoid
assignValue
(String newValue) used internally by framework for setting object valuesprotected final AbstractCBLField
createSubField
(int[] index) boolean
equals
(CBLPointer pointerField) checks if Two Pointers point to same areacom.softwaremining.wrappers.CBLBean.CharArraysManager
com.softwaremining.wrappers.CBLBean.CharArraysManager
getCharArraysManager
(int index) com.softwaremining.wrappers.CBLBean.CharArrayObject
com.softwaremining.wrappers.CBLBean.CharArrayObject
getTopCharArrayObject
(int index) void
incrementPointerOffset
(double pointerOffst) POINTER ARITHMATIC - limited functionality.void
incrementPointerOffset
(Number pointerOffst) void
method used internally by framework to initialize the field to its defaultValueboolean
boolean
a pointer may point to a Field (in same class) or another Data-Access Object (ACMBaseWrappper subclass)boolean
isNull()
check whether field has been assigned to as yetboolean
For a group item - it returns the fully expanded String representing the group.used internally by framework for getting Stringified object values Returns the "storage" format of the field - for computational fields this would be binaryused internally by framework for database accessretrieveSubField
(int index) Methods inherited from class com.softwaremining.wrappers.CBLInteger
assignValue, assignValue
Methods inherited from class com.softwaremining.wrappers.AbstractCBLNumeric
assignValue, assignValue, bigDecimalValue, bigIntegerValue, compareTo, createBlank, doubleValue, equals, equals, equals, equals, equals, equals, getAsArray, getDefaultSpecialValue, getNumber, getObject, getObjectNoLeftCut, getStorageString, getValue, intValue, intValue, isFilled, isGreaterOrEqualTo, isGreaterOrEqualTo, isGreaterOrEqualTo, isGreaterOrEqualTo, isGreaterOrEqualTo, isGreaterOrEqualTo, isGreaterThan, isGreaterThan, isGreaterThan, isGreaterThan, isGreaterThan, isGreaterThan, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessThan, isLessThan, isLessThan, isLessThan, isLessThan, isLessThan, longValue, longValue, retrieveAsBigDecimal, retrieveAsBigDecimal, retrieveAsBigDecimal, retrieveAsBigInteger, retrieveAsDouble, retrieveAsDouble, retrieveAsDouble, retrieveAsInt, retrieveAsInt, retrieveAsInt, retrieveAsInt, retrieveAsLong, retrieveAsLong, retrieveAsLong, setRound, setRound
Methods inherited from class com.softwaremining.wrappers.AbstractCBLPrimitive
bytesSize, getPicture, initialize, isGroup, pad, pad, resetDimensionByIndx, retrieveField, retrieveSQLObject, setObjectAsString
Methods inherited from class com.softwaremining.wrappers.AbstractCBLField
addDependedField, assignAddressTo, assignBean, assignBigDecimal, assignDefaultValue, assignDefaultValue, assignDependingField, assignDouble, assignExcludeFromSQLTable, assignExternal, assignGroup, assignHighValues, assignHighValues, assignInt, assignLong, assignLowValues, assignLowValues, assignMasterSQLColumnsForArrays, assignObject, assignOverrideSQLTableName, assignPointerOffset, assignRedefines, assignSeparateColumn, assignSeparateTable, assignString, assignString, assignStringFormatted, assignStringFormatted, assignSubstring, assignSubstring, assignSubstring, assignSubstring, assignSubstring, assignSubstringDeprecated, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValueUnFormatted, enableSizeErrDetectionOnNextOp, equals, equalsRightTrimmed, fetchParentArray, fill, fill, fill, fill, fill, getAllSubFields, getArrayLength, getAsString, getCachedValue, getDefaultValue, getDependedFieldsList, getDimensions, getFormat, getMemoryPosition, getNumberOfSQLColumns, getNumOccurs, getObject, getOffsets, getParentGroup, getRedefines, getReverseRedefines, getSubFields, invokeSizeError, isArrayOfArrays, isBMSString, isCachable, isCachedArrayLengthActual, isCacheStateOK, isEmpty, isEqualToAll, isExcludedFromSQLTable, isFilled, isFilled, isFilled, isFiller, isGreaterOrEqualTo, isGreaterThan, isGreaterThan, isGreaterThan, isHighValues, isLessOrEqualTo, isLessThan, isLowValues, isSeparateColumns, isSeparateTable, isSpaces, isSubField, isUsedInRedefines, isZeros, lengthOf, onSizeError, printDetailAndValue, printDetails, redefinesAnotherField, resetCachedValue, retrieveAsString, retrieveAsStringFormatted, retrieveMasterSQLColumnsForArrays, retrieveName, retrieveObject, retrieveSQLTableNameOverride, retrieveStorageCellSize, retrieveStorageChars, retrieveStorageChars, retrieveSubField, retrieveSubstring, retrieveSubstring, retrieveWrapper, setBlankWhenZero, setCachedValue, setHighValues, setHighValues, setLowValues, setLowValues, setNumberOfSQLColumns, setNumOccurs, setOmitted, setParentGroup, setSeparateColumn, setSeparateTable, setSubstring, setSubstring, setSubstring, setSubstring, setWrapper, toEbcdic, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.softwaremining.wrappers.ISMInteger
intValue, retrieveAsInt
Methods inherited from interface com.softwaremining.wrappers.ISMNumeric
assignValue, doubleValue, getFormat, getNumber, getStorageString, isGreaterOrEqualTo, isGreaterOrEqualTo, isGreaterOrEqualTo, isGreaterOrEqualTo, isGreaterOrEqualTo, isGreaterOrEqualTo, isGreaterThan, isGreaterThan, isGreaterThan, isGreaterThan, isGreaterThan, isGreaterThan, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessThan, isLessThan, isLessThan, isLessThan, isLessThan, lengthOf, retrieveAsDouble, setRound
Methods inherited from interface com.softwaremining.wrappers.ISMObject
assignExcludeFromSQLTable, assignMasterSQLColumnsForArrays, assignObject, assignOverrideSQLTableName, assignString, assignStringFormatted, assignSubstring, bytesSize, fill, isExcludedFromSQLTable, isFiller, retrieveMasterSQLColumnsForArrays, retrieveName, retrieveObject, retrieveSQLObject, retrieveSQLTableNameOverride, retrieveStorageCellSize, retrieveSubField, retrieveWrapper
-
Constructor Details
-
CBLPointer
when the Pointer is redefined - it means the offset maybe passed to it via the Redefined field e.g. 01 WORKING-STORAGE-FIELDS. 03 PTR1 POINTER. 03 INT1 REDEFINES PTR1 PIC S9(09) COMP. ... MOVE 123 to INT1 So, when redefined use the internal CBLInteger value which is shared between this and Redefinition, otherwise use pointerOffset -
CBLPointer
-
CBLPointer
Deprecated. -
CBLPointer
-
CBLPointer
Deprecated. -
CBLPointer
Deprecated. -
CBLPointer
-
-
Method Details
-
createSubField
- Overrides:
createSubField
in classCBLInteger
-
assignValue
- Overrides:
assignValue
in classAbstractCBLField
-
assignValue
Used internally by SM/ET Generated DAO objects for arrayed Pointers- Parameters:
data
-index
-
-
getTopCharArrayObject
public com.softwaremining.wrappers.CBLBean.CharArrayObject getTopCharArrayObject() -
getTopCharArrayObject
public com.softwaremining.wrappers.CBLBean.CharArrayObject getTopCharArrayObject(int index) -
getCharArraysManager
public com.softwaremining.wrappers.CBLBean.CharArraysManager getCharArraysManager() -
getCharArraysManager
public com.softwaremining.wrappers.CBLBean.CharArraysManager getCharArraysManager(int index) -
assignToAddressOf
Translation of COBOL's
SET pointer (this) TO ADDRESS OF targetField- Overrides:
assignToAddressOf
in classAbstractCBLField
- Parameters:
targetField
-
-
assignToAddressOf
Translation of COBOL's
SET pointer (this) TO ADDRESS OF targetField- Specified by:
assignToAddressOf
in interfaceICBLContainer
- Overrides:
assignToAddressOf
in classAbstractCBLField
- Parameters:
targetField
-
-
assignToAddressOf
Translation of COBOL's
SET pointer (this) TO ADDRESS OF targetField- Specified by:
assignToAddressOf
in interfaceICBLContainer
- Overrides:
assignToAddressOf
in classAbstractCBLField
- Parameters:
targetWrapper
-targetField
-
-
assignToAddressOf
Translation of COBOL's
SET pointer (this) TO ADDRESS OF targetField
The POINTER dao is expected to be an array of pointers, and the 'index' refers to Pointer array Item.
I.e. POINTER (this) OCCURS nn TIMES.- Parameters:
targetField
-
-
assignRedefines
Description copied from class:AbstractCBLField
used internally by the framework to manage the COBOL redefinitions- Overrides:
assignRedefines
in classAbstractCBLField
-
isFieldPointer
public boolean isFieldPointer()a pointer may point to a Field (in same class) or another Data-Access Object (ACMBaseWrappper subclass)- Returns:
- true if pointing to a field
-
isNull
public boolean isNull()check whether field has been assigned to as yet- Returns:
- true if not pointing to anything yet
-
assignRedefines
-
retrieveSQLObject
Description copied from class:AbstractCBLField
used internally by framework for database access- Specified by:
retrieveSQLObject
in interfaceISMDataType
- Specified by:
retrieveSQLObject
in interfaceISMObject
- Overrides:
retrieveSQLObject
in classAbstractCBLField
-
stringValue
- Specified by:
stringValue
in interfaceISMDataType
- Overrides:
stringValue
in classAbstractCBLField
-
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 interfaceISMObject
- Overrides:
retrieveAsStringFormatted
in classAbstractCBLField
-
retrieveAsString
Description copied from class:AbstractCBLField
For a group item - it returns the fully expanded String representing the group. Ie ifGroup 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 interfaceAbstractDataObject
- Specified by:
retrieveAsString
in interfaceISMDataType
- Specified by:
retrieveAsString
in interfaceISMObject
- Overrides:
retrieveAsString
in classAbstractCBLField
- Returns:
- String representation of a group
-
retrievePointingTo
-
assignValue
Description copied from class:AbstractCBLField
used internally by framework for setting object values- Specified by:
assignValue
in interfaceAbstractDataObject
- Specified by:
assignValue
in interfaceISMDataType
- Specified by:
assignValue
in interfaceISMObject
- Overrides:
assignValue
in classAbstractCBLField
-
assignValue
public void assignValue(double newValue) Description copied from class:AbstractCBLField
Method Used internally by framework Set value of the object- Overrides:
assignValue
in classAbstractCBLField
-
assignValue
public void assignValue(long newValue) Method Used internally by framework Set value of the object- Overrides:
assignValue
in classAbstractCBLField
-
assignValue
public void assignValue(int newValue) Method Used internally by framework Set value of the object- Overrides:
assignValue
in classAbstractCBLField
-
initialize
public void initialize()method used internally by framework to initialize the field to its defaultValue- Specified by:
initialize
in interfaceISMObject
- Overrides:
initialize
in classAbstractCBLPrimitive
-
assignDefaultValue
-
retrieveSubField
-
incrementPointerOffset
public void incrementPointerOffset(double pointerOffst) POINTER ARITHMATIC - limited functionality. EG. in COBOL we can haveADD 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);- Overrides:
incrementPointerOffset
in classAbstractCBLField
-
incrementPointerOffset
-
equals
checks if Two Pointers point to same area- Overrides:
equals
in classAbstractCBLField
- Parameters:
value
-- Returns:
-
pointsTo
-
assignExemptFromMemRelease
public final void assignExemptFromMemRelease(boolean exempt) -
isExemptFromMemRelease
public boolean isExemptFromMemRelease()
-