Package com.softwaremining.sql
Class SQLWrapperHelper
java.lang.Object
com.softwaremining.sql.SQLWrapperHelper
- All Implemented Interfaces:
IPersistence
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
static long
for internal use only ...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 TypeMethodDescriptionstatic int
close
(ISQLWrapper wrapper, boolean closeFileStatus) for internal SoftwareMining usestatic int
deleteAll
(ISQLWrapper wrapper) delete all wrapper records from database-tablestatic int
deleteRecord
(ISQLWrapper wrapper) equivalant of COBOL delete (for VSAM)static int
fetchNext
(ISQLWrapper wrapper, boolean readForward, int conditionType, boolean useNativeKeys, ISMObject[] searchKeys, int descSeekCondition, boolean closeFile) static int
insertRecord
(ISQLWrapper wrapper) Insert a record - populate the values from the existing fieldsstatic boolean
isAllFieldsContainZerosOrSpaces
(ISMObject[] fields) static int
nextRecord
(ISQLWrapper wrapper) static int
open
(ISQLWrapper wrapper, int openMode) static int
prevRecord
(ISQLWrapper wrapper) Translation of COBOL Read Next ...static int
readRecord
(ISQLWrapper wrapper) Equivalant of COBOL READ , at end throw exception If AccessMode is not SEQUENTIAL, a seek() will be performed before the read.static int
seekRecord
(ISQLWrapper wrapper, ISMObject[] keys, int conditionType) static int
updateRecord
(ISQLWrapper wrapper) Translation of COBOL REWRITE statement
-
Field Details
-
totalRuntime
public static long totalRuntimefor internal use only ... profiling information -
READ_FORWARD
public static final boolean READ_FORWARD- See Also:
-
-
Constructor Details
-
SQLWrapperHelper
public SQLWrapperHelper()
-
-
Method Details
-
open
-
close
for internal SoftwareMining use- Parameters:
wrapper
-closeFileStatus
- - mark File as closed- Returns:
- Throws:
IOCriticalException
-
seekRecord
public static int seekRecord(ISQLWrapper wrapper, ISMObject[] keys, int conditionType) throws IOStatusException - Throws:
IOStatusException
-
isAllFieldsContainZerosOrSpaces
-
nextRecord
- Throws:
IOStatusException
-
fetchNext
public static int fetchNext(ISQLWrapper wrapper, boolean readForward, int conditionType, boolean useNativeKeys, ISMObject[] searchKeys, int descSeekCondition, boolean closeFile) throws IOCriticalException, IOFatalException - Throws:
IOCriticalException
IOFatalException
-
prevRecord
Translation of COBOL Read Next ...- Throws:
IOStatusException
-
readRecord
Equivalant of COBOL READ , at end throw exception If AccessMode is not SEQUENTIAL, a seek() will be performed before the read.- Throws:
IOStatusException
-
deleteRecord
equivalant of COBOL delete (for VSAM)- Throws:
IOStatusException
-
insertRecord
Insert a record - populate the values from the existing fields- Throws:
IOStatusException
-
updateRecord
Translation of COBOL REWRITE statement- Throws:
IOStatusException
-
deleteAll
delete all wrapper records from database-table- Parameters:
wrapper
-- Returns:
-