public class CBLBean extends java.lang.Object implements AbstractDataObject, ICBLContainer, IFieldContainer, ISMBean, ICBLBeanNGroup
Modifier and Type | Field and Description |
---|---|
protected boolean |
EBCDIC_JIT_PD_SUPPORT_FOR_SEQ_FILES
For use with EBCDIC files and Sequential-Files containing a single FILLER type field.
|
static int[] |
INDEX_FOR_NON_ARRAY_VERSION_OF_FIELD |
static int[] |
INDEX_ZERO |
protected static Log |
log |
protected int |
tmp_lengthofAssignedValue |
static long |
totalRuntime_allocate |
static long |
totalRuntime_calcFieldOffsets |
static long |
totalRuntime_getMemoryPosition |
static long |
totalRuntime_setFieldFormatted
for internal use only ...
|
Constructor and Description |
---|
CBLBean()
default constructor
|
CBLBean(BaseService owner)
standard constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addCorrespondingValue(CBLBean target)
for translation of COBOL ADD CORRESPONDING statements
|
void |
addCorrespondingValue(CBLGroup target)
for translation of COBOL ADD CORRESPONDING statements
|
protected void |
allocate()
Performs array allocation.
|
void |
assignAddressTo(CBLBean targetWrapper)
Translation of COBOL's
SET pointer TO ADDRESS OF record-2. |
void |
assignAddressTo(CBLPointer pointerField) |
void |
assignBean(CBLBean from) |
void |
assignBytesEncoded(byte[] thebytes)
for internal use only.
|
protected void |
assignCachedInitializationValue(java.lang.String newValue) |
void |
assignCorrespondingValue(CBLBean target)
for translation of COBOL MOVE CORRESPONDING statements
|
void |
assignCorrespondingValue(CBLGroup target)
for translation of COBOL MOVE CORRESPONDING statements
|
void |
assignDefaultValue(java.lang.Object defaultValue)
Set default initialization value for the class
|
void |
assignDependingField(AbstractCBLNumeric dependingField)
Information here is only used in sequentialFiles
|
void |
assignEbcdicBytes(byte[] thebytes)
Transfer EBCDIC bytes to the wrapper.
|
void |
assignEbcdicJIT_PdSupportForSequentialFiles(boolean newVal)
For use with EBCDIC files and Sequential-Files containing a single FILLER type field.
|
void |
assignEncodedValue(java.lang.String theLine)
Used by the file-readers - to convert to /from ebcdic IF the flag DATAFILES_ARE_EBCDIC is set
|
void |
assignExemptFromMemRelease(boolean exempt)
for internal use only
|
void |
assignHighValues()
Equivalent of COBOL HIGH VALUES
|
void |
assignInternalVars(CBLBean fromClass)
for internal use only - Introduced to allow CICS BMSSCreenBeans override this method
|
void |
assignLowValues()
representation of COBOL LOW VALUES
|
void |
assignRawEbcdicBytes(byte[] theBytes) |
protected void |
assignRecordSize(int newValue)
For internal use only
resizing SequentialNIOFile need this |
void |
assignRedefines(AbstractCBLField redefineField)
For handling COBOL SET ADDRESS OF
|
void |
assignRedefines(CBLBean targetWrapper)
For handling COBOL Redefines
|
void |
assignSessionId(java.lang.Long sessionId)
For internal use only
|
void |
assignStringFormatted(java.lang.String value)
Wrapper around assignString
|
void |
assignSubstring(int offset,
int length,
java.lang.String theValue)
translation of MOVE 'A' TO ABC (5:4)
|
void |
assignSubstring(int offset,
java.lang.String theValue) |
void |
assignToAddressOf(AbstractCBLField targetField)
Used internally for setAddressOf on a field.
|
void |
assignToAddressOf(AbstractDataObject target) |
void |
assignToAddressOf(CBLBean target)
Support for COBOL SET pointer (this) TO ADDRESS OF targetField
|
void |
assignToAddressOf(java.lang.String target) |
void |
assignToAllFields(boolean boolValue)
allows assigning the value to ALL the fields (not groups) in this class.
|
void |
assignValue(AbstractDataObject from)
Transfer the value from BaseWrapper to
|
void |
assignValue(CBLBean from) |
void |
assignValue(char[] incomingChars)
Created for performance reasons only- (e.g in CICS Screen handling)
|
void |
assignValue(int idx,
java.lang.String value)
Wrapper around assignString for arrayed 01 declarations
|
void |
assignValue(long value)
Wrapper around assignString
|
void |
assignValue(java.lang.Number value)
Wrapper around catering for BigDecimal and BigInteger
|
void |
assignValue(java.lang.String value)
Wrapper around assignString
|
protected int |
calculateStorageSize(AbstractCBLField firstLevelEntry)
this method may be overriden for Multi-fd's (sequentialFiles)
|
boolean |
containsPointers()
indicates if this wrapper contains any pointer definitions
|
boolean |
equals(CBLPointer pointerField) |
boolean |
equals(int arg0)
Compares content of the wrapper as a group with numerical arg0.
|
boolean |
equals(long arg0)
Compares content of the wrapper as a group with numerical arg0.
|
boolean |
equals(java.lang.String value) |
boolean |
equalsRightTrimmed(java.lang.String theVal) |
int |
fieldsCount()
Method used internally by softwaremining framework
|
void |
fill(byte filler)
Representation of COBOL FILL Statement
|
void |
fill(int filler)
Representation of COBOL FILL Statement
|
void |
fill(int startPos,
int len,
byte filler)
Representation of COBOL FILL Statement
|
void |
fill(int startPos,
int len,
java.lang.String filler)
Representation of COBOL FILL Statement
|
void |
fill(java.lang.String filler)
Representation of COBOL FILL Statement
|
java.lang.String |
getValue() |
protected boolean |
hasPackedDecimalFields()
for internal use only.
|
protected void |
initDefaultValues() |
void |
initialize()
Equivalent of COBOL's INITIALIZE statement
|
void |
initialize(int startPos,
int endPos) |
boolean |
isExemptFromMemRelease()
for internal use only
|
boolean |
isFilled(byte filler)
Is object filled with 'filler'
|
boolean |
isFilled(char filler)
Is object filled with 'filler'
|
boolean |
isFilled(int filler)
Is object filled with 'filler'
|
boolean |
isFilled(java.lang.String filler)
Is object filled with 'filler'
|
boolean |
isGreaterThan(AbstractCBLField value)
compare values of this field with the target field
|
boolean |
isGreaterThan(long value)
SAS 05.03.2009
compare values of this field with the target field
|
boolean |
isGreaterThan(java.lang.String value)
compare values of this field with the target field
|
boolean |
isHighValues()
Is object filled with COBOL High Values ?
|
boolean |
isInvolvedInDependency()
Note that dependency may be established between different record-structures (Different CBLBeanss)
|
boolean |
isInvolvedInExternalDependency()
true when the 'dependent' and 'depending' field live in different Data-access-Objects
|
boolean |
isLessOrEqualTo(AbstractCBLField value)
compare values of this field with the target field
|
boolean |
isLessOrEqualTo(double value)
compare values of this field with the target field
|
boolean |
isLessOrEqualTo(int value)
compare values of this field with the target field
|
boolean |
isLessOrEqualTo(long value)
compare values of this field with the target field
|
boolean |
isLessOrEqualTo(java.lang.String value)
compare values of this field with the target field
|
boolean |
isLessThan(AbstractCBLField value)
compare values of this field with the target field
|
boolean |
isLessThan(double value)
compare values of this field with the target field
|
boolean |
isLessThan(int value)
compare values of this field with the target field
|
boolean |
isLessThan(long value)
compare values of this field with the target field
|
boolean |
isLessThan(java.lang.String value)
compare values of this field with the target field
|
boolean |
isLowValues()
Is object filled with COBOL Low Values ?
|
boolean |
isRedefinedByAnotherClass()
if ABC REDEFINES XYZ or ABC.assignRedefines(XYZ);
Then ABC probably contains a lot of
|
boolean |
isResourceAlreadyReleased() |
int |
lengthOf()
Equivelant to IBM COBOL LENGTH OF function: Number of bytes
used by a data item
|
java.lang.String |
printFieldPosition()
returns the name of all fields and their memory position
This method is used only for debugging purpose
|
java.lang.String |
printFieldValues()
Debugging utility
Prints the name of all fields and their memory position (System.out.println) and their current value
This method is used only for debugging purpose
|
java.lang.String |
printOrderedFieldPosition() |
java.lang.String |
PrintOrderedFieldPositionsAndValue() |
void |
releaseResources()
this is called internally - after a program is CANCEL'ed.
|
void |
releaseResources(boolean forceRelease)
For internal use only - memory management stuff
|
void |
resetCachedValues(boolean recursive)
remove the cached values from all fields
|
void |
resetCompressedFieldList()
For internal use Only
|
void |
resetStructure() |
void |
resize(int newSize)
Allows resizing of custom built DAO class - which contain a single String field.
|
int |
retrieveActualLength()
Method used internally by softwaremining framework
Used in CICSBaseService class ..
|
java.lang.String |
retrieveAsString()
returns the Stringified representation of the DAO - concatenation of DAO fields according to the declared fields sizes.
|
protected java.lang.String |
retrieveCachedInitializationValue() |
java.util.List<AbstractCBLField> |
retrieveCompressedFields()
For internal use Only
|
java.util.ArrayList<AbstractCBLField> |
retrieveDependedFieldsList() |
byte[] |
retrieveEbcdicBytes()
Converts the current (UTF) data to EBCDIC Bytes.
|
java.lang.String |
retrieveEbcdicValue()
return the EBCDIC representation of this record
|
java.lang.String |
retrieveEncodedValue() |
ISMObject |
retrieveField(int fieldNum)
Method used internally by softwaremining framework
Used in BerkeleyIndexedFile
|
ISMObject |
retrieveField(java.lang.String fieldName)
Method used internally by softwaremining framework
|
ISMObject |
retrieveFieldAtMemoryPosition(int memoryPosition)
Used primarily in CICS / VSAM-SQL classes.
|
protected java.lang.String |
retrieveFieldFormatted(AbstractCBLField field)
Get the storage representation of the field
Retrieves the value of the field (the area of wrapper array, corresponding to the field)
For packed fields (COMP, COMP-3, etc) this will return the binary version of the data.
|
AbstractCBLField[] |
retrieveFields()
Method used internally by softwaremining framework
get all the fields/groups associated with this class.
|
boolean |
retrieveIsTargetOfPointers() |
java.util.List<AbstractCBLField> |
retrievePrimitiveFields()
for internal use only.
|
byte[] |
retrieveRawEbcdicBytes() |
java.lang.Long |
retrieveSessionId()
For internal use only
|
java.lang.Object |
retrieveSQLObject() |
int |
retrieveStorageCellSize()
get length of the data item.
|
protected char[] |
retrieveStorageChars(AbstractCBLField field)
Get the storage representation of the field
Retrieves the value of the field (the area of wrapper array, corresponding to the field)
For packed fields (COMP, COMP-3, etc) this will return the binary version of the data.
|
java.lang.String |
retrieveSubstring(int offset)
returns the Substring - similar to getValue() returning a StringValue - then performing StringValue.subString(offset)
However, When offset falls outside the StringValue (e.g.
|
java.lang.String |
retrieveSubstring(int offset,
int length)
returns the Substring - similar to getValue() returning a StringValue - then performing StringValue.subString(offset , offset+length)
However, When offset / offset+length falls outside the StringValue (e.g.
|
ISMObject |
retrieveTopLevelField()
DAO classes need to have one (and only one) field / group.
|
java.lang.String |
retrieveValue()
get value as string
|
java.lang.String |
retrieveValue(int idx)
Wrapper around getString for arrayed 01 declarations
|
void |
setValue(CBLBean theValue) |
java.lang.String |
stringValue()
Get String representation for object
|
void |
subtractCorrespondingValue(CBLBean target)
for translation of COBOL SUBTRACT CORRESPONDING statements
|
void |
subtractCorrespondingValue(CBLGroup target)
for translation of COBOL SUBTRACT CORRESPONDING statements
|
java.lang.String |
toString() |
protected int tmp_lengthofAssignedValue
protected static Log log
public static final int[] INDEX_ZERO
public static final int[] INDEX_FOR_NON_ARRAY_VERSION_OF_FIELD
protected boolean EBCDIC_JIT_PD_SUPPORT_FOR_SEQ_FILES
public static long totalRuntime_setFieldFormatted
public static long totalRuntime_calcFieldOffsets
public static long totalRuntime_getMemoryPosition
public static long totalRuntime_allocate
public CBLBean()
public CBLBean(BaseService owner)
owner
- public java.util.ArrayList<AbstractCBLField> retrieveDependedFieldsList()
public void assignDependingField(AbstractCBLNumeric dependingField)
protected final java.lang.String retrieveFieldFormatted(AbstractCBLField field)
protected final char[] retrieveStorageChars(AbstractCBLField field)
protected final void allocate()
public boolean retrieveIsTargetOfPointers()
public final boolean isInvolvedInDependency()
public final boolean isInvolvedInExternalDependency()
protected int calculateStorageSize(AbstractCBLField firstLevelEntry)
firstLevelEntry
- public final AbstractCBLField[] retrieveFields()
public final ISMObject retrieveField(int fieldNum)
retrieveField
in interface ISMBean
public ISMObject retrieveField(java.lang.String fieldName)
retrieveField
in interface IFieldContainer
retrieveField
in interface ISMBean
fieldName
- public final ISMObject retrieveFieldAtMemoryPosition(int memoryPosition)
public java.lang.String printFieldPosition()
public java.lang.String printOrderedFieldPosition()
public java.lang.String PrintOrderedFieldPositionsAndValue()
public java.lang.String printFieldValues()
public java.lang.String toString()
toString
in class java.lang.Object
public final int fieldsCount()
public final java.lang.String retrieveAsString()
ISMBean
retrieveAsString
in interface AbstractDataObject
retrieveAsString
in interface ISMBean
retrieveAsString
in interface ISMDataType
public final java.lang.String stringValue()
stringValue
in interface ISMBean
stringValue
in interface ISMDataType
public final int retrieveStorageCellSize()
retrieveStorageCellSize
in interface AbstractDataObject
public final int retrieveActualLength()
retrieveActualLength
in interface ISMBean
public java.lang.String retrieveValue()
retrieveValue
in interface ISMBean
public java.lang.String getValue()
public final java.lang.String retrieveValue(int idx)
public void assignValue(java.lang.String value)
assignValue
in interface AbstractDataObject
assignValue
in interface ISMBean
assignValue
in interface ISMDataType
public void assignValue(char[] incomingChars)
public final void assignValue(int idx, java.lang.String value)
public final void assignDefaultValue(java.lang.Object defaultValue)
defaultValue
- public final void assignStringFormatted(java.lang.String value)
public final void assignValue(long value)
public void setValue(CBLBean theValue)
public void assignValue(CBLBean from)
public void assignBean(CBLBean from)
public final void assignValue(java.lang.Number value)
public final void assignValue(AbstractDataObject from)
public final boolean containsPointers()
public final void assignLowValues()
public final boolean isLowValues()
public void assignHighValues()
public final boolean isHighValues()
public final void fill(int filler)
filler
- public final void fill(byte filler)
filler
- public final void fill(java.lang.String filler)
filler
- public final void fill(int startPos, int len, java.lang.String filler)
filler
- public final void fill(int startPos, int len, byte filler)
filler
- public final void assignToAllFields(boolean boolValue)
boolValue
- public final ISMObject retrieveTopLevelField()
ISMBean
retrieveTopLevelField
in interface ISMBean
public final void assignCorrespondingValue(CBLBean target)
target
- public final void assignCorrespondingValue(CBLGroup target)
target
- public final void addCorrespondingValue(CBLBean target)
target
- public final void addCorrespondingValue(CBLGroup target)
target
- public final void subtractCorrespondingValue(CBLBean target)
target
- public final void subtractCorrespondingValue(CBLGroup target)
target
- public final boolean equals(java.lang.String value)
public boolean equals(CBLPointer pointerField)
public final boolean isLessThan(AbstractCBLField value)
value
- public final boolean isLessThan(int value)
value
- public final boolean isLessThan(java.lang.String value)
value
- public final boolean isLessThan(double value)
value
- public final boolean isLessThan(long value)
value
- public final boolean isLessOrEqualTo(AbstractCBLField value)
value
- public final boolean isLessOrEqualTo(int value)
value
- public final boolean isLessOrEqualTo(java.lang.String value)
value
- public final boolean isLessOrEqualTo(double value)
value
- public final boolean isLessOrEqualTo(long value)
value
- public final boolean isGreaterThan(AbstractCBLField value)
value
- public final boolean isGreaterThan(long value)
value
- public final boolean isGreaterThan(java.lang.String value)
value
- public final boolean isFilled(byte filler)
public boolean equalsRightTrimmed(java.lang.String theVal)
public final boolean isFilled(java.lang.String filler)
public final boolean isFilled(int filler)
public final boolean isFilled(char filler)
public final java.lang.String retrieveSubstring(int offset, int length)
offset
- length
- public final java.lang.String retrieveSubstring(int offset)
offset
- public final void assignSubstring(int offset, int length, java.lang.String theValue)
offset
- length
- theValue
- public final void assignSubstring(int offset, java.lang.String theValue)
public java.util.List<AbstractCBLField> retrievePrimitiveFields()
retrievePrimitiveFields
in interface ICBLBeanNGroup
protected boolean hasPackedDecimalFields()
public java.util.List<AbstractCBLField> retrieveCompressedFields()
public void resetCompressedFieldList()
public final java.lang.String retrieveEbcdicValue()
public void assignBytesEncoded(byte[] thebytes) throws java.io.UnsupportedEncodingException
thebytes
- java.io.UnsupportedEncodingException
public void assignEbcdicBytes(byte[] thebytes)
thebytes
- public byte[] retrieveEbcdicBytes()
thebytes
- public void assignRawEbcdicBytes(byte[] theBytes)
public byte[] retrieveRawEbcdicBytes()
public void assignEncodedValue(java.lang.String theLine)
theLine
- public java.lang.String retrieveEncodedValue()
java.io.UnsupportedEncodingException
public final void resetCachedValues(boolean recursive)
public void assignAddressTo(CBLPointer pointerField)
public void assignAddressTo(CBLBean targetWrapper)
pointerField
- public void assignToAddressOf(AbstractDataObject target)
public void assignToAddressOf(CBLBean target)
assignToAddressOf
in interface ICBLContainer
targetField
- public void assignToAddressOf(java.lang.String target)
public void assignToAddressOf(AbstractCBLField targetField)
ICBLContainer
assignToAddressOf
in interface ICBLContainer
public boolean isRedefinedByAnotherClass()
public final void assignRedefines(AbstractCBLField redefineField)
public final void assignRedefines(CBLBean targetWrapper)
protected void assignRecordSize(int newValue)
newValue
- public final void resize(int newSize)
newSize
- public int lengthOf()
protected java.lang.String retrieveCachedInitializationValue()
protected void assignCachedInitializationValue(java.lang.String newValue)
public void resetStructure()
resetStructure
in interface ISMBean
protected void initDefaultValues()
public void initialize()
ISMBean
initialize
in interface ISMBean
public void initialize(int startPos, int endPos)
public boolean equals(long arg0) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public boolean equals(int arg0) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public void releaseResources()
public void releaseResources(boolean forceRelease)
ISMBean
releaseResources
in interface ISMBean
public java.lang.Object retrieveSQLObject()
retrieveSQLObject
in interface ISMDataType
public void assignExemptFromMemRelease(boolean exempt)
assignExemptFromMemRelease
in interface ISMBean
exempt
- public boolean isExemptFromMemRelease()
isExemptFromMemRelease
in interface ISMBean
public boolean isResourceAlreadyReleased()
isResourceAlreadyReleased
in interface ISMBean
public void assignSessionId(java.lang.Long sessionId)
assignSessionId
in interface ISMBean
public java.lang.Long retrieveSessionId()
retrieveSessionId
in interface ISMBean
public void assignInternalVars(CBLBean fromClass)
fromClass
- public void assignEbcdicJIT_PdSupportForSequentialFiles(boolean newVal)
newVal
- Copyright SoftwareMining. All Rights Reserved.