Package org.teiid.query.sql.proc

Examples of org.teiid.query.sql.proc.HasCriteria


       
        CriteriaSelector critSelector = new CriteriaSelector();
        critSelector.setSelectorType(CriteriaSelector.LIKE);
        critSelector.setElements(elements);
       
        HasCriteria hasSelector = new HasCriteria();
        hasSelector.setSelector(critSelector);
       
        helpCriteriaTest("HAS LIKE CRITERIA ON (a)", "HAS LIKE CRITERIA ON (a)", //$NON-NLS-1$ //$NON-NLS-2$
            hasSelector);
   
View Full Code Here


       
        CriteriaSelector critSelector = new CriteriaSelector();
        critSelector.setSelectorType(CriteriaSelector.COMPARE_EQ);
        critSelector.setElements(elements);
       
        HasCriteria hasSelector = new HasCriteria();
        hasSelector.setSelector(critSelector);
       
        helpCriteriaTest("HAS = CRITERIA ON (a)", "HAS = CRITERIA ON (a)", //$NON-NLS-1$ //$NON-NLS-2$
            hasSelector);
    }   
View Full Code Here

       
        CriteriaSelector critSelector = new CriteriaSelector();
        critSelector.setSelectorType(CriteriaSelector.COMPARE_NE);
        critSelector.setElements(elements);
       
        HasCriteria hasSelector = new HasCriteria();
        hasSelector.setSelector(critSelector);
       
        helpCriteriaTest("HAS <> CRITERIA ON (a)", "HAS <> CRITERIA ON (a)", //$NON-NLS-1$ //$NON-NLS-2$
            hasSelector);
    }   
View Full Code Here

       
        CriteriaSelector critSelector = new CriteriaSelector();
        critSelector.setSelectorType(CriteriaSelector.IN);
        critSelector.setElements(elements);
       
        HasCriteria hasSelector = new HasCriteria();
        hasSelector.setSelector(critSelector);
       
        helpCriteriaTest("HAS IN CRITERIA ON (a)", "HAS IN CRITERIA ON (a)", //$NON-NLS-1$ //$NON-NLS-2$
            hasSelector);
    }  
View Full Code Here

       
        CriteriaSelector critSelector = new CriteriaSelector();
        critSelector.setSelectorType(CriteriaSelector.COMPARE_LT);
        critSelector.setElements(elements);
       
        HasCriteria hasSelector = new HasCriteria();
        hasSelector.setSelector(critSelector);
       
        helpCriteriaTest("HAS < CRITERIA ON (a)", "HAS < CRITERIA ON (a)", //$NON-NLS-1$ //$NON-NLS-2$
            hasSelector);
    }  
View Full Code Here

 
 
  // ################################## TEST HELPERS ################################ 

  public static final HasCriteria sample1() {
    HasCriteria hc = new HasCriteria(TestCriteriaSelector.sample1());
      return hc;
  }
View Full Code Here

    HasCriteria hc = new HasCriteria(TestCriteriaSelector.sample1());
      return hc;
  }

  public static final HasCriteria sample2() {
    HasCriteria hc = new HasCriteria(TestCriteriaSelector.sample2());
      return hc;
  }
View Full Code Here

  }
 
  // ################################## ACTUAL TESTS ################################ 

  public void testGetCriteriaSelector() {
    HasCriteria hc1 = sample1();
    assertEquals("Incorrect criteria selector obtained", hc1.getSelector(), TestCriteriaSelector.sample1()); //$NON-NLS-1$
  }
View Full Code Here

    HasCriteria hc1 = sample1();
    assertEquals("Incorrect criteria selector obtained", hc1.getSelector(), TestCriteriaSelector.sample1()); //$NON-NLS-1$
  }
 
  public void testSetCriteriaSelector() {
    HasCriteria hc1 = (HasCriteria) sample1().clone();
    hc1.setSelector(TestCriteriaSelector.sample2());
    assertEquals("Incorrect criteria selector obtained", hc1.getSelector(), TestCriteriaSelector.sample2()); //$NON-NLS-1$
 
View Full Code Here

    hc1.setSelector(TestCriteriaSelector.sample2());
    assertEquals("Incorrect criteria selector obtained", hc1.getSelector(), TestCriteriaSelector.sample2()); //$NON-NLS-1$
 
 
  public void testSelfEquivalence(){
    HasCriteria s1 = sample1();
    int equals = 0;
    UnitTestUtil.helpTestEquivalence(equals, s1, s1);
  }
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.proc.HasCriteria

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.