Search in sources :

Example 6 with SelectorParsingException

use of org.apache.qpid.server.filter.SelectorParsingException in project qpid-broker-j by apache.

the class ConfiguredObjectQueryTest method testArithmeticStatementInOrderBy.

public void testArithmeticStatementInOrderBy() {
    final List<OrderByExpression> orderByExpressions;
    String orderByClause = "a + b";
    ConfiguredObjectFilterParser parser = new ConfiguredObjectFilterParser();
    parser.setConfiguredObjectExpressionFactory(new ConfiguredObjectExpressionFactory());
    try {
        orderByExpressions = parser.parseOrderBy(orderByClause);
        assertEquals(1, orderByExpressions.size());
    } catch (ParseException | TokenMgrError e) {
        throw new SelectorParsingException("Unable to parse orderBy clause", e);
    }
}
Also used : SelectorParsingException(org.apache.qpid.server.filter.SelectorParsingException) OrderByExpression(org.apache.qpid.server.filter.OrderByExpression)

Aggregations

SelectorParsingException (org.apache.qpid.server.filter.SelectorParsingException)6 OrderByExpression (org.apache.qpid.server.filter.OrderByExpression)3 ArrayList (java.util.ArrayList)2 Map (java.util.Map)2 BooleanExpression (org.apache.qpid.server.filter.BooleanExpression)2 Expression (org.apache.qpid.server.filter.Expression)2 ConfiguredObject (org.apache.qpid.server.model.ConfiguredObject)2 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 ConcurrentLinkedQueue (java.util.concurrent.ConcurrentLinkedQueue)1 ConsumerOption (org.apache.qpid.server.consumer.ConsumerOption)1 FilterManager (org.apache.qpid.server.filter.FilterManager)1 JMSSelectorFilter (org.apache.qpid.server.filter.JMSSelectorFilter)1 ParseException (org.apache.qpid.server.filter.selector.ParseException)1 TokenMgrError (org.apache.qpid.server.filter.selector.TokenMgrError)1 ConfiguredObjectQuery (org.apache.qpid.server.management.plugin.servlet.query.ConfiguredObjectQuery)1 EvaluationException (org.apache.qpid.server.management.plugin.servlet.query.EvaluationException)1 MessageSource (org.apache.qpid.server.message.MessageSource)1 Model (org.apache.qpid.server.model.Model)1