类 ParameterParser
- java.lang.Object
-
- org.hibernate.engine.query.spi.ParameterParser
-
public class ParameterParser extends Object
The single available methodparse(java.lang.String, org.hibernate.engine.query.spi.ParameterParser.Recognizer)is responsible for parsing a query string and recognizing tokens in relation to parameters (either named, JPA-style, or ordinal) and providing callbacks about such recognitions.- 作者:
- Steve Ebersole
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static interfaceParameterParser.RecognizerMaybe better named a Journaler.
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static voidparse(String sqlString, ParameterParser.Recognizer recognizer)Performs the actual parsing and tokenizing of the query string making appropriate callbacks to the given recognizer upon recognition of the various tokens.static booleanstartsWithEscapeCallTemplate(String sqlString)Exposed as public solely for use from tests
-
-
-
方法详细资料
-
parse
public static void parse(String sqlString, ParameterParser.Recognizer recognizer) throws QueryException
Performs the actual parsing and tokenizing of the query string making appropriate callbacks to the given recognizer upon recognition of the various tokens. Note that currently, this only knows how to deal with a single output parameter (for callable statements). If we later add support for multiple output params, this, obviously, needs to change.- 参数:
sqlString- The string to be parsed/tokenized.recognizer- The thing which handles recognition events.- 抛出:
QueryException- Indicates unexpected parameter conditions.
-
startsWithEscapeCallTemplate
public static boolean startsWithEscapeCallTemplate(String sqlString)
Exposed as public solely for use from tests- 参数:
sqlString- The SQL string to check- 返回:
- true/false
-
-