Public Member Functions | |
StoredProcedure (String sqlQuery, boolean escapeProcessing, int timeout, String lineSeparator) | |
boolean | isReadRequest () |
boolean | isWriteRequest () |
boolean | isUnknownRequest () |
String | getProcedureName () |
void | parse (DatabaseSchema schema, int granularity, boolean isCaseSensitive) throws SQLException |
void | cloneParsing (AbstractRequest request) |
StoredProcedure
is a SQL request with the following syntax:
{call <procedure-name>[<arg1>,<arg2>, ...]}
Definition at line 43 of file StoredProcedure.java.
|
Creates a new
Definition at line 57 of file StoredProcedure.java. 00059 { 00060 super(sqlQuery, escapeProcessing, timeout, lineSeparator); 00061 cacheable = RequestType.UNCACHEABLE; 00062 isParsed = false; 00063 }
|
|
Always throws a
Implements org.objectweb.cjdbc.common.sql.AbstractRequest. Definition at line 141 of file StoredProcedure.java. 00142 { 00143 throw new RuntimeException( 00144 "Unable to clone the parsing of a stored procedure call"); 00145 }
|
|
Get the stored procedure name
Definition at line 97 of file StoredProcedure.java. References org.objectweb.cjdbc.common.sql.StoredProcedure.parse(). 00098 { 00099 if (procedureName == null) 00100 try 00101 { 00102 parse(null, 0, true); 00103 } 00104 catch (SQLException e) 00105 { 00106 return null; 00107 } 00108 return procedureName; 00109 }
|
|
Implements org.objectweb.cjdbc.common.sql.AbstractRequest. Definition at line 69 of file StoredProcedure.java. 00070 { 00071 return false; 00072 }
|
|
Implements org.objectweb.cjdbc.common.sql.AbstractRequest. Definition at line 87 of file StoredProcedure.java. 00088 { 00089 return true; 00090 }
|
|
Implements org.objectweb.cjdbc.common.sql.AbstractRequest. Definition at line 78 of file StoredProcedure.java. 00079 { 00080 return false; 00081 }
|
|
Just get the stored procedure name.
Implements org.objectweb.cjdbc.common.sql.AbstractRequest. Definition at line 117 of file StoredProcedure.java. Referenced by org.objectweb.cjdbc.common.sql.StoredProcedure.getProcedureName(). 00119 { 00120 sqlQuery = sqlQuery.trim(); 00121 if (sqlQuery.length() < 6) // 6='call x' 00122 throw new SQLException("Malformed stored procedure call '" + sqlQuery 00123 + "'"); 00124 00125 int parenthesis = sqlQuery.indexOf('('); 00126 if (parenthesis == -1) 00127 procedureName = sqlQuery.substring(5); // 5 = 'call ' 00128 else 00129 procedureName = sqlQuery.substring(5, parenthesis); // 5 = 'call ' 00130 // Remove possible extra spaces between call and procedure name 00131 procedureName = procedureName.trim(); 00132 }
|