org.firebirdsql.jdbc
Class FBEscapedCallParser
java.lang.Object
org.firebirdsql.jdbc.FBEscapedCallParser
public class FBEscapedCallParser
extends java.lang.Object
Parser for escaped procedure call.
protected int | getState() - Returns the current state.
|
protected boolean | isInState(int state) - Returns if the system is in state
state .
|
FBProcedureCall | parseCall(String sql) - Converts escaped parts in the passed SQL to native representation.
|
protected String | processParam(String param) - Pre-process parameter.
|
protected boolean | processToken(String token) - Process token.
|
protected void | setState(int state) - Sets the current state.
|
protected void | switchState(char testChar) - Test the character to be the state switching character and switches
the state if necessary.
|
FBEscapedCallParser
public FBEscapedCallParser(int mode)
getState
protected int getState()
Returns the current state.
isInState
protected boolean isInState(int state)
Returns if the system is in state state
.
true
if the system is in state state
.
processParam
protected String processParam(String param)
throws FBSQLException
Pre-process parameter. This method checks if there is escaped call inside
and converts it to the native one.
param
- parameter to process.
processToken
protected boolean processToken(String token)
Process token. This method detects procedure call keywords and sets
appropriate flags. Also it detects procedure name and sets appropriate
filed in the procedure call object.
token
- token to process.
true
if token was understood and processed.
setState
protected void setState(int state)
Sets the current state.
switchState
protected void switchState(char testChar)
throws FBSQLParseException
Test the character to be the state switching character and switches
the state if necessary.
testChar
- character to test
Copyright B) 2001 David Jencks and other authors. All rights reserved.