org.eobjects.metamodel.query.parser
Class SelectItemParser

java.lang.Object
  extended by org.eobjects.metamodel.query.parser.SelectItemParser
All Implemented Interfaces:
QueryPartProcessor

public final class SelectItemParser
extends Object
implements QueryPartProcessor


Nested Class Summary
static class SelectItemParser.MultipleSelectItemsParsedException
           
 
Constructor Summary
SelectItemParser(Query query, boolean allowExpressionBasedSelectItems)
           
 
Method Summary
 SelectItem findSelectItem(String expression)
          Finds/creates a SelectItem based on the given expression.
 void parse(String delim, String itemToken)
          Method invoked whenever the QueryPartParser identifies a token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectItemParser

public SelectItemParser(Query query,
                        boolean allowExpressionBasedSelectItems)
Method Detail

parse

public void parse(String delim,
                  String itemToken)
           throws MetaModelException
Description copied from interface: QueryPartProcessor
Method invoked whenever the QueryPartParser identifies a token.

Specified by:
parse in interface QueryPartProcessor
Parameters:
delim - the (previous) delimitor identified before the token. This will always be null in case of the first token.
itemToken - the token identified.
Throws:
MetaModelException

findSelectItem

public SelectItem findSelectItem(String expression)
                          throws SelectItemParser.MultipleSelectItemsParsedException
Finds/creates a SelectItem based on the given expression. Unlike the parse(String, String) method, this method will not actually add the selectitem to the query.

Parameters:
expression -
Returns:
Throws:
SelectItemParser.MultipleSelectItemsParsedException - if an expression yielding multiple select-items (such as "*") was passed in the expression


Copyright © 2007-2013. All Rights Reserved.