Package com.softwaremining.files
Class QSAMFile
- All Implemented Interfaces:
IPersistence,AbstractDataObject,ICBLBeanNGroup,ICBLContainer,IFieldContainer,ISMBean,ISMDataType
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.softwaremining.files.SequentialFile
log, randomAccessFileFields inherited from class com.softwaremining.files.AbstractSequentialFile
_recordSize, ADVANCE_NOT_INITIALIZED, advanceContinuation, advanceSize, advanceType, CRLFcharCount, currentRecordNumber, EJECT, FIRST_LINE_POS, firstLineTerminators, firstRead, fixedLenghtRecordsEndWithNewLine, fixedLengthRecord, justRead, LINE, lineCounter, numberOfInitialRecords, PAGE, rdw_format, RDW_LENGTH, rdw_Null, recordDependingField, targetIsPrinter, TOP_OF_PAGE, totalRuntime, useRDWFields inherited from class com.softwaremining.files.AbstractFile
openModeFields inherited from class com.softwaremining.wrappers.AbstractBasePersistence
fileName, ownerClassName, statusFields 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_setFieldFormattedFields 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_CLOSE_FILE_FILE_NOT_OPEN, 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_OPEN_FILE_FILE_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 TypeMethodDescriptionintdeletes the entire fileintInsert (write) the current data into file.intread the next record from file.intprev()intScroll back to previous record When end (or beginning) of file is reached, it throws AtEndExceptionvoidsetBlockSize(int blockSize, int blockSizeDimention) voidsetRecordFormat(int recordFormat) intUpdate the current record with the current record structure.Methods inherited from class com.softwaremining.files.SequentialFile
_insertRecord, clear, close, fileLength, insertNewLine, isFileOpened, nextWithException_UseExactRecordLenght, nextWithException_UseLineBreaks, open, open, prevWithExceptionMethods inherited from class com.softwaremining.files.AbstractSequentialFile
advance, advance, advance, assignDependingField, assignEncodedBytes, assignFileName, assignFixedLenghtRecordsEndWithNewLine, assignRecordsAreFixedLength, assignRecordSize, assignTargetIsPrinter, assignUsesRDW, closeReel, exists, getCRLFcharCount, getRecordSize, insert, insertRecord, isFixedLenghtRecordsEndWithNewLine, isRDW, println, read, readRecord, retrieveCurrentRecordNumber, retrieveEncodedBytesForWrite, retrieveFieldLineCounter, retrieveFieldPageCounter, retrieveLineCounter, retrieveNumberOfInitialRecords, retrievePageCounter, retrieveRecordDependingField, setCRLFcharCountMethods inherited from class com.softwaremining.files.AbstractFile
assignOptional, resetDataDirectory, retrieveDataDirectory, retrieveFullFileName, retrieveOpenModeMethods inherited from class com.softwaremining.wrappers.AbstractBasePersistence
assignAccessMode, assignLock, assignStatus, assignStatus, assignStatusAsPrimitive, assignStatusValue, assignStatusValue, assignTableName, delete, insert, next, readRow, retrieveAccessMode, retrieveFileName, retrieveFileName, retrieveFirstLevelEntry, retrieveSessionId, retrieveStatusField, retrieveStatusValue, updateMethods inherited from class com.softwaremining.wrappers.CBLBean
addCorrespondingValue, addCorrespondingValue, allocate, assignAddressTo, assignAddressTo, assignBean, assignBytesEncoded, assignCachedInitializationValue, assignCorrespondingValue, assignCorrespondingValue, assignDefaultValue, assignEbcdicBytes, assignEbcdicJIT_PdSupportForSequentialFiles, assignEncodedValue, assignExemptFromMemRelease, assignExternal, assignHighValues, assignInternalVars, assignLowValues, assignRawEbcdicBytes, 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, retrieveSQLObject, retrieveStorageBytes, retrieveStorageCellSize, retrieveSubstring, retrieveSubstring, retrieveTopLevelField, retrieveValue, retrieveValue, setValue, stringValue, subtractCorrespondingValue, subtractCorrespondingValue, toString
-
Field Details
-
RECORD_FORMAT_FIXED_LENGTH
public static final int RECORD_FORMAT_FIXED_LENGTH- See Also:
-
RECORD_FORMAT_VARIABLE_LENGTH
public static final int RECORD_FORMAT_VARIABLE_LENGTH- See Also:
-
RECORD_FORMAT_SPANNED
public static final int RECORD_FORMAT_SPANNED- See Also:
-
RECORD_FORMAT_UNDEFINED
public static final int RECORD_FORMAT_UNDEFINED- See Also:
-
BLOCK_SIZE_DIMENTION_IN_RECORDS
public static final int BLOCK_SIZE_DIMENTION_IN_RECORDS- See Also:
-
BLOCK_SIZE_DIMENTION_IN_BYTES
public static final int BLOCK_SIZE_DIMENTION_IN_BYTES- See Also:
-
-
Constructor Details
-
QSAMFile
protected QSAMFile() -
QSAMFile
-
-
Method Details
-
setRecordFormat
public void setRecordFormat(int recordFormat) -
setBlockSize
public void setBlockSize(int blockSize, int blockSizeDimention) -
nextRecord
Description copied from class:AbstractSequentialFileread the next record from file. At end thow an exception- Overrides:
nextRecordin classAbstractSequentialFile- Returns:
- Throws:
IOCriticalExceptionAtEndException
-
updateRecord
Description copied from class:SequentialFileUpdate the current record with the current record structure. If at end of file is reached, it throws an exception- Overrides:
updateRecordin classSequentialFile- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
- Throws:
IOCriticalException
-
insertRecord
Description copied from class:AbstractSequentialFileInsert (write) the current data into file.- Overrides:
insertRecordin classAbstractSequentialFile- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
- Throws:
IOCriticalException
-
prev
public int prev()- Overrides:
previn classAbstractBasePersistence
-
prevRecord
Description copied from class:AbstractSequentialFileScroll back to previous record When end (or beginning) of file is reached, it throws AtEndException- Overrides:
prevRecordin classAbstractSequentialFile- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
- Throws:
IOCriticalExceptionAtEndException
-
deleteRecord
Description copied from class:AbstractSequentialFiledeletes the entire file- Overrides:
deleteRecordin classAbstractSequentialFile- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
- Throws:
IOStatusException
-