public class SqlCursors
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_CURSOR_NAME |
Constructor and Description |
---|
SqlCursors() |
Modifier and Type | Method and Description |
---|---|
SqlCursor |
allocate(java.lang.Object cursorName)
allocate a cursor by cursor name
|
SqlCursor |
allocate(java.lang.Object passCursorName,
boolean withHold)
allocate a cursor by cursor name
|
SqlCursor |
allocateOpen(java.lang.Object passCursorName,
boolean withHold)
allocate a cursor by cursor name and then open it
|
SqlCursor |
allocateOpen(java.lang.String passCursorName,
java.lang.Integer loc)
[HCI US812 mnh 2016-3-22] allocate and open a cursor binding it to
the result set retrieved from a CALLed stored procedure associated
with locator variable LOC
|
int |
assignNextOpenSequence()
update the open sequence number
|
void |
close(java.lang.Object cursorName)
close a specific cursor among this group of SqlCursors
|
void |
closeAll()
close all cursors in this group of SqlCursors
|
void |
closeAllNotHeld()
close all cursors not marked as WITH HOLD in this group of SqlCursors
|
boolean |
deallocate(java.lang.Object passCursorName)
deallocate a spcific cursor among these SqlCursors
|
void |
deallocateAll()
deallocate all cursors
|
void |
deallocatePrepare(java.lang.Object passPsName)
deallocates any cursors associated with a prepared statement
|
SqlCursor |
findStmtNameOrAllocate(java.lang.String psName,
java.lang.String crName)
[HCI ticket#1419 mnh 2013-03-14] allow "EXECUTE stmt-name" to find a
cursor for a stmt-name
|
SqlCursor |
getCursor(java.lang.Object cursorName)
obtain cursor by name
|
java.util.Hashtable<java.lang.String,SqlCursor> |
getCursors()
return all the SqlCursor s in a table by SqlCursor name
|
SqlCursor |
open(java.lang.Object cursorName)
open a specific cursor among this group of SqlCursors
|
void |
saveResultSet(java.lang.String storedProcName,
java.sql.ResultSet resultSet)
[HCI US812 mnh 2016-3-22] save one (of possibly many) result sets that
come from the execution of a stored procedure.
|
void |
setLogMode(boolean value)
set the log mode for this group of cursors
|
public static final java.lang.String DEFAULT_CURSOR_NAME
public void setLogMode(boolean value)
value
- true to turn logging onpublic final SqlCursor getCursor(java.lang.Object cursorName)
cursorName
- the cursor to look for in this group of SqlCursorspublic final java.util.Hashtable<java.lang.String,SqlCursor> getCursors()
public final SqlCursor allocate(java.lang.Object cursorName)
cursorName
- the name to allocatepublic final SqlCursor allocate(java.lang.Object passCursorName, boolean withHold)
passCursorName
- the name to allocatewithHold
- true if the cursor was defined WITH HOLD (persists across commits)public final SqlCursor allocateOpen(java.lang.Object passCursorName, boolean withHold) throws java.sql.SQLException
passCursorName
- the name to allocatewithHold
- true if the cursor was defined WITH HOLD (persists across commits)a
- SQLException if an error occurredjava.sql.SQLException
public final void saveResultSet(java.lang.String storedProcName, java.sql.ResultSet resultSet) throws java.sql.SQLException
storedProcName
- the stored procedure nameresultSet
- the associated ResultSetjava.sql.SQLException
- if an error occurredpublic final SqlCursor allocateOpen(java.lang.String passCursorName, java.lang.Integer loc) throws java.sql.SQLException
passCursorName
- the cursor nameloc
- the locator variablejava.sql.SQLException
- if an error occurredpublic final SqlCursor findStmtNameOrAllocate(java.lang.String psName, java.lang.String crName) throws java.sql.SQLException
psName
- the prepared statement namecrName
- the cursor namejava.sql.SQLException
- if an error occurredpublic final boolean deallocate(java.lang.Object passCursorName) throws java.sql.SQLException
passCursorName
- the cursor name to deallocatejava.sql.SQLException
- if an error occurredpublic final void deallocateAll() throws java.sql.SQLException
java.sql.SQLException
- if an error occurredpublic final SqlCursor open(java.lang.Object cursorName) throws java.sql.SQLException
cursorName
- the cursor name to look for and openjava.sql.SQLException
- if an error occurredpublic final void close(java.lang.Object cursorName) throws java.sql.SQLException
cursorName
- - the cursor to closejava.sql.SQLException
- if an error occurredpublic final void closeAll()
public final void closeAllNotHeld() throws java.sql.SQLException
java.sql.SQLException
public final void deallocatePrepare(java.lang.Object passPsName) throws java.sql.SQLException
passPsName
- the prepared statement name to deallocatejava.sql.SQLException
public int assignNextOpenSequence()