Package com.softwaremining.wrappers
Class AbstractSortBean
java.lang.Object
com.softwaremining.wrappers.CBLBean
com.softwaremining.wrappers.AbstractSortBean
- All Implemented Interfaces:
AbstractDataObject,ICBLBeanNGroup,ICBLContainer,IFieldContainer,ISMBean,ISMDataType
Providing Sort Capabilities to DataBeans
-
Field Summary
Fields inherited from class com.softwaremining.wrappers.CBLBean
EBCDIC_JIT_PD_SUPPORT_FOR_SEQ_FILES, INDEX_FOR_NON_ARRAY_VERSION_OF_FIELD, INDEX_ZERO, log, tmp_lengthofAssignedValue, totalRuntime_allocate, totalRuntime_calcFieldOffsets, totalRuntime_getMemoryPosition, totalRuntime_setFieldFormatted -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddKeyAscending(ISMObject field) voidaddKeyAscending(ISMObject[] fields) voidaddKeyAscending(String[] keyNames) voidaddKeyDescending(AbstractCBLField field) voidaddKeyDescending(ISMObject[] fields) voidaddKeyDescending(String[] keyNames) voidassignSortModeSize(int size) Deprecated.- not needed or supportedvoidassignStatus(ISMObject status) voidassignStatusValue(int value) Used internally to set the IO operation status-values.protected voidassignStatusValue(String value) Method for assigning a string to the status.voidinsert()insert a record into the to-be-sorted-listbooleanisEof()have we reached the end of the file ?voidload(AbstractBasePersistence file) load a file for Sort Operationvoidload a file for Merge operationvoidmerge()Merge two or more files (See COBOL's MERGE statement)voidnext()voidvoidrelease()The release statement transfers records from the INPUT PROCEDURE to the input Phase of the sort operation.
Internally, it will call the InsertRecord() method for performing the transfer.voidThe release statement transfers records from the INPUT PROCEDURE to the input Phase of the sort operation.
Internally, it will call the InsertRecord() method for performing the transfer.
The "xxxRecord" is generated by the translator when it expect there may be an Exception.abstract AbstractCBLFieldintUsed internally to set the IO operation status-values.intUsed internally to set the IO operation status-values.voidsave(AbstractSequentialFile file) voidsetAccessMode(int value) voidsetDuplicatesInOrder(boolean duplicatesInOrder) Controls Sort of records with duplicate keys: Whether original order is maintained.voidsetEbcdicSort(boolean newValue) ===== WARNING ====>: Please note, DO NOT use when sorting Numeric VALUES In ASCII character '1' is before 'A', in EBCDIC it is the other way ('A' before '1') Setting EBCDIC Sort will convert all the values to EBCDIC before comparison (Hence lower performance).intsize()have we reached the end of the file ?voidsort()Sort data (See COBOL's SORT statement)Methods inherited from class com.softwaremining.wrappers.CBLBean
addCorrespondingValue, addCorrespondingValue, allocate, assignAddressTo, assignAddressTo, assignBean, assignBytesEncoded, assignCachedInitializationValue, assignCorrespondingValue, assignCorrespondingValue, assignDefaultValue, assignDependingField, assignEbcdicBytes, assignEbcdicJIT_PdSupportForSequentialFiles, assignEncodedValue, assignExemptFromMemRelease, assignExternal, assignHighValues, assignInternalVars, assignLowValues, assignRawEbcdicBytes, assignRecordSize, assignRedefines, assignRedefines, assignSessionId, assignStringFormatted, assignSubstring, assignSubstring, assignToAddressOf, assignToAddressOf, assignToAddressOf, assignToAddressOf, assignToAllFields, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, assignValue, calculateStorageSize, containsPointers, equals, equals, equals, equals, equalsRightTrimmed, fieldsCount, fill, fill, fill, fill, fill, getValue, hasPackedDecimalFields, initDefaultValues, initialize, initialize, isExemptFromMemRelease, isFilled, isFilled, isFilled, isFilled, isGreaterThan, isGreaterThan, isGreaterThan, isHighValues, isInvolvedInDependency, isInvolvedInExternalDependency, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessOrEqualTo, isLessThan, isLessThan, isLessThan, isLessThan, isLessThan, isLowValues, isRedefinedByAnotherClass, isResourceAlreadyReleased, lengthOf, print, printFieldPosition, printFieldValues, printOrderedFieldPosition, releaseResources, releaseResources, resetCachedValues, resetCompressedFieldList, resetStorageManager, resetStructure, resize, retrieveActualLength, retrieveAsInt, retrieveAsString, retrieveCachedInitializationValue, retrieveCompressedFields, retrieveDependedFieldsList, retrieveEbcdicBytes, retrieveEbcdicValue, retrieveEncodedValue, retrieveField, retrieveField, retrieveFieldAtMemoryPosition, retrieveFieldFormatted, retrieveFields, retrieveIsTargetOfPointers, retrievePrimitiveFields, retrieveRawEbcdicBytes, retrieveRedefinesList, retrieveSessionId, retrieveSQLObject, retrieveStorageBytes, retrieveStorageCellSize, retrieveSubstring, retrieveSubstring, retrieveTopLevelField, retrieveValue, retrieveValue, setValue, stringValue, subtractCorrespondingValue, subtractCorrespondingValue, toString
-
Constructor Details
-
AbstractSortBean
public AbstractSortBean()for internal use only ... profiling information -
AbstractSortBean
-
-
Method Details
-
retrieveFirstLevelEntry
-
setAccessMode
public void setAccessMode(int value) -
setDuplicatesInOrder
public void setDuplicatesInOrder(boolean duplicatesInOrder) Controls Sort of records with duplicate keys: Whether original order is maintained. Defaults is to true- Parameters:
duplicatesInOrder-
-
addKeyAscending
-
addKeyAscending
-
addKeyDescending
-
addKeyAscending
-
addKeyDescending
-
addKeyDescending
-
setEbcdicSort
public void setEbcdicSort(boolean newValue) ===== WARNING ====>: Please note, DO NOT use when sorting Numeric VALUES In ASCII character '1' is before 'A', in EBCDIC it is the other way ('A' before '1') Setting EBCDIC Sort will convert all the values to EBCDIC before comparison (Hence lower performance).- Parameters:
newValue-
-
next
public void next() -
nextRecord
- Throws:
AtEndExceptionIOStatusException
-
isEof
have we reached the end of the file ?- Returns:
- Throws:
CBLException
-
size
public int size()have we reached the end of the file ?- Returns:
- Throws:
CBLException
-
release
public void release()The release statement transfers records from the INPUT PROCEDURE to the input Phase of the sort operation.
Internally, it will call the InsertRecord() method for performing the transfer. -
releaseRecord
public void releaseRecord()The release statement transfers records from the INPUT PROCEDURE to the input Phase of the sort operation.
Internally, it will call the InsertRecord() method for performing the transfer.
The "xxxRecord" is generated by the translator when it expect there may be an Exception. In this case, it doesn't apply. The method is here merely to provide consistency with Translator -
sort
public void sort()Sort data (See COBOL's SORT statement) -
merge
public void merge()Merge two or more files (See COBOL's MERGE statement) -
insert
public void insert()insert a record into the to-be-sorted-list -
assignStatus
-
assignStatusValue
public void assignStatusValue(int value) Used internally to set the IO operation status-values. Also if a FileStatus field is defined, the system will allocate correct values to it.- Parameters:
value- - .. one of ACMBasePersistent.STATUS_xxxx
-
assignStatusValue
Method for assigning a string to the status. Note that in MicroFOcus, the LOCK status is represented bt "9D", ie the 2nd value is a String- Parameters:
value-
-
retrieveStatusValue
public int retrieveStatusValue()Used internally to set the IO operation status-values. Also if a FileStatus field is defined, the system will allocate correct values to it.- Returns:
- - the status value .. one of ACMBasePersistent.STATUS_xxxx
-
retrieveSortResult
public int retrieveSortResult() -
retrieveStatusField
Used internally to set the IO operation status-values. -
assignSortModeSize
public void assignSortModeSize(int size) Deprecated.- not needed or supported -
loadForMerge
load a file for Merge operation- Parameters:
file-- Throws:
CBLException
-
load
load a file for Sort Operation- Parameters:
file-- Throws:
CBLException
-
save
- Throws:
CBLException
-