|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.objectweb.cjdbc.common.sql.AbstractRequest
org.objectweb.cjdbc.common.sql.StoredProcedure
A StoredProcedure is a SQL request with the following syntax:
{call <procedure-name>[<arg1>,<arg2>, ...]}
| Field Summary | |
private boolean |
blocking
true if this request might block. |
private java.lang.String |
procedureName
|
private boolean |
returnsRS
|
private static long |
serialVersionUID
|
| Fields inherited from class org.objectweb.cjdbc.common.sql.AbstractRequest |
cacheable, cursorName, escapeProcessing, fetchSize, id, isAutoCommit, isParsed, isReadOnly, login, maxRows, requestType, sqlQuery, sqlSkeleton, timeoutInSeconds, transactionId, transactionIsolation |
| Constructor Summary | |
StoredProcedure(CJDBCInputStream in)
|
|
StoredProcedure(java.lang.String sqlQuery,
boolean escapeProcessing,
int timeout,
java.lang.String lineSeparator,
boolean isRead)
Creates a new StoredProcedure instance. |
|
| Method Summary | |
void |
cloneParsing(AbstractRequest request)
Always throws a SQLException: it is useless to parse a
stored procedure call since we can't know which tables are affected by this
procedure. |
java.lang.String |
getProcedureName()
Get the stored procedure name |
boolean |
mightBlock()
Tests if this request might block. |
boolean |
needsMacroProcessing()
Returns true if this request requires macro (RAND(), NOW(),
...) processing. |
void |
parse(DatabaseSchema schema,
int granularity,
boolean isCaseSensitive)
Just get the stored procedure name. |
boolean |
returnsResultSet()
Does this request returns a ResultSet? |
void |
sendToStream(CJDBCOutputStream out,
boolean needSkeleton)
Serialize the request on the output stream by sending only the needed parameters to reconstruct it on the controller. |
void |
setBlocking(boolean blocking)
Sets if this request might block. |
| Methods inherited from class org.objectweb.cjdbc.common.sql.AbstractRequest |
debug, equals, getCacheAbility, getCursorName, getEscapeProcessing, getFetchSize, getId, getLineSeparator, getLogin, getMaxRows, getSQL, getSQLShortForm, getSqlSkeleton, getTimeout, getTransactionId, getTransactionIsolation, isAlter, isAutoCommit, isCreate, isDDL, isDelete, isDML, isDriverProcessed, isDrop, isInsert, isParsed, isReadOnly, isSelect, isUpdate, receiveResultSetParams, sendResultSetParams, setCacheAbility, setCursorName, setDriverProcessed, setFetchSize, setId, setIsAutoCommit, setIsReadOnly, setLogin, setMaxRows, setSQL, setSqlSkeleton, setTimeout, setTransactionId, setTransactionIsolation, trimCarriageReturnAndTabs |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final long serialVersionUID
private transient boolean blocking
true if this request might block.
private transient java.lang.String procedureName
private final boolean returnsRS
| Constructor Detail |
public StoredProcedure(java.lang.String sqlQuery,
boolean escapeProcessing,
int timeout,
java.lang.String lineSeparator,
boolean isRead)
StoredProcedure instance.
sqlQuery - the SQL requestescapeProcessing - should the driver to escape processing before
sending to the database ?timeout - an int valuelineSeparator - the line separator used in the queryisRead - does the request expects a ResultSet ?parse(org.objectweb.cjdbc.common.sql.schema.DatabaseSchema, int, boolean)
public StoredProcedure(CJDBCInputStream in)
throws java.io.IOException
AbstractRequest| Method Detail |
public void sendToStream(CJDBCOutputStream out,
boolean needSkeleton)
throws java.io.IOException
AbstractRequest
sendToStream in class AbstractRequestout - destination CJDBCOutputStreamneedSkeleton - true if controller wants SQL templates
java.io.IOException - if failsAbstractRequest.sendToStream(org.objectweb.cjdbc.common.stream.CJDBCOutputStream,
boolean)public boolean needsMacroProcessing()
AbstractRequesttrue if this request requires macro (RAND(), NOW(),
...) processing.
needsMacroProcessing in class AbstractRequestfalseAbstractRequest.needsMacroProcessing()public boolean returnsResultSet()
AbstractRequest
returnsResultSet in class AbstractRequestAbstractRequest.returnsResultSet()public java.lang.String getProcedureName()
public boolean mightBlock()
true if this request might blockpublic void setBlocking(boolean blocking)
blocking - a boolean value
public void parse(DatabaseSchema schema,
int granularity,
boolean isCaseSensitive)
throws java.sql.SQLException
parse in class AbstractRequestschema - a DatabaseSchema valuegranularity - parsing granularity as defined in
ParsingGranularitiesisCaseSensitive - true if parsing must be case sensitive
java.sql.SQLException - if the parsing failsAbstractRequest.parse(org.objectweb.cjdbc.common.sql.schema.DatabaseSchema,
int, boolean)public void cloneParsing(AbstractRequest request)
SQLException: it is useless to parse a
stored procedure call since we can't know which tables are affected by this
procedure.
cloneParsing in class AbstractRequestrequest - the parsed request to cloneAbstractRequest.cloneParsing(AbstractRequest)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||