Package com.softwaremining.vendors.cics
Class CicsIndexedFile
java.lang.Object
com.softwaremining.wrappers.CBLBean
com.softwaremining.wrappers.AbstractBasePersistence
com.softwaremining.files.IndexedFileSingleProcess
com.softwaremining.vendors.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
Fields inherited from class com.softwaremining.files.IndexedFileSingleProcess
_CurrentIndex
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionprotected static void
_assignKeyValue
(CicsIndexedFile me, String value) void
assignAdditionalSQLConditions
(String condition) This method allows inserting additional conditions - e.g.void
assignAdditionalSQLConditions
(StringBuilder condition) This method allows inserting additional conditions - e.g.void
assignAdditionalSQLOrderBy
(String newValue) This method allows inserting additional Ordering clauses It is useful in hierarchical tables will define additional SQLConditions - e.g.void
assignCachedSeekValues
(List objects) void
assignChangeGEConditonToLIKE
(boolean newValue) The system can replace GE searches to LIKE statements.void
assignChangeGTEQ2EQForLIKECondition
(boolean useEQForExactLenghtMatch) Only applies when OR_CHANGE_GE_CONDITION_TO_LIKE__DEFAULT=true
E.g.void
assignConnection
(Connection connection) void
assignDbDecorator
(ACMDbDecorator dbDecorator) void
assignDelegateDAO
(ISQLWrapper delegateDAO) void
assignDelegateDAO
(CicsIndexedFile delegateDAO) Indexed files with totally different formats will sometimes still need to go to same database table.void
assignExpandGTEQSearches
(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 >= ?)void
assignFetchDirectionIsForward
(Boolean direction) void
assignFileName
(String fileName) In Sequential File Processing - it overwrites the default name of an input/output file automatically assigned by the system.void
assignFileOpened
(boolean fileOpened) void
assignFileOpened
(int openMode) void
assignGDGCondition
(String gdgCondition) Additional SQL statement to be read from gdg.properties file.void
assignGDGProperty
(String gdgProperty) Additional SQL statement to be read from gdg.properties file.void
assignGenerate_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.void
assignGenericRecordKeyLength
(int genericKeyLength) void
assignIgnoreOriginalKeys
(boolean newValue) for internal usevoid
assignKeyIsUnique
(boolean keyUnique) void
assignKeyValue
(AbstractDataObject keyValueField) updates the value of Record-Keys defined for this class with every read.void
assignLastSeekCondition
(int lastSeekCondition) void
assignLastSeekConditionLookedForEquality
(boolean newValue) void
assignLock
(boolean newLocValue) Blank method - no functionality is currently deemed to be requiredvoid
assignLowerLimitForExpandGTEQSearches
(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 generatedvoid
assignOpenMode
(int openMode) void
assignRecordKey
(ISMObject _recordKey) Used only used by CicsPersistent Subclasses.void
assignRecordKey
(ISMObject[] recordKeys) Used only used by CicsPersistent Subclasses.void
assignRecordKeyLength
(int keyLength) Deprecated.void
assignRecordKeyValue
(String newValue) protected void
assignResponseCode
(int value) Used internally to set the IO operation status-values.void
assignResponseCodeField
(ISMObject status) void
assignResultSet
(ResultSet resultSet) void
assignResultSetFetchSize
(int resultSetFetchSize) void
assignRowFacade
(RowFacade rowFacade) void
assignSequentialKeyGeneration
(boolean sequentialKeyGeneration) void
assignSQLConditions
(String condition)
Ignore the inbuilt KEY (defined by assignRecordKey(...)) - and use this condition instead
Please note program will be responsible for passing additional parameters.void
assignStatus
(ISMObject status) set the status objectvoid
assignSuppressSeek
(boolean newValue) for internal use only - For VSAM SEEK / READ / ...void
assignTempStorage
(ISMObject object) Deprecated.void
assignThrowInvalidKeyException
(boolean newValue) for internal use only - For VSAM SEEK / READ / ...void
assignTopRowSelectStrategyCount
(int count) (Default = -1) When set to 0 or 1 , the Object-Relation SQL Generator will produce:void
assignTopRowSelectStrategyRange
(int startRowNumber, int count) Similar to assignTopRowSelectStrategyCount - but aslso defines starting pointsvoid
assignTreatAsSQLWrapper
(boolean treatAsSQLWrapper) Used only used by CicsPersistent Subclasses.void
assignUpperLimitForExpandGTEQSearches
(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 generatedvoid
Delete all records .int
close()
Closes the file and writes all the indexed records to the specified file if open mode allows writing.int
delete()
equivalent of COBOL delete (for VSAM).int
similar to clear().int
int
Used internally to set the IO operation status-values.int
insert()
Insert a record - populate the values from the existing fieldsint
similar to insert().boolean
internal use only.boolean
The system can replace GE searches to LIKE statements.boolean
For internal Use only.boolean
boolean
boolean
boolean
boolean
isKept()
boolean
boolean
boolean
used in AS400 / DB400 to increase speed of searchesboolean
for internal use only - For VSAM SEEK / READ / ...boolean
boolean
int
Reads the next record into memory.int
Reads the prev record into memory.protected int
constructorprotected int
processException
(CBLException e, boolean invokeHandler) Set appropriate responseCodes, and invoke the conditionHandlerprotected int
processException
(CBLException e, boolean invokeHandler, int overridingResponseCode) Set appropriate responseCodes, and invoke the conditionHandlerint
read()
Translation of CICS READ Read is usually used to read random organized data.int
to be removed - CICS subsystem does not call this - see 0011729 similar to readNext().void
reduceGEorEQ
(boolean newValue) used in AS400 / DB400 to increase speed of searchesvoid
releaseResources
(boolean forceRelease) For internal use only - memory management stuffvoid
After setting a GENERIC-KEY, the original Non-generic-Key has to be restored.int
int
assignSQLCondition can also have conditions such as "NAME = ?".boolean
for internal usefor internal use onlyint
used internally by softwareMiningint
Used only used by CicsPersistent Subclasses.int
boolean
for internal use only - For VSAM SEEK / READ / ...int
For internal use only (Default = -1) When set to 0 or 1 , the Object-Relation SQL Generator will produce:int
for internal use onlyint
seek()
Translation of CICS STARTBR Opens a data-set/resultset matching the keys.int
int
translation of CICS STARTBRint
seekRecord
(ISMObject[] keys, int conditionType) int
seekRecord
(ISMObject key, int conditionType) Implements the COBOL START command related to IndexedFileSingleProcess.protected void
setEibFunction
(String value) Used internally to set the IO operation status-values.void
setLock
(boolean newValue) protected void
setResponseCode2
(int responseCode2) Used internally to set the IO operation status-values.void
setStorageLength
(int newLength) to do ...void
unlock()
int
update()
Update the current record with the current record structure.int
similar to update().boolean
int
validateConditionType
(ISMObject key, int conditionType) for internal use onlyMethods inherited from class com.softwaremining.files.IndexedFileSingleProcess
assignAlternateKey, assignAlternateKey, assignDelegateDAO, assignOptimiseForDeleteOperation, assignRecordKey, assignRecordKey, assignRecordsAreFixedLength, assignSQLTableName, assignUseRecSeqDataFiles, clear, deleteFile, dispose, dispose, flush, GenerateGUID, getDataDirectory, getFullFileName, getRecordKey, IsFileopen, isInsertSingleRecordMode, isUseRecSeqDataFiles, open, openCics, resetseek, retrieveRecordKey, seek, seekRecord, setAlternateKey, setAlternateKey
Methods inherited from class com.softwaremining.wrappers.AbstractBasePersistence
assignAccessMode, assignStatus, assignStatusAsPrimitive, assignStatusValue, assignStatusValue, assignTableName, next, prev, readRow, retrieveAccessMode, retrieveFileName, retrieveFileName, retrieveFirstLevelEntry, retrieveSessionId, retrieveStatusField, retrieveStatusValue
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, 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.softwaremining.wrappers.ISMBean
assignExemptFromMemRelease, assignSessionId, assignValue, initialize, isExemptFromMemRelease, isResourceAlreadyReleased, resetStructure, retrieveActualLength, retrieveAsString, retrieveField, retrieveField, retrieveTopLevelField, retrieveValue, stringValue
Methods 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:ISQLWrapper
for 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:
retrieveThrowInvalidKeyException
in interfaceISQLWrapper
- Returns:
-
assignThrowInvalidKeyException
public void assignThrowInvalidKeyException(boolean newValue) Description copied from interface:ISQLWrapper
for 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:
assignThrowInvalidKeyException
in 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:
assignKeyValue
in interfaceISQLWrapper
-
retrieveRecordKeyValue
Used only used by CicsPersistent Subclasses.- Specified by:
retrieveRecordKeyValue
in interfaceISQLWrapper
- Parameters:
value
-
-
assignFileName
In Sequential File Processing - it overwrites the default name of an input/output file automatically assigned by the system.- Overrides:
assignFileName
in 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:IndexedFileSingleProcess
Implements the COBOL START command related to IndexedFileSingleProcess.- Specified by:
seekRecord
in interfaceISQLWrapper
- Overrides:
seekRecord
in 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:
read
in interfaceISQLWrapper
- Overrides:
read
in classAbstractBasePersistence
- Returns:
- when successful it returns IPersistence.STATUS_SUCCESS
-
insert
public int insert()Description copied from class:AbstractBasePersistence
Insert a record - populate the values from the existing fields- Specified by:
insert
in interfaceISQLWrapper
- Overrides:
insert
in classAbstractBasePersistence
-
update
public int update()Description copied from class:AbstractBasePersistence
Update the current record with the current record structure. If at end of file is reached, it does not throw an exception- Specified by:
update
in interfaceISQLWrapper
- Overrides:
update
in classAbstractBasePersistence
-
delete
public int delete()Description copied from class:AbstractBasePersistence
equivalent of COBOL delete (for VSAM).- Specified by:
delete
in interfaceISQLWrapper
- Overrides:
delete
in 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:
insertRecord
in 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:
readRecord
in 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:
updateRecord
in 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:
deleteRecord
in 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:IndexedFileSingleProcess
Reads 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:
nextRecord
in classIndexedFileSingleProcess
- Returns:
- true on success otherwise, false
- Throws:
IOStatusException
-
prevRecord
public int prevRecord()Description copied from class:IndexedFileSingleProcess
Reads 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:
prevRecord
in classIndexedFileSingleProcess
- Returns:
- true on success otherwise, false
-
close
public int close()Description copied from class:IndexedFileSingleProcess
Closes the file and writes all the indexed records to the specified file if open mode allows writing.- Specified by:
close
in interfaceISQLWrapper
- Overrides:
close
in classIndexedFileSingleProcess
- Returns:
- 0 on success
-
setStorageLength
public void setStorageLength(int newLength) to do ... not implemented- Parameters:
newLength
-
-
retrieveNativeKeys
used internally by softwareMining- Specified by:
retrieveNativeKeys
in interfaceISQLWrapper
-
assignRecordKey
Description copied from interface:ISQLWrapper
Used only used by CicsPersistent Subclasses.- Specified by:
assignRecordKey
in 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:
assignLock
in classIndexedFileSingleProcess
- Parameters:
newLocValue
-
-
validateConditionType
for internal use only- Specified by:
validateConditionType
in interfaceISQLWrapper
- Parameters:
conditionType
-- 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:ISMBean
For internal use only - memory management stuff- Specified by:
releaseResources
in interfaceISMBean
- Overrides:
releaseResources
in classCBLBean
- Parameters:
forceRelease
-
-
assignConnection
- Specified by:
assignConnection
in interfaceISQLWrapper
-
retrieveResultSetFetchSize
public int retrieveResultSetFetchSize()- Specified by:
retrieveResultSetFetchSize
in interfaceISQLWrapper
-
assignResultSetFetchSize
public void assignResultSetFetchSize(int resultSetFetchSize) - Specified by:
assignResultSetFetchSize
in interfaceISQLWrapper
-
isFileOpened
public boolean isFileOpened()- Specified by:
isFileOpened
in interfaceISQLWrapper
-
assignFileOpened
public void assignFileOpened(boolean fileOpened) - Specified by:
assignFileOpened
in interfaceISQLWrapper
-
assignStatus
Description copied from class:AbstractBasePersistence
set the status object- Specified by:
assignStatus
in interfaceISQLWrapper
- Overrides:
assignStatus
in classAbstractBasePersistence
- Parameters:
status
-
-
retrieveRowFacade
- Specified by:
retrieveRowFacade
in interfaceISQLWrapper
-
assignRowFacade
- Specified by:
assignRowFacade
in interfaceISQLWrapper
-
retrieveDbDecorator
- Specified by:
retrieveDbDecorator
in interfaceISQLWrapper
-
assignDbDecorator
- Specified by:
assignDbDecorator
in interfaceISQLWrapper
-
retrieveLastSeekCondition
public int retrieveLastSeekCondition()- Specified by:
retrieveLastSeekCondition
in interfaceISQLWrapper
-
assignLastSeekCondition
public void assignLastSeekCondition(int lastSeekCondition) - Specified by:
assignLastSeekCondition
in interfaceISQLWrapper
-
assignOpenMode
public void assignOpenMode(int openMode) - Specified by:
assignOpenMode
in interfaceISQLWrapper
-
retrieveOpenMode
public int retrieveOpenMode()- Specified by:
retrieveOpenMode
in interfaceISQLWrapper
- Overrides:
retrieveOpenMode
in classIndexedFileSingleProcess
-
isSequentialKeyGeneration
public boolean isSequentialKeyGeneration()- Specified by:
isSequentialKeyGeneration
in interfaceISQLWrapper
-
assignSequentialKeyGeneration
public void assignSequentialKeyGeneration(boolean sequentialKeyGeneration) - Specified by:
assignSequentialKeyGeneration
in interfaceISQLWrapper
-
assignLastSeekConditionLookedForEquality
public void assignLastSeekConditionLookedForEquality(boolean newValue) - Specified by:
assignLastSeekConditionLookedForEquality
in interfaceISQLWrapper
-
isLastSeekConditionLookedForEquality
public boolean isLastSeekConditionLookedForEquality()- Specified by:
isLastSeekConditionLookedForEquality
in interfaceISQLWrapper
-
isKeyUnique
public boolean isKeyUnique()- Specified by:
isKeyUnique
in interfaceISQLWrapper
-
assignKeyIsUnique
public void assignKeyIsUnique(boolean keyUnique) - Specified by:
assignKeyIsUnique
in interfaceISQLWrapper
-
isSuppressNextReadCurrent
public boolean isSuppressNextReadCurrent()- Specified by:
isSuppressNextReadCurrent
in interfaceISQLWrapper
-
reduceGEorEQ
public void reduceGEorEQ(boolean newValue) Description copied from interface:ISQLWrapper
used in AS400 / DB400 to increase speed of searches- Specified by:
reduceGEorEQ
in interfaceISQLWrapper
-
isReduceGEorEQ
public boolean isReduceGEorEQ()Description copied from interface:ISQLWrapper
used in AS400 / DB400 to increase speed of searches- Specified by:
isReduceGEorEQ
in interfaceISQLWrapper
-
isAllowedToExpandGTEQSearches
public boolean isAllowedToExpandGTEQSearches()Description copied from interface:ISQLWrapper
internal 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:
isAllowedToExpandGTEQSearches
in 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:
assignExpandGTEQSearches
in 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 invalid input: '<'> (A > ?)
or (A = ? and B > ?)- Specified by:
assignLowerLimitForExpandGTEQSearches
in interfaceISQLWrapper
-
retreiveLowerLimitForExpandGTEQSearches
public int retreiveLowerLimitForExpandGTEQSearches()- Specified by:
retreiveLowerLimitForExpandGTEQSearches
in 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:
assignUpperLimitForExpandGTEQSearches
in interfaceISQLWrapper
-
retreiveUpperLimitForExpandGTEQSearches
public int retreiveUpperLimitForExpandGTEQSearches()- Specified by:
retreiveUpperLimitForExpandGTEQSearches
in interfaceISQLWrapper
-
isChangeGEConditonToLIKE
public boolean isChangeGEConditonToLIKE()Description copied from interface:ISQLWrapper
The 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:
isChangeGEConditonToLIKE
in interfaceISQLWrapper
-
assignChangeGEConditonToLIKE
public void assignChangeGEConditonToLIKE(boolean newValue) Description copied from interface:ISQLWrapper
The 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:
assignChangeGEConditonToLIKE
in interfaceISQLWrapper
-
isChangeGTEQ2EQForLIKECondition
public boolean isChangeGTEQ2EQForLIKECondition()Description copied from interface:ISQLWrapper
For 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:
isChangeGTEQ2EQForLIKECondition
in interfaceISQLWrapper
-
assignChangeGTEQ2EQForLIKECondition
public void assignChangeGTEQ2EQForLIKECondition(boolean useEQForExactLenghtMatch) Description copied from interface:ISQLWrapper
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:
assignChangeGTEQ2EQForLIKECondition
in 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:
assignTopRowSelectStrategyCount
in interfaceISQLWrapper
-
retrieveTopRowSelectStrategyCount
public int retrieveTopRowSelectStrategyCount()Description copied from interface:ISQLWrapper
For 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:
retrieveTopRowSelectStrategyCount
in interfaceISQLWrapper
-
retrieveTopRowSelectStrategyStartingRow
public int retrieveTopRowSelectStrategyStartingRow()Description copied from interface:ISQLWrapper
for internal use only- Specified by:
retrieveTopRowSelectStrategyStartingRow
in interfaceISQLWrapper
-
assignTopRowSelectStrategyRange
public void assignTopRowSelectStrategyRange(int startRowNumber, int count) Description copied from interface:ISQLWrapper
Similar to assignTopRowSelectStrategyCount - but aslso defines starting points- Specified by:
assignTopRowSelectStrategyRange
in interfaceISQLWrapper
- Parameters:
startRowNumber
-count
-
-
assignGenerate_OrderBy_ForReadStatements
public void assignGenerate_OrderBy_ForReadStatements(boolean enabled) Description copied from interface:ISQLWrapper
READ() 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_ForReadStatements
in interfaceISQLWrapper
-
retrieveGenerate_OrderBy_ForReadStatements
public boolean retrieveGenerate_OrderBy_ForReadStatements()Description copied from interface:ISQLWrapper
for internal use- Specified by:
retrieveGenerate_OrderBy_ForReadStatements
in interfaceISQLWrapper
-
assignIgnoreOriginalKeys
public void assignIgnoreOriginalKeys(boolean newValue) Description copied from interface:ISQLWrapper
for internal use- Specified by:
assignIgnoreOriginalKeys
in interfaceISQLWrapper
- Parameters:
newValue
-
-
isIgnoreOriginalKeys
public boolean isIgnoreOriginalKeys()- Specified by:
isIgnoreOriginalKeys
in interfaceISQLWrapper
-
assignCachedSeekValues
- Specified by:
assignCachedSeekValues
in interfaceISQLWrapper
-
retrieveCachedSeekValues
- Specified by:
retrieveCachedSeekValues
in interfaceISQLWrapper
-
seekRecord
- Specified by:
seekRecord
in interfaceISQLWrapper
- Throws:
IOStatusException
-
assignGDGProperty
Description copied from interface:ISQLWrapper
Additional 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:
assignGDGProperty
in interfaceISQLWrapper
-
assignGDGCondition
Description copied from interface:ISQLWrapper
Additional 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:
assignGDGCondition
in interfaceISQLWrapper
-
isSeekSuppressed
public boolean isSeekSuppressed()Description copied from interface:ISQLWrapper
for 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:
isSeekSuppressed
in interfaceISQLWrapper
- Returns:
-
assignSuppressSeek
public void assignSuppressSeek(boolean newValue) Description copied from interface:ISQLWrapper
for 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:
assignSuppressSeek
in interfaceISQLWrapper
-
retrieveAdditionalSQLOrderBy
- Specified by:
retrieveAdditionalSQLOrderBy
in interfaceISQLWrapper
-
retrieveAdditionalSQLCondition
- Specified by:
retrieveAdditionalSQLCondition
in interfaceISQLWrapper
-
assignResultSet
- Specified by:
assignResultSet
in interfaceISQLWrapper
-
retrieveResultSet
- Specified by:
retrieveResultSet
in interfaceISQLWrapper
-
isKept
public boolean isKept()- Specified by:
isKept
in interfaceISQLWrapper
-
setLock
public void setLock(boolean newValue) - Specified by:
setLock
in interfaceISQLWrapper
-
unlock
public void unlock()- Specified by:
unlock
in interfaceISQLWrapper
-
useOidTableForKeyGeneration
public boolean useOidTableForKeyGeneration()- Specified by:
useOidTableForKeyGeneration
in interfaceISQLWrapper
-
assignDelegateDAO
- Specified by:
assignDelegateDAO
in interfaceISQLWrapper
-
retrieveDelegateDAO
- Specified by:
retrieveDelegateDAO
in interfaceISQLWrapper
-
retrieveConnection
- Specified by:
retrieveConnection
in interfaceISQLWrapper
-
assignFetchDirectionIsForward
- Specified by:
assignFetchDirectionIsForward
in interfaceISQLWrapper
-
isFetchDirectionForward
public boolean isFetchDirectionForward()- Specified by:
isFetchDirectionForward
in interfaceISQLWrapper
-
isFetchDirectionBackward
public boolean isFetchDirectionBackward()- Specified by:
isFetchDirectionBackward
in interfaceISQLWrapper
-
assignTreatAsSQLWrapper
public void assignTreatAsSQLWrapper(boolean treatAsSQLWrapper) Description copied from interface:ISQLWrapper
Used 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:
assignTreatAsSQLWrapper
in interfaceISQLWrapper
-
retrieveTableName
- Specified by:
retrieveTableName
in 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:
assignSQLConditions
in interfaceISQLWrapper
- Parameters:
condition
-
-
assignAdditionalSQLOrderBy
Description copied from interface:ISQLWrapper
This 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:
assignAdditionalSQLOrderBy
in interfaceISQLWrapper
-
retrieveAdditionalSearchParameters
Description copied from interface:ISQLWrapper
assignSQLCondition can also have conditions such as "NAME = ?". In that case the program should also use the "addSearchParameter" method to provide values- Specified by:
retrieveAdditionalSearchParameters
in interfaceISQLWrapper
- Returns:
-
retrieveImplicitDatabaseKey
Description copied from interface:ISQLWrapper
for internal use only- Specified by:
retrieveImplicitDatabaseKey
in interfaceISQLWrapper
- Returns:
-
assignRecordKey
Description copied from interface:ISQLWrapper
Used only used by CicsPersistent Subclasses.- Specified by:
assignRecordKey
in interfaceISQLWrapper
-
retrieveAscentDescendOrder
- Specified by:
retrieveAscentDescendOrder
in interfaceISQLWrapper
-
assignAdditionalSQLConditions
Description copied from interface:ISQLWrapper
This 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:
assignAdditionalSQLConditions
in interfaceISQLWrapper
- Parameters:
condition
-
-
assignAdditionalSQLConditions
Description copied from interface:ISQLWrapper
This 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:
assignAdditionalSQLConditions
in interfaceISQLWrapper
- Parameters:
condition
-
-