Package siena

Examples of siena.QueryFilterSimple


    request.getRootElement().addAttribute("class", clazz.getName());
   
    List<QueryFilter> filters = query.getFilters();
    for (QueryFilter filter : filters) {
      if(QueryFilterSimple.class.isAssignableFrom(filter.getClass())){
        QueryFilterSimple qf = (QueryFilterSimple)filter;

        Field field = qf.field;
        Object value = qf.value;
       
        Element filtr = request.getRootElement().addElement("filter");
View Full Code Here


    if(!filters.isEmpty()) {
      q.append(WHERE);
     
      for (QueryFilter filter : filters) {
        if(QueryFilterSimple.class.isAssignableFrom(filter.getClass())){
          QueryFilterSimple qf = (QueryFilterSimple)filter;
          Field f = qf.field;
          Object value = qf.value;
          String op = qf.operator;
         
          // for order verification in case the order is not on a filtered field
View Full Code Here

    sql.append(JdbcDBUtils.WHERE);
    boolean first = true;
    for (QueryFilter filter : filters) {
      if(QueryFilterSimple.class.isAssignableFrom(filter.getClass())){
        QueryFilterSimple qf = (QueryFilterSimple)filter;
        String op    = qf.operator;
        Object value = qf.value;
        Field f      = qf.field;
 
        if(!first) {
View Full Code Here

    assertEquals(opt, optRestored);
  }
 
  public void testDumpRestoreQueryFilterSimple() {
    Query<PersonLongAutoID> query = pm.createQuery(PersonLongAutoID.class).filter("firstName", "abcde");
    QueryFilterSimple qf = (QueryFilterSimple)query.getFilters().get(0);
    String str = JsonSerializer.serialize(qf).toString();
    assertNotNull(str);
   
    QueryFilterSimple qfRes = (QueryFilterSimple)JsonSerializer.deserialize(QueryFilter.class, Json.loads(str));
    assertNotNull(qfRes);
    assertEquals(qf.operator, qfRes.operator);
    assertEquals(qf.value, qfRes.value);
    assertEquals(qf.field.getName(), qfRes.field.getName());
  }
View Full Code Here

          com.google.appengine.api.datastore.Query q, Key parentKey)
  {
    List<QueryFilter> filters = query.getFilters();
    for (QueryFilter filter : filters) {
      if(QueryFilterSimple.class.isAssignableFrom(filter.getClass())){
        QueryFilterSimple qf = (QueryFilterSimple)filter;
        Field f = qf.field;
        String propertyName = ClassInfo.getColumnNames(f)[0];
        Object value = qf.value;
        FilterOperator op = operators.get(qf.operator);
       
View Full Code Here

TOP

Related Classes of siena.QueryFilterSimple

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.