## org.firebirdsql.jdbc
Class FBEscapedCallParser

    java.lang.Object
      org.firebirdsql.jdbc.FBEscapedCallParser

    public class FBEscapedCallParser

extends Object

Parser for escaped procedure call.

Constructor Summary
`FBEscapedCallParser(int mode)`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FBEscapedCallParser

    public FBEscapedCallParser(int mode)

Method Detail

### getState

    protected int getState()

  Returns the current state.

### setState

    protected void setState(int state)

  Sets the current state.

  Parameters:
    `state` - to enter.
  Throws:
    ``java.lang.IllegalStateException`` - if the system cannot enter the desired state.

### isInState

    protected boolean isInState(int state)

  Returns if the system is in state `state`.

  Parameters:
    `state` - we're testing
  Returns:
    `true` if the system is in state `state`.

### switchState

    protected void switchState(char testChar)
                        throws FBSQLParseException

  Test the character to be the state switching character and switches the state if necessary.

  Parameters:
    `testChar` - character to test
  Throws:
    `FBSQLParseException`

### parseCall

    public FBProcedureCall parseCall(String sql)
                              throws FBSQLException

  Converts escaped parts in the passed SQL to native representation.

  Parameters:
    `sql` - to parse
  Returns:
    native form of the `sql`.
  Throws:
    `FBSQLException`

### 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.

  Parameters:
    `token` - token to process.
  Returns:
    `true` if token was understood and processed.

### 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.

  Parameters:
    `param` - parameter to process.
  Returns:
    processed parameter.
  Throws:
    `FBSQLParseException` - if parameter cannot be correctly parsed.
    `FBSQLException`

Copyright © 2001-2010. All Rights Reserved.