Package com.softwaremining.sql
Class SQLWrapperHelper
java.lang.Object
com.softwaremining.sql.SQLWrapperHelper
- All Implemented Interfaces:
IPersistence
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic longfor 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_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 TypeMethodDescriptionstatic intclose(ISQLWrapper wrapper, boolean closeFileStatus) for internal SoftwareMining usestatic intdeleteAll(ISQLWrapper wrapper) delete all wrapper records from database-tablestatic intdeleteRecord(ISQLWrapper wrapper) equivalant of COBOL delete (for VSAM)static intfetchNext(ISQLWrapper wrapper, boolean readForward, int conditionType, boolean useNativeKeys, ISMObject[] searchKeys, int descSeekCondition, boolean closeFile) static intinsertRecord(ISQLWrapper wrapper) Insert a record - populate the values from the existing fieldsstatic booleanisAllFieldsContainZerosOrSpaces(ISMObject[] fields) static intnextRecord(ISQLWrapper wrapper) static intopen(ISQLWrapper wrapper, int openMode) static intprevRecord(ISQLWrapper wrapper) Translation of COBOL Read Next ...static intreadRecord(ISQLWrapper wrapper) Equivalant of COBOL READ , at end throw exception If AccessMode is not SEQUENTIAL, a seek() will be performed before the read.static intseekRecord(ISQLWrapper wrapper, ISMObject[] keys, int conditionType) static intupdateRecord(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:
IOCriticalExceptionIOFatalException
-
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:
-