Package org.jboss.jms.selector

Examples of org.jboss.jms.selector.Operator


   public void testAndCombination()
   {
      try
      {
         log.trace("parse(JMSType = 'car' AND color = 'blue' AND weight > 2500)");
         Operator result = (Operator)parser.parse("JMSType = 'car' AND color = 'blue' AND weight > 2500", identifierMap);
         ((Identifier) identifierMap.get("JMSType")).setValue("car");
         ((Identifier) identifierMap.get("color")).setValue("blue");
         ((Identifier) identifierMap.get("weight")).setValue("3000");
        
         log.trace("result -> "+result);
         Boolean bool = (Boolean) result.apply();
         assertTrue("is false", !bool.booleanValue());
      } catch (Exception e)
      {
         log.trace("failed", e);
         fail(""+e);
View Full Code Here


   public void testINANDCombination()
   {
      try
      {
         log.trace("parse(Cateogry IN ('category1') AND Rating >= 2");
         Operator result = (Operator)parser.parse("Cateogry IN ('category1') AND Rating >= 2", identifierMap);
         ((Identifier) identifierMap.get("Cateogry")).setValue("category1");
         ((Identifier) identifierMap.get("Rating")).setValue(new Integer(3));
         log.trace("result -> "+result);
         Boolean bool = (Boolean) result.apply();
         assertTrue("is true", bool.booleanValue());
      } catch (Exception e)
      {
         log.trace("failed", e);
         fail(""+e);
View Full Code Here

TOP

Related Classes of org.jboss.jms.selector.Operator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.