Package com.softwaremining.cics
Class CicsIndexedFile
java.lang.Object
com.softwaremining.wrappers.CBLBean
com.softwaremining.wrappers.AbstractBasePersistence
com.softwaremining.files.IndexedFileSingleProcess
com.softwaremining.cics.CicsIndexedFile
- All Implemented Interfaces:
IPersistence,ISQLWrapper,AbstractDataObject,ICBLBeanNGroup,ICBLContainer,IFieldContainer,ISMBean,ISMDataType
This class is the super class of data-items accessed by CICS IO operations.
e.g. CICS READ , WRITE, DELETE, REWRITE
Whist CicsPersistance class reads/writes from an SQL Database, this class reads/writes from a file on file-system This class is designed to be access by a single program/thread at a time. No transaction management capability is built it.
Whist CicsPersistance class reads/writes from an SQL Database, this class reads/writes from a file on file-system This class is designed to be access by a single program/thread at a time. No transaction management capability is built it.
-
Field Summary
FieldsFields inherited from class com.softwaremining.files.IndexedFileSingleProcess
_CurrentIndexFields 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 TypeMethodDescriptionprotected static void_assignKeyValue(CicsIndexedFile me, String value) voidassignAdditionalSQLConditions(String condition) This method allows inserting additional conditions - e.g.voidassignAdditionalSQLConditions(StringBuilder condition) This method allows inserting additional conditions - e.g.voidThis method allows appending to current SQL Conditions without overwriting previous conditionsvoidassignAdditionalSQLOrderBy(String newValue) This method allows inserting additional Ordering clauses It is useful in hierarchical tables will define additional SQLConditions - e.g.voidassignCachedSeekValues(List objects) voidassignChangeGEConditonToLIKE(boolean newValue) The system can replace GE searches to LIKE statements.voidassignChangeGTEQ2EQForLIKECondition(boolean useEQForExactLenghtMatch) Only applies when OR_CHANGE_GE_CONDITION_TO_LIKE__DEFAULT=true
E.g.voidassignConnection(Connection connection) voidassignDbDecorator(ACMDbDecorator dbDecorator) voidassignDelegateDAO(CicsIndexedFile delegateDAO) Indexed files with totally different formats will sometimes still need to go to same database table.voidassignDelegateDAO(ISQLWrapper delegateDAO) voidassignExpandGTEQSearches(boolean expandGTEQSearches) (default is true) Example: Lets say there are 3 key fields involved in a search with condition GTEQ
If flag is set to true (default) - then the following SQL condition will be generated
(A > ? or (A = ? and B > ?) or (A = ? and B = ? and C >= ?))
With flag is set to FALSE - the following will be generated
(A >= ?) and (B >= ?) and (C >= ?)voidassignFetchDirectionIsForward(Boolean direction) voidassignFileName(String fileName) In Sequential File Processing - it overwrites the default name of an input/output file automatically assigned by the system.voidassignFileOpened(boolean fileOpened) voidassignFileOpened(int openMode) voidassignGDGCondition(String gdgCondition) Additional SQL statement to be read from gdg.properties file.voidassignGDGProperty(String gdgProperty) Additional SQL statement to be read from gdg.properties file.voidassignGenerate_OrderBy_ForReadStatements(boolean enabled) READ() statement on DB tables with MANY rows, issues an ORDER BY on the SELECT which may have a big performance impact.voidassignGenericRecordKeyLength(int genericKeyLength) voidassignIgnoreOriginalKeys(boolean newValue) for internal usevoidassignIncludeRedefinedFieldsInCRUD(boolean includeRedefinedFieldsInCRUD) voidassignKeyIsUnique(boolean keyUnique) voidassignKeyValue(AbstractDataObject keyValueField) updates the value of Record-Keys defined for this class with every read.voidassignLastSeekCondition(int lastSeekCondition) voidassignLastSeekConditionLookedForEquality(boolean newValue) voidassignLock(boolean newLocValue) Blank method - no functionality is currently deemed to be requiredvoidassignLowerLimitForExpandGTEQSearches(int range) (default is -1 - disabled) Only works when assignExpandGTEQSearches(true);
Example: Lets say there are 3 key fields involved in a search with condition GTEQ
In default settings, the following SQL condition will be generatedvoidassignOpenMode(int openMode) voidassignRecordKey(ISMObject _recordKey) Used only used by CicsPersistent Subclasses.voidassignRecordKey(ISMObject[] recordKeys) Used only used by CicsPersistent Subclasses.voidassignRecordKeyLength(int keyLength) Deprecated.voidassignRecordKeyValue(String newValue) protected voidassignResponseCode(int value) Used internally to set the IO operation status-values.voidassignResponseCodeField(ISMObject status) voidassignResultSet(ResultSet resultSet) voidassignResultSetFetchSize(int resultSetFetchSize) voidassignRowFacade(RowFacade rowFacade) voidassignSequentialKeyGeneration(boolean sequentialKeyGeneration) voidassignSQLConditions(String condition)
Ignore the inbuilt KEY (defined by assignRecordKey(...)) - and use this condition instead
Please note program will be responsible for passing additional parameters.voidassignStatus(ISMObject status) set the status objectvoidassignSuppressSeek(boolean newValue) for internal use only - For VSAM SEEK / READ / ...voidassignTempStorage(ISMObject object) Deprecated.voidassignThrowInvalidKeyException(boolean newValue) for internal use only - For VSAM SEEK / READ / ...voidassignTopRowSelectStrategyCount(int count) (Default = -1) When set to 0 or 1 , the Object-Relation SQL Generator will produce:voidassignTopRowSelectStrategyRange(int startRowNumber, int count) Similar to assignTopRowSelectStrategyCount - but aslso defines starting pointsvoidassignTreatAsSQLWrapper(boolean treatAsSQLWrapper) Used only used by CicsPersistent Subclasses.voidassignUpperLimitForExpandGTEQSearches(int range) (default is -1 - disabled) Only works when assignExpandGTEQSearches(true);
Example: Lets say there are 3 key fields involved in a search with condition GTEQ
In default settings, the following SQL condition will be generatedvoidvoidDelete all records .intclose()Closes the file and writes all the indexed records to the specified file if open mode allows writing.intdelete()equivalent of COBOL delete (for VSAM).intsimilar to clear().intintUsed internally to set the IO operation status-values.intinsert()Insert a record - populate the values from the existing fieldsintsimilar to insert().booleaninternal use only.booleanThe system can replace GE searches to LIKE statements.booleanFor internal Use only.booleanbooleanbooleanbooleanbooleanisKept()booleanbooleanbooleanused in AS400 / DB400 to increase speed of searchesbooleanfor internal use only - For VSAM SEEK / READ / ...booleanbooleanintReads the next record into memory.intReads the prev record into memory.protected intconstructorprotected intprocessException(CBLException e, boolean invokeHandler) Set appropriate responseCodes, and invoke the conditionHandlerprotected intprocessException(CBLException e, boolean invokeHandler, int overridingResponseCode) Set appropriate responseCodes, and invoke the conditionHandlerintread()Translation of CICS READ Read is usually used to read random organized data.intto be removed - CICS subsystem does not call this - see 0011729 similar to readNext().voidreduceGEorEQ(boolean newValue) used in AS400 / DB400 to increase speed of searchesvoidreleaseResources(boolean forceRelease) For internal use only - memory management stuffvoidAfter setting a GENERIC-KEY, the original Non-generic-Key has to be restored.intintassignSQLCondition can also have conditions such as "NAME = ?".booleanfor internal usefor internal use onlybooleanintused internally by softwareMiningintUsed only used by CicsPersistent Subclasses.intbooleanfor internal use only - For VSAM SEEK / READ / ...intFor internal use only (Default = -1) When set to 0 or 1 , the Object-Relation SQL Generator will produce:intfor internal use onlyintseek()Translation of CICS STARTBR Opens a data-set/resultset matching the keys.intinttranslation of CICS STARTBRintseekRecord(ISMObject[] keys, int conditionType) intseekRecord(ISMObject key, int conditionType) Implements the COBOL START command related to IndexedFileSingleProcess.protected voidsetEibFunction(String value) Used internally to set the IO operation status-values.voidsetLock(boolean newValue) protected voidsetResponseCode2(int responseCode2) Used internally to set the IO operation status-values.voidsetStorageLength(int newLength) to do ...voidunlock()intupdate()Update the current record with the current record structure.intsimilar to update().booleanintvalidateConditionType(ISMObject key, int conditionType) for internal use onlyMethods inherited from class com.softwaremining.files.IndexedFileSingleProcess
assignAlternateKey, assignAlternateKey, assignDelegateDAO, assignOptimiseForDeleteOperation, assignOptional, assignRecordKey, assignRecordKey, assignRecordsAreFixedLength, assignSQLTableName, assignUseRecSeqDataFiles, clear, deleteFile, dispose, dispose, flush, GenerateGUID, getDataDirectory, getFullFileName, getRecordKey, IsFileopen, isInsertSingleRecordMode, isUseRecSeqDataFiles, open, openCics, resetseek, retrieveRecordKey, seek, seekRecord, setAlternateKey, setAlternateKeyMethods inherited from class com.softwaremining.wrappers.AbstractBasePersistence
assignAccessMode, assignStatus, assignStatusAsPrimitive, assignStatusValue, assignStatusValue, assignTableName, next, prev, readRow, retrieveAccessMode, retrieveFileName, retrieveFileName, retrieveFirstLevelEntry, retrieveSessionId, retrieveStatusField, retrieveStatusValueMethods 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, 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.softwaremining.wrappers.ISMBean
assignExemptFromMemRelease, assignSessionId, assignValue, initialize, isExemptFromMemRelease, isResourceAlreadyReleased, resetStructure, retrieveActualLength, retrieveAsString, retrieveField, retrieveField, retrieveTopLevelField, retrieveValue, stringValueMethods inherited from interface com.softwaremining.sql.ISQLWrapper
assignAccessMode, assignSQLTableName, assignStatusValue, assignTableName, next, prev, retrieveAccessMode, retrieveFileName, retrieveRecordKey, retrieveSessionId, retrieveStatusValue
-
Field Details
-
delegateDAO
-
nativeKeys
-
-
Constructor Details
-
CicsIndexedFile
-
-
Method Details
-
getOwningCicsService
-
retrieveThrowInvalidKeyException
public boolean retrieveThrowInvalidKeyException()Description copied from interface:ISQLWrapperfor internal use only - For VSAM SEEK / READ / ... VSAM apps need to throw InvalidKeyException (even if they use CICS delegates), but CICS applications need to throw KeyNotFoundException ,- Specified by:
retrieveThrowInvalidKeyExceptionin interfaceISQLWrapper- Returns:
-
assignThrowInvalidKeyException
public void assignThrowInvalidKeyException(boolean newValue) Description copied from interface:ISQLWrapperfor internal use only - For VSAM SEEK / READ / ... VSAM apps need to throw InvalidKeyException (even if they use CICS delegates), but CICS applications need to throw KeyNotFoundException ,- Specified by:
assignThrowInvalidKeyExceptionin interfaceISQLWrapper
-
assignFileOpened
public void assignFileOpened(int openMode) -
assignDelegateDAO
Indexed files with totally different formats will sometimes still need to go to same database table. Assigning a DelegateDAO causes the delegate class to be used for access to the SQLDatabase. The values are then transfered between "this" class and delegateDAO- Parameters:
delegateDAO-
-
processException
constructor- Parameters:
owner-eibaid- / public CicsPersistence(CicsBaseService owner ,Eibaid eibaid) { super(owner); this.eibaid = eibaid; this.owningCicsService = owner; }
-
processException
Set appropriate responseCodes, and invoke the conditionHandler- Parameters:
e-- Returns:
-
processException
Set appropriate responseCodes, and invoke the conditionHandler- Parameters:
e-- Returns:
-
assignResponseCode
protected void assignResponseCode(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 ..
-
assignResponseCodeField
-
setResponseCode2
protected void setResponseCode2(int responseCode2) Used internally to set the IO operation status-values.- Parameters:
value- - .. one of ..
-
setEibFunction
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 ..
-
getResponseCode
public int getResponseCode()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
-
getResponse2Code
public int getResponse2Code() -
_assignKeyValue
-
assignKeyValue
updates the value of Record-Keys defined for this class with every read.- Specified by:
assignKeyValuein interfaceISQLWrapper
-
retrieveRecordKeyValue
Used only used by CicsPersistent Subclasses.- Specified by:
retrieveRecordKeyValuein interfaceISQLWrapper- Parameters:
value-
-
assignFileName
In Sequential File Processing - it overwrites the default name of an input/output file automatically assigned by the system.- Overrides:
assignFileNamein classAbstractBasePersistence- Parameters:
fileName-
-
seek
public int seek()Translation of CICS STARTBR Opens a data-set/resultset matching the keys. But does not read it.- Returns:
-
seekRecord
translation of CICS STARTBR- Returns:
- Throws:
IOStatusException
-
seek
-
seekRecord
Description copied from class:IndexedFileSingleProcessImplements the COBOL START command related to IndexedFileSingleProcess.- Specified by:
seekRecordin interfaceISQLWrapper- Overrides:
seekRecordin classIndexedFileSingleProcess- Parameters:
key- -conditionType- -
-
read
public int read()Translation of CICS READ Read is usually used to read random organized data. The softwareMining version will issue an SQL statement to read find and read the first record whose value matches the record-Keys- Specified by:
readin interfaceISQLWrapper- Overrides:
readin classAbstractBasePersistence- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
-
insert
public int insert()Description copied from class:AbstractBasePersistenceInsert a record - populate the values from the existing fields- Specified by:
insertin interfaceISQLWrapper- Overrides:
insertin classAbstractBasePersistence
-
update
public int update()Description copied from class:AbstractBasePersistenceUpdate the current record with the current record structure. If at end of file is reached, it does not throw an exception- Specified by:
updatein interfaceISQLWrapper- Overrides:
updatein classAbstractBasePersistence
-
delete
public int delete()Description copied from class:AbstractBasePersistenceequivalent of COBOL delete (for VSAM).- Specified by:
deletein interfaceISQLWrapper- Overrides:
deletein classAbstractBasePersistence
-
insertRecord
similar to insert(). But to be used when no RESPONSE CODE field is utilised. On any problems - it invokes the pre-defined condition handlers- Overrides:
insertRecordin classIndexedFileSingleProcess- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
- Throws:
IOStatusException
-
readRecord
to be removed - CICS subsystem does not call this - see 0011729 similar to readNext(). But to be used when no RESPONSE CODE field is utilised. On any problems - it invokes the pre-defined condition handlers- Overrides:
readRecordin classIndexedFileSingleProcess- Returns:
- true on success otherwise, false
- Throws:
IOStatusException
-
updateRecord
similar to update(). But to be used when no RESPONSE CODE field is utilised. On any problems - it invokes the pre-defined condition handlers- Overrides:
updateRecordin classIndexedFileSingleProcess- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
- Throws:
IOStatusException
-
deleteRecord
similar to clear(). But to be used when no RESPONSE CODE field is utilised. On any problems - it invokes the pre-defined condition handlers- Overrides:
deleteRecordin classIndexedFileSingleProcess- Returns:
- true on success otherwise, false
- Throws:
IOStatusException
-
clearRecord
Delete all records . But to be used when no RESPONSE CODE field is utilised. On any problems - it invokes the pre-defined condition handlers- Throws:
IOStatusException
-
nextRecord
Description copied from class:IndexedFileSingleProcessReads the next record into memory. If the file access mode is SEQUENTIAL or DYNAMIC then records are navigated sequentially. Otherwise the records that have an index greater than or equal to the keyValue value are filtered and each record is Read into memory on each call.- Overrides:
nextRecordin classIndexedFileSingleProcess- Returns:
- true on success otherwise, false
- Throws:
IOStatusException
-
prevRecord
public int prevRecord()Description copied from class:IndexedFileSingleProcessReads the prev record into memory. If the file access mode is SEQUENTIAL or DYNAMIC then records are navigated sequentially. Otherwise the records that have an index less than or equal to the keyValue value are filtered and each record is Read into memory on each call.- Overrides:
prevRecordin classIndexedFileSingleProcess- Returns:
- true on success otherwise, false
-
close
public int close()Description copied from class:IndexedFileSingleProcessCloses the file and writes all the indexed records to the specified file if open mode allows writing.- Specified by:
closein interfaceISQLWrapper- Overrides:
closein classIndexedFileSingleProcess- Returns:
- 0 on success
-
setStorageLength
public void setStorageLength(int newLength) to do ... not implemented- Parameters:
newLength-
-
retrieveNativeKeys
used internally by softwareMining- Specified by:
retrieveNativeKeysin interfaceISQLWrapper
-
assignRecordKey
Description copied from interface:ISQLWrapperUsed only used by CicsPersistent Subclasses.- Specified by:
assignRecordKeyin interfaceISQLWrapper
-
assignRecordKeyValue
-
restoreNonGenericKey
public void restoreNonGenericKey()After setting a GENERIC-KEY, the original Non-generic-Key has to be restored. This method does that. -
assignGenericRecordKeyLength
public void assignGenericRecordKeyLength(int genericKeyLength) -
assignLock
public void assignLock(boolean newLocValue) Blank method - no functionality is currently deemed to be required- Overrides:
assignLockin classIndexedFileSingleProcess- Parameters:
newLocValue-
-
validateConditionType
for internal use only- Specified by:
validateConditionTypein interfaceISQLWrapper- Returns:
-
assignRecordKeyLength
Deprecated.not used / not necessary here
In CICS: If a specified KEYLENGTH value differs from the length that is defined for the underlying file and the operation is NOT generic , the INVREQ condition occurs.
Currently in SM Framework, keyLenght are ignored if operation is NOT generic. -
assignTempStorage
Deprecated.The following method is the translation of cics read "SET" ...
THE METHOD IS NOT USED - has no impact. the system uses other heuristics to achieve same results. but the API is generated for safety (SoftwareMining may add functionality at a later stage).- Parameters:
object-
-
releaseResources
public void releaseResources(boolean forceRelease) Description copied from interface:ISMBeanFor internal use only - memory management stuff- Specified by:
releaseResourcesin interfaceISMBean- Overrides:
releaseResourcesin classCBLBean
-
assignConnection
- Specified by:
assignConnectionin interfaceISQLWrapper
-
retrieveResultSetFetchSize
public int retrieveResultSetFetchSize()- Specified by:
retrieveResultSetFetchSizein interfaceISQLWrapper
-
assignResultSetFetchSize
public void assignResultSetFetchSize(int resultSetFetchSize) - Specified by:
assignResultSetFetchSizein interfaceISQLWrapper
-
isFileOpened
public boolean isFileOpened()- Specified by:
isFileOpenedin interfaceISQLWrapper
-
assignFileOpened
public void assignFileOpened(boolean fileOpened) - Specified by:
assignFileOpenedin interfaceISQLWrapper
-
assignStatus
Description copied from class:AbstractBasePersistenceset the status object- Specified by:
assignStatusin interfaceISQLWrapper- Overrides:
assignStatusin classAbstractBasePersistence
-
retrieveRowFacade
- Specified by:
retrieveRowFacadein interfaceISQLWrapper
-
assignRowFacade
- Specified by:
assignRowFacadein interfaceISQLWrapper
-
retrieveDbDecorator
- Specified by:
retrieveDbDecoratorin interfaceISQLWrapper
-
assignDbDecorator
- Specified by:
assignDbDecoratorin interfaceISQLWrapper
-
retrieveLastSeekCondition
public int retrieveLastSeekCondition()- Specified by:
retrieveLastSeekConditionin interfaceISQLWrapper
-
assignLastSeekCondition
public void assignLastSeekCondition(int lastSeekCondition) - Specified by:
assignLastSeekConditionin interfaceISQLWrapper
-
assignOpenMode
public void assignOpenMode(int openMode) - Specified by:
assignOpenModein interfaceISQLWrapper
-
retrieveOpenMode
public int retrieveOpenMode()- Specified by:
retrieveOpenModein interfaceISQLWrapper- Overrides:
retrieveOpenModein classIndexedFileSingleProcess
-
isSequentialKeyGeneration
public boolean isSequentialKeyGeneration()- Specified by:
isSequentialKeyGenerationin interfaceISQLWrapper
-
assignSequentialKeyGeneration
public void assignSequentialKeyGeneration(boolean sequentialKeyGeneration) - Specified by:
assignSequentialKeyGenerationin interfaceISQLWrapper
-
assignLastSeekConditionLookedForEquality
public void assignLastSeekConditionLookedForEquality(boolean newValue) - Specified by:
assignLastSeekConditionLookedForEqualityin interfaceISQLWrapper
-
isLastSeekConditionLookedForEquality
public boolean isLastSeekConditionLookedForEquality()- Specified by:
isLastSeekConditionLookedForEqualityin interfaceISQLWrapper
-
isKeyUnique
public boolean isKeyUnique()- Specified by:
isKeyUniquein interfaceISQLWrapper
-
assignKeyIsUnique
public void assignKeyIsUnique(boolean keyUnique) - Specified by:
assignKeyIsUniquein interfaceISQLWrapper
-
isSuppressNextReadCurrent
public boolean isSuppressNextReadCurrent()- Specified by:
isSuppressNextReadCurrentin interfaceISQLWrapper
-
reduceGEorEQ
public void reduceGEorEQ(boolean newValue) Description copied from interface:ISQLWrapperused in AS400 / DB400 to increase speed of searches- Specified by:
reduceGEorEQin interfaceISQLWrapper
-
isReduceGEorEQ
public boolean isReduceGEorEQ()Description copied from interface:ISQLWrapperused in AS400 / DB400 to increase speed of searches- Specified by:
isReduceGEorEQin interfaceISQLWrapper
-
isAllowedToExpandGTEQSearches
public boolean isAllowedToExpandGTEQSearches()Description copied from interface:ISQLWrapperinternal use only. Example: Lets say there are 3 key fields involved in a search with condition GTEQ
If flag is set to true (default) - then the following SQL condition will be generated
(A > ? or (A = ? and B > ?) or (A = ? and B = ? and C >= ?))
With flag is set to FALSE - the following will be generated
(A >= ?) and (B >= ?) and (C >= ?)- Specified by:
isAllowedToExpandGTEQSearchesin interfaceISQLWrapper
-
assignExpandGTEQSearches
public void assignExpandGTEQSearches(boolean expandGTEQSearches) Description copied from interface:ISQLWrapper(default is true) Example: Lets say there are 3 key fields involved in a search with condition GTEQ
If flag is set to true (default) - then the following SQL condition will be generated
(A > ? or (A = ? and B > ?) or (A = ? and B = ? and C >= ?))
With flag is set to FALSE - the following will be generated
(A >= ?) and (B >= ?) and (C >= ?)- Specified by:
assignExpandGTEQSearchesin interfaceISQLWrapper
-
assignLowerLimitForExpandGTEQSearches
public void assignLowerLimitForExpandGTEQSearches(int range) Description copied from interface:ISQLWrapper(default is -1 - disabled) Only works when assignExpandGTEQSearches(true);
Example: Lets say there are 3 key fields involved in a search with condition GTEQ
In default settings, the following SQL condition will be generatedSELECT ... FROM ... WHERE (A > ?) or (A = ? and B > ?) or (A = ? and B = ? and C >= ?))
using the statement assignLowerLimitForExpandGTEQSearches( 3 ) - the key conditions below position 3 are ignored, and only the following is generated.SELECT ... FROM ... WHERE (A = ? and B = ? and C >= ?))
and the following proceeding conditions are ignored <> (A > ?)
or (A = ? and B > ?)- Specified by:
assignLowerLimitForExpandGTEQSearchesin interfaceISQLWrapper
-
retreiveLowerLimitForExpandGTEQSearches
public int retreiveLowerLimitForExpandGTEQSearches()- Specified by:
retreiveLowerLimitForExpandGTEQSearchesin interfaceISQLWrapper
-
assignUpperLimitForExpandGTEQSearches
public void assignUpperLimitForExpandGTEQSearches(int range) Description copied from interface:ISQLWrapper(default is -1 - disabled) Only works when assignExpandGTEQSearches(true);
Example: Lets say there are 3 key fields involved in a search with condition GTEQ
In default settings, the following SQL condition will be generatedSELECT ... FROM ... WHERE (A > ?) or (A = ? and B > ?) or (A = ? and B = ? and C >= ?))
but if assignUpperLimitForExpandGTEQSearches( 1 ) - only conditions up to 1st Key will be generated
ie The following will be generatedSELECT ... FROM ... WHERE (A > ?)
and the following conditions will NOT be generated (A = ? and B > ?) or (A = ? and B = ? and C >= ?))- Specified by:
assignUpperLimitForExpandGTEQSearchesin interfaceISQLWrapper
-
retreiveUpperLimitForExpandGTEQSearches
public int retreiveUpperLimitForExpandGTEQSearches()- Specified by:
retreiveUpperLimitForExpandGTEQSearchesin interfaceISQLWrapper
-
isChangeGEConditonToLIKE
public boolean isChangeGEConditonToLIKE()Description copied from interface:ISQLWrapperThe system can replace GE searches to LIKE statements. this can potentially have a huge performance improvement.
E.g. Consider generating SELECT ... from TABLE WHERE KEY_1 >= ? AND KEY_2 >= ?.
If each key is 5 chars, and the supplied values are "A " and "B " - the above translates to:SELECT ... from TABLE WHERE KEY_1 >= 'A ' AND KEY_2 >= 'B '.
Converting it to LIKE will becomeSELECT ... from TABLE WHERE KEY_1 LIKE 'A%' AND KEY_2 LIKE 'B%'
This makes a significant performance improvements.- Specified by:
isChangeGEConditonToLIKEin interfaceISQLWrapper
-
assignChangeGEConditonToLIKE
public void assignChangeGEConditonToLIKE(boolean newValue) Description copied from interface:ISQLWrapperThe system can replace GE searches to LIKE statements. this can potentially have a huge performance improvement.
E.g. Consider generating SELECT ... from TABLE WHERE KEY_1 >= ? AND KEY_2 >= ?.
If each key is 5 chars, and the supplied values are "A " and "B " - the above translates to:SELECT ... from TABLE WHERE KEY_1 >= 'A ' AND KEY_2 >= 'B '.
Converting it to LIKE will becomeSELECT ... from TABLE WHERE KEY_1 LIKE 'A%' AND KEY_2 LIKE 'B%'
This makes a significant performance improvements.- Specified by:
assignChangeGEConditonToLIKEin interfaceISQLWrapper
-
isChangeGTEQ2EQForLIKECondition
public boolean isChangeGTEQ2EQForLIKECondition()Description copied from interface:ISQLWrapperFor internal Use only.
Only applies when OR_CHANGE_GE_CONDITION_TO_LIKE__DEFAULT=true
E.g. Consider generating SELECT ... from TABLE WHERE KEY_1 >= ? AND KEY_2 >= ?.
If each key is 5 chars, and the supplied values are "ABCDE" and "B " - the above translates to:SELECT ... from TABLE WHERE KEY_1 >= 'ABCDE' AND KEY_2 >= 'B '.
Converting it to LIKE will becomeSELECT ... from TABLE WHERE KEY_1 >= 'ABCDE' AND KEY_2 LIKE 'B%'
When this flag is set, if the char-count of a field is equal to that of the supplied value, then the generated SQL will becomeSELECT ... from TABLE WHERE KEY_1 = 'ABCDE' AND KEY_2 LIKE 'B%'
This can make a significant improvement to performance .- Specified by:
isChangeGTEQ2EQForLIKEConditionin interfaceISQLWrapper
-
assignChangeGTEQ2EQForLIKECondition
public void assignChangeGTEQ2EQForLIKECondition(boolean useEQForExactLenghtMatch) Description copied from interface:ISQLWrapperOnly applies when OR_CHANGE_GE_CONDITION_TO_LIKE__DEFAULT=true
E.g. Consider generating SELECT ... from TABLE WHERE KEY_1 >= ? AND KEY_2 >= ?.
If each key is 5 chars, and the supplied values are "ABCDE" and "B " - the above translates to:SELECT ... from TABLE WHERE KEY_1 >= 'ABCDE' AND KEY_2 >= 'B '.
Converting it to LIKE will becomeSELECT ... from TABLE WHERE KEY_1 >= 'ABCDE' AND KEY_2 LIKE 'B%'
When this flag is set, if the char-count of a field is equal to that of the supplied value, then the generated SQL will becomeSELECT ... from TABLE WHERE KEY_1 = 'ABCDE' AND KEY_2 LIKE 'B%'
This can make a significant improvement to performance .- Specified by:
assignChangeGTEQ2EQForLIKEConditionin interfaceISQLWrapper
-
assignTopRowSelectStrategyCount
public void assignTopRowSelectStrategyCount(int count) Description copied from interface:ISQLWrapper(Default = -1) When set to 0 or 1 , the Object-Relation SQL Generator will produce:SELECT � FROM table WHERE condition-1
When set to greater than 1 - (for Oracle) it will produce:SELECT ... FROM ( SELECT � FROM table WHERE condition-1 ) WHERE ROWNUM <OR_SELECT_TOP_ROW__DEFAULT;
- Specified by:
assignTopRowSelectStrategyCountin interfaceISQLWrapper
-
retrieveTopRowSelectStrategyCount
public int retrieveTopRowSelectStrategyCount()Description copied from interface:ISQLWrapperFor internal use only (Default = -1) When set to 0 or 1 , the Object-Relation SQL Generator will produce:SELECT ... FROM table WHERE condition-1
When set to greater than 1 - (for Oracle) it will produce:SELECT ... FROM ( SELECT ... FROM table WHERE condition-1 ) WHERE ROWNUM <OR_SELECT_TOP_ROW__DEFAULT;
- Specified by:
retrieveTopRowSelectStrategyCountin interfaceISQLWrapper
-
retrieveTopRowSelectStrategyStartingRow
public int retrieveTopRowSelectStrategyStartingRow()Description copied from interface:ISQLWrapperfor internal use only- Specified by:
retrieveTopRowSelectStrategyStartingRowin interfaceISQLWrapper
-
assignTopRowSelectStrategyRange
public void assignTopRowSelectStrategyRange(int startRowNumber, int count) Description copied from interface:ISQLWrapperSimilar to assignTopRowSelectStrategyCount - but aslso defines starting points- Specified by:
assignTopRowSelectStrategyRangein interfaceISQLWrapper
-
assignGenerate_OrderBy_ForReadStatements
public void assignGenerate_OrderBy_ForReadStatements(boolean enabled) Description copied from interface:ISQLWrapperREAD() statement on DB tables with MANY rows, issues an ORDER BY on the SELECT which may have a big performance impact. If the data was populated sequentially, then the ORDER BY may not be strictly required, and may be removed.- Specified by:
assignGenerate_OrderBy_ForReadStatementsin interfaceISQLWrapper
-
retrieveGenerate_OrderBy_ForReadStatements
public boolean retrieveGenerate_OrderBy_ForReadStatements()Description copied from interface:ISQLWrapperfor internal use- Specified by:
retrieveGenerate_OrderBy_ForReadStatementsin interfaceISQLWrapper
-
assignIgnoreOriginalKeys
public void assignIgnoreOriginalKeys(boolean newValue) Description copied from interface:ISQLWrapperfor internal use- Specified by:
assignIgnoreOriginalKeysin interfaceISQLWrapper
-
isIgnoreOriginalKeys
public boolean isIgnoreOriginalKeys()- Specified by:
isIgnoreOriginalKeysin interfaceISQLWrapper
-
assignCachedSeekValues
- Specified by:
assignCachedSeekValuesin interfaceISQLWrapper
-
retrieveCachedSeekValues
- Specified by:
retrieveCachedSeekValuesin interfaceISQLWrapper
-
seekRecord
- Specified by:
seekRecordin interfaceISQLWrapper- Throws:
IOStatusException
-
assignGDGProperty
Description copied from interface:ISQLWrapperAdditional SQL statement to be read from gdg.properties file. E.g. assignGDGProperty("GDG1"); If gdg.properties file contains: GDG1=AND GDG_YEAR=2012 Then the above search condition will be appended to any SQL statements issued reading this class- Specified by:
assignGDGPropertyin interfaceISQLWrapper
-
assignGDGCondition
Description copied from interface:ISQLWrapperAdditional SQL statement to be read from gdg.properties file. E.g. assignGDGCondition("GDG_YEAR = 2013"); Then the above search condition will be appended to any SQL statements issued reading this class.- Specified by:
assignGDGConditionin interfaceISQLWrapper
-
isSeekSuppressed
public boolean isSeekSuppressed()Description copied from interface:ISQLWrapperfor internal use only - For VSAM SEEK / READ / ... VSAM apps need to throw InvalidKeyException (even if they use CICS delegates), but CICS applications need to throw KeyNotFoundException ,- Specified by:
isSeekSuppressedin interfaceISQLWrapper- Returns:
-
assignSuppressSeek
public void assignSuppressSeek(boolean newValue) Description copied from interface:ISQLWrapperfor internal use only - For VSAM SEEK / READ / ... VSAM apps need to throw InvalidKeyException (even if they use CICS delegates), but CICS applications need to throw KeyNotFoundException ,- Specified by:
assignSuppressSeekin interfaceISQLWrapper
-
retrieveAdditionalSQLOrderBy
- Specified by:
retrieveAdditionalSQLOrderByin interfaceISQLWrapper
-
retrieveAdditionalSQLCondition
- Specified by:
retrieveAdditionalSQLConditionin interfaceISQLWrapper
-
assignResultSet
- Specified by:
assignResultSetin interfaceISQLWrapper
-
retrieveResultSet
- Specified by:
retrieveResultSetin interfaceISQLWrapper
-
isKept
public boolean isKept()- Specified by:
isKeptin interfaceISQLWrapper
-
setLock
public void setLock(boolean newValue) - Specified by:
setLockin interfaceISQLWrapper
-
unlock
public void unlock()- Specified by:
unlockin interfaceISQLWrapper
-
useOidTableForKeyGeneration
public boolean useOidTableForKeyGeneration()- Specified by:
useOidTableForKeyGenerationin interfaceISQLWrapper
-
assignDelegateDAO
- Specified by:
assignDelegateDAOin interfaceISQLWrapper
-
retrieveDelegateDAO
- Specified by:
retrieveDelegateDAOin interfaceISQLWrapper
-
retrieveConnection
- Specified by:
retrieveConnectionin interfaceISQLWrapper
-
assignFetchDirectionIsForward
- Specified by:
assignFetchDirectionIsForwardin interfaceISQLWrapper
-
isFetchDirectionForward
public boolean isFetchDirectionForward()- Specified by:
isFetchDirectionForwardin interfaceISQLWrapper
-
isFetchDirectionBackward
public boolean isFetchDirectionBackward()- Specified by:
isFetchDirectionBackwardin interfaceISQLWrapper
-
assignTreatAsSQLWrapper
public void assignTreatAsSQLWrapper(boolean treatAsSQLWrapper) Description copied from interface:ISQLWrapperUsed only used by CicsPersistent Subclasses. allows CicsPersistent (ILE or other subclasses of this) to be treated as SQLWrapper (Object-relational VSAM Files) by batch programs.- Specified by:
assignTreatAsSQLWrapperin interfaceISQLWrapper
-
retrieveTableName
- Specified by:
retrieveTableNamein interfaceISQLWrapper
-
assignSQLConditions
Description copied from interface:ISQLWrapper
Ignore the inbuilt KEY (defined by assignRecordKey(...)) - and use this condition instead
Please note program will be responsible for passing additional parameters.
e.g. assignSQLConditions("NAME = 'SMITH");
(or when assignSQLConditions("NAME = ?") - the program should also use the "addSearchParameter" method to provide values- Specified by:
assignSQLConditionsin interfaceISQLWrapper
-
assignAdditionalSQLOrderBy
Description copied from interface:ISQLWrapperThis method allows inserting additional Ordering clauses It is useful in hierarchical tables will define additional SQLConditions - e.g. (INDX_FLD_TABLE_1 ASCENDING)- Specified by:
assignAdditionalSQLOrderByin interfaceISQLWrapper
-
retrieveAdditionalSearchParameters
Description copied from interface:ISQLWrapperassignSQLCondition can also have conditions such as "NAME = ?". In that case the program should also use the "addSearchParameter" method to provide values- Specified by:
retrieveAdditionalSearchParametersin interfaceISQLWrapper- Returns:
-
retrieveImplicitDatabaseKey
Description copied from interface:ISQLWrapperfor internal use only- Specified by:
retrieveImplicitDatabaseKeyin interfaceISQLWrapper- Returns:
-
assignRecordKey
Description copied from interface:ISQLWrapperUsed only used by CicsPersistent Subclasses.- Specified by:
assignRecordKeyin interfaceISQLWrapper
-
retrieveAscentDescendOrder
- Specified by:
retrieveAscentDescendOrderin interfaceISQLWrapper
-
assignAdditionalSQLConditions
Description copied from interface:ISQLWrapperThis method allows inserting additional conditions - e.g. assignAdditionalSQLConditions( "(COLUMN_2 = 12)"); It is useful in hierarchical tables will define additional SQLConditions - e.g. (INDX_FLD_TABLE_1 = 12), as well as GDG support- Specified by:
assignAdditionalSQLConditionsin interfaceISQLWrapper
-
assignAdditionalSQLConditions
Description copied from interface:ISQLWrapperThis method allows inserting additional conditions - e.g. assignAdditionalSQLConditions( "(COLUMN_2 = 12)"); It is useful in hierarchical tables will define additional SQLConditions - e.g. (INDX_FLD_TABLE_1 = 12), as well as GDG support- Specified by:
assignAdditionalSQLConditionsin interfaceISQLWrapper
-
assignAdditionalSQLForeignKeyCondition
Description copied from interface:ISQLWrapperThis method allows appending to current SQL Conditions without overwriting previous conditions- Specified by:
assignAdditionalSQLForeignKeyConditionin interfaceISQLWrapper
-
clearAdditionalSQLCondition
public void clearAdditionalSQLCondition()- Specified by:
clearAdditionalSQLConditionin interfaceISQLWrapper
-
retrieveIncludeRedefinedFieldsInCRUD
public boolean retrieveIncludeRedefinedFieldsInCRUD()- Specified by:
retrieveIncludeRedefinedFieldsInCRUDin interfaceISQLWrapper
-
assignIncludeRedefinedFieldsInCRUD
public void assignIncludeRedefinedFieldsInCRUD(boolean includeRedefinedFieldsInCRUD) - Specified by:
assignIncludeRedefinedFieldsInCRUDin interfaceISQLWrapper
-