Package org.firebirdsql.jdbc.escape
Class FBEscapedCallParser
- java.lang.Object
- 
- org.firebirdsql.jdbc.escape.FBEscapedCallParser
 
- 
 public class FBEscapedCallParser extends java.lang.ObjectParser for escaped procedure call.
- 
- 
Constructor SummaryConstructors Constructor Description FBEscapedCallParser(FBEscapedParser.EscapeParserMode mode)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intgetState()Returns the current state.protected booleanisInState(int state)Returns if the system is in statestate.FBProcedureCallparseCall(java.lang.String sql)Converts escaped parts in the passed SQL to native representation.protected java.lang.StringprocessParam(java.lang.String param)Pre-process parameter.protected booleanprocessToken(java.lang.String token)Process token.protected voidsetState(int state)Sets the current state.protected voidswitchState(char testChar)Test the character to be the state switching character and switches the state if necessary.
 
- 
- 
- 
Constructor Detail- 
FBEscapedCallParserpublic FBEscapedCallParser(FBEscapedParser.EscapeParserMode mode) 
 
- 
 - 
Method Detail- 
getStateprotected int getState() Returns the current state.
 - 
setStateprotected void setState(int state) Sets the current state.- Parameters:
- state- to enter.
- Throws:
- java.lang.IllegalStateException- if the system cannot enter the desired state.
 
 - 
isInStateprotected boolean isInState(int state) Returns if the system is in statestate.- Parameters:
- state- we're testing
- Returns:
- trueif the system is in state- state.
 
 - 
switchStateprotected void switchState(char testChar) throws FBSQLParseExceptionTest the character to be the state switching character and switches the state if necessary.- Parameters:
- testChar- character to test
- Throws:
- FBSQLParseException
 
 - 
parseCallpublic FBProcedureCall parseCall(java.lang.String sql) throws java.sql.SQLException Converts escaped parts in the passed SQL to native representation.- Parameters:
- sql- to parse
- Returns:
- native form of the sql.
- Throws:
- java.sql.SQLException
 
 - 
processTokenprotected boolean processToken(java.lang.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.- Parameters:
- token- token to process.
- Returns:
- trueif token was understood and processed.
 
 - 
processParamprotected java.lang.String processParam(java.lang.String param) throws java.sql.SQLExceptionPre-process parameter. This method checks if there is escaped call inside and converts it to the native one.- Parameters:
- param- parameter to process.
- Returns:
- processed parameter.
- Throws:
- FBSQLParseException- if parameter cannot be correctly parsed.
- java.sql.SQLException
 
 
- 
 
-