Examples of Between


Examples of com.intersys.gds.query.Between

    * @param from second query from parameter
    * @param to second query to parameter
    */
  public  void and(String key1, String pattern, String key2, int from, int to) {
        System.out.println("key1.startsWith(pattern) AND key2.between(from,to) query.");
        Query query = new And(new StartsWith(key1,pattern),new Between(key2,from,to));
        executeQuery(query);
    }
View Full Code Here

Examples of com.intersys.gds.query.Between

    * @param from from value
    * @param to to value
    */
  public  void between(String key, int from, int to) {
        System.out.println("Between query. Key = " + key +" between: " + from + " and " + to);
        Query query = new Between(key,from,to);
        query.limit(15);
        executeQuery(query);
    }
View Full Code Here

Examples of com.j256.ormlite.stmt.query.Between

  /**
   * Add a BETWEEN clause so the column must be between the low and high parameters.
   */
  public Where<T, ID> between(String columnName, Object low, Object high) throws SQLException {
    addClause(new Between(columnName, findColumnFieldType(columnName), low, high));
    return this;
  }
View Full Code Here

Examples of com.j256.ormlite.stmt.query.Between

  /**
   * Add a BETWEEN clause so the column must be between the low and high parameters.
   */
  public Where<T, ID> between(String columnName, Object low, Object high) throws SQLException {
    addClause(new Between(columnName, findColumnFieldType(columnName), low, high));
    return this;
  }
View Full Code Here

Examples of com.vaadin.data.util.filter.Between

    }

    @Test
    public void getWhereStringForFilter_between() {
        StatementHelper sh = mockedStatementHelper(18, 65);
        Between f = new Between("AGE", 18, 65);
        Assert.assertEquals("\"AGE\" BETWEEN ? AND ?",
                QueryBuilder.getWhereStringForFilter(f, sh));
        EasyMock.verify(sh);
    }
View Full Code Here

Examples of com.vaadin.data.util.filter.Between

    }

    @Test
    public void passesFilter_valueIsInRange_shouldBeTrue() {
        Item item = itemWithPropertyValue("foo", 15);
        Between between = new Between("foo", 1, 30);
        Assert.assertTrue(between.passesFilter("foo", item));
    }
View Full Code Here

Examples of com.vaadin.data.util.filter.Between

    }

    @Test
    public void passesFilter_valueIsOutOfRange_shouldBeFalse() {
        Item item = itemWithPropertyValue("foo", 15);
        Between between = new Between("foo", 0, 2);
        Assert.assertFalse(between.passesFilter("foo", item));
    }
View Full Code Here

Examples of com.vaadin.data.util.filter.Between

    }

    @Test
    public void passesFilter_valueNotComparable_shouldBeFalse() {
        Item item = itemWithPropertyValue("foo", new Object());
        Between between = new Between("foo", 0, 2);
        Assert.assertFalse(between.passesFilter("foo", item));
    }
View Full Code Here

Examples of com.vaadin.data.util.filter.Between

        Assert.assertFalse(between.passesFilter("foo", item));
    }

    @Test
    public void appliesToProperty_differentProperties_shoudlBeFalse() {
        Between between = new Between("foo", 0, 2);
        Assert.assertFalse(between.appliesToProperty("bar"));
    }
View Full Code Here

Examples of com.vaadin.data.util.filter.Between

        Assert.assertFalse(between.appliesToProperty("bar"));
    }

    @Test
    public void appliesToProperty_sameProperties_shouldBeTrue() {
        Between between = new Between("foo", 0, 2);
        Assert.assertTrue(between.appliesToProperty("foo"));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.