com.googlecode.cqengine.query.parser.sql
Class SQLParser<O>
java.lang.Object
com.googlecode.cqengine.query.parser.common.QueryParser<O>
com.googlecode.cqengine.query.parser.sql.SQLParser<O>
public class SQLParser<O>
- extends QueryParser<O>
A parser for SQL queries.
- Author:
- Niall Gallagher
Method Summary |
static
|
forPojo(Class<O> pojoClass)
Creates a new SQLParser for the given POJO class. |
static
|
forPojoWithAttributes(Class<O> pojoClass,
Map<String,? extends Attribute<O,?>> attributes)
Creates a new SQLParser for the given POJO class, and registers the given attributes with it. |
ParseResult<O> |
parse(String query)
Parses the given query and its query options, encapsulating both in the object returned. |
Methods inherited from class com.googlecode.cqengine.query.parser.common.QueryParser |
getAttribute, getObjectType, parseValue, parseValue, parseValue, query, queryOptions, registerAttribute, registerAttributes, registerAttributes, registerFallbackValueParser, registerValueParser, retrieve |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQLParser
public SQLParser(Class<O> objectType)
parse
public ParseResult<O> parse(String query)
- Description copied from class:
QueryParser
- Parses the given query and its query options, encapsulating both in the object returned.
- Specified by:
parse
in class QueryParser<O>
- Parameters:
query
- The query to parse
- Returns:
- An object encapsulating the parsed query and its query options
forPojo
public static <O> SQLParser<O> forPojo(Class<O> pojoClass)
- Creates a new SQLParser for the given POJO class.
- Parameters:
pojoClass
- The type of object stored in the collection
- Returns:
- a new SQLParser for the given POJO class
forPojoWithAttributes
public static <O> SQLParser<O> forPojoWithAttributes(Class<O> pojoClass,
Map<String,? extends Attribute<O,?>> attributes)
- Creates a new SQLParser for the given POJO class, and registers the given attributes with it.
- Parameters:
pojoClass
- The type of object stored in the collectionattributes
- The attributes to register with the parser
- Returns:
- a new SQLParser for the given POJO class
Copyright © 2016. All rights reserved.