Package com.softwaremining.files
Class RelativeFile
java.lang.Object
com.softwaremining.wrappers.CBLBean
com.softwaremining.wrappers.AbstractBasePersistence
com.softwaremining.files.AbstractFile
com.softwaremining.files.RelativeFile
- All Implemented Interfaces:
IPersistence
,AbstractDataObject
,ICBLBeanNGroup
,ICBLContainer
,IFieldContainer
,ISMBean
,ISMDataType
-
Field Summary
FieldsFields inherited from class com.softwaremining.wrappers.AbstractBasePersistence
fileName, ownerClassName, status
Fields inherited from class com.softwaremining.wrappers.CBLBean
EBCDIC_JIT_PD_SUPPORT_FOR_SEQ_FILES, INDEX_FOR_NON_ARRAY_VERSION_OF_FIELD, INDEX_ZERO, tmp_lengthofAssignedValue, totalRuntime_allocate, totalRuntime_calcFieldOffsets, totalRuntime_getMemoryPosition, totalRuntime_setFieldFormatted
Fields inherited from interface com.softwaremining.sql.IPersistence
ACCESS_MODE_DYNAMIC, ACCESS_MODE_RANDOM, ACCESS_MODE_SEQUENTIAL, ASCENDING_RECORD_KEY, CONDITION_TYPE_EQUALS, CONDITION_TYPE_GREATER, CONDITION_TYPE_GREATER_OR_EQUALS, CONDITION_TYPE_IGNORE, CONDITION_TYPE_IGNORE_FOR_SQL_LIKE, CONDITION_TYPE_LESS, CONDITION_TYPE_LESS_OR_EQUALS, CONDITION_TYPE_LIKE, CONDITION_TYPE_NO_CONDITION, CONDITION_TYPE_NOT_ASSIGNED, DESCENDING_RECORD_KEY, OPEN_MODE_EXTEND, OPEN_MODE_I_O, OPEN_MODE_INPUT, OPEN_MODE_NOT_OPENED, OPEN_MODE_OUTPUT, STATUS_AT_END, STATUS_DUP_KEY, STATUS_FAILED_CLOSING, STATUS_INCORRECT_READ_OF_UNOPENED_FILE, STATUS_INCORRECT_RECORDSIZE_REWRITE, STATUS_INSERT_ERR_INAPPROPRIATE_FILE, STATUS_INSERT_ERR_INVALID_KEY, STATUS_LOCK, STATUS_NOT_FOUND, STATUS_REWRITE_WITHOUT_READ, STATUS_SM_FAIL_UNKOWN_REASON, STATUS_SM_NOT_ASSIGNED, STATUS_SUCCESS, UNCERTAIN_OF_RETURN_VALUE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
assignRecordsAreFixedLength
(boolean fixedLengthRecord) void
assignRelativeKey
(AbstractCBLNumeric relativeKey) int
clear()
int
close()
Close the fileint
when operation is Unsuccessful throw Exception (e.g KeyNotFountException).int
when operation is Unsuccessful throw Exception (e.g DuplicateKeyException).int
when operation is Unsuccessful throw Exception (e.g AtEndException).int
open
(int openMode) int
open
(int openMode, boolean prefixFileNameWithCallingProgram) int
when operation is Unsuccessful throw Exception (e.g AtEndException).int
Typically called repeatedly to read next record sequentially from a file.void
seek
(AbstractCBLNumeric relativeKey, int conditionType) void
seekRecord
(AbstractCBLNumeric relativeKey, int conditionType) void
setRelativeKey
(AbstractCBLNumeric relativeKey) Deprecated.- use assignRelativeKeyint
when operation is Unsuccessful throw Exception (e.g DuplicateKeyException).Methods inherited from class com.softwaremining.files.AbstractFile
resetDataDirectory, retrieveDataDirectory, retrieveFullFileName, retrieveOpenMode
Methods inherited from class com.softwaremining.wrappers.AbstractBasePersistence
assignAccessMode, assignFileName, assignLock, assignStatus, assignStatus, assignStatusAsPrimitive, assignStatusValue, assignStatusValue, assignTableName, delete, insert, next, prev, read, readRow, retrieveAccessMode, retrieveFileName, retrieveFileName, retrieveFirstLevelEntry, retrieveSessionId, retrieveStatusField, retrieveStatusValue, update
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, 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, printFieldPosition, printFieldValues, printOrderedFieldPosition, PrintOrderedFieldPositionsAndValue, releaseResources, releaseResources, resetCachedValues, resetCompressedFieldList, resetStructure, resize, retrieveActualLength, retrieveAsInt, retrieveAsString, retrieveCachedInitializationValue, retrieveCompressedFields, retrieveDependedFieldsList, retrieveEbcdicBytes, retrieveEbcdicValue, retrieveEncodedValue, retrieveField, retrieveField, retrieveFieldAtMemoryPosition, retrieveFieldFormatted, retrieveFields, retrieveIsTargetOfPointers, retrievePrimitiveFields, retrieveRawEbcdicBytes, retrieveSQLObject, retrieveStorageCellSize, retrieveStorageChars, retrieveSubstring, retrieveSubstring, retrieveTopLevelField, retrieveValue, retrieveValue, setValue, stringValue, subtractCorrespondingValue, subtractCorrespondingValue, toString
-
Field Details
-
totalRuntime_relative
public static long totalRuntime_relativefor internal use only ... profiling information
-
-
Constructor Details
-
RelativeFile
public RelativeFile() -
RelativeFile
-
-
Method Details
-
setRelativeKey
Deprecated.- use assignRelativeKey- Parameters:
relativeKey
-
-
assignRelativeKey
-
open
- Specified by:
open
in classAbstractBasePersistence
- Throws:
IOCriticalException
-
open
- Throws:
IOCriticalException
-
close
Description copied from class:AbstractBasePersistence
Close the file- Specified by:
close
in classAbstractBasePersistence
- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
- Throws:
IOCriticalException
-
seek
- Throws:
IOStatusException
-
seekRecord
- Throws:
IOStatusException
-
nextRecord
Description copied from class:AbstractBasePersistence
when operation is Unsuccessful throw Exception (e.g AtEndException). See com.softwaremining.wrappers.exceptions- Specified by:
nextRecord
in classAbstractBasePersistence
- Returns:
- Throws:
IOStatusException
-
prevRecord
Description copied from class:AbstractBasePersistence
when operation is Unsuccessful throw Exception (e.g AtEndException). See com.softwaremining.wrappers.exceptions- Specified by:
prevRecord
in classAbstractBasePersistence
- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
- Throws:
IOStatusException
-
readRecord
Description copied from class:AbstractBasePersistence
Typically called repeatedly to read next record sequentially from a file. Otherwise, it performs a SEEK on the current RecordKey - and then reads the file. when operation is Unsuccessful throw Exception (e.g AtEndException). See com.softwaremining.wrappers.exceptions- Specified by:
readRecord
in classAbstractBasePersistence
- Returns:
- Throws:
IOStatusException
-
updateRecord
Description copied from class:AbstractBasePersistence
when operation is Unsuccessful throw Exception (e.g DuplicateKeyException). See com.softwaremining.wrappers.exceptions- Specified by:
updateRecord
in classAbstractBasePersistence
- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
- Throws:
IOStatusException
-
insertRecord
Description copied from class:AbstractBasePersistence
when operation is Unsuccessful throw Exception (e.g DuplicateKeyException). See com.softwaremining.wrappers.exceptions- Specified by:
insertRecord
in classAbstractBasePersistence
- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
- Throws:
IOStatusException
-
deleteRecord
Description copied from class:AbstractBasePersistence
when operation is Unsuccessful throw Exception (e.g KeyNotFountException). See com.softwaremining.wrappers.exceptions- Specified by:
deleteRecord
in classAbstractBasePersistence
- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
- Throws:
IOStatusException
-
clear
- Specified by:
clear
in classAbstractBasePersistence
- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
- Throws:
IOCriticalException
-
assignRecordsAreFixedLength
public final void assignRecordsAreFixedLength(boolean fixedLengthRecord)
-