Package com.gwtmobile.persistence.client

Examples of com.gwtmobile.persistence.client.Callback


      }
    });           
  }
 
  public void testPropertyFilterChar() {
    setupTest(new Callback() {
      public void onSuccess() {       
        taskEntity.all().filter("Alphabet", "=", 'A')
        .or(Persistence.newPropertyFilter("Alphabet", "=", 'C'))
        .list(new CollectionCallback<Task>() {         
          @Override
View Full Code Here


      }
    });
  }

  public void testPropertyFilterBoolean() {
    setupTest(new Callback() {
      public void onSuccess() {       
        taskEntity.all().filter("Name", "=", "Task1")
        .or(Persistence.newPropertyFilter("Done", "=", true))
        .list(new CollectionCallback<Task>() {         
          @Override
View Full Code Here

      }
    });
  }

  public void testPropertyFilterInteger() {
    setupTest(new Callback() {
      public void onSuccess() {       
        taskEntity.all().filter("Done", "!=", true)
        .or(Persistence.newPropertyFilter("Priority", ">", 2))
        .list(new CollectionCallback<Task>() {         
          @Override
View Full Code Here

      }
    });
  }

  public void testPropertyFilterDouble() {
    setupTest(new Callback() {
      public void onSuccess() {       
        taskEntity.all().filter("Priority", ">", 2)
        .or(Persistence.newPropertyFilter("Profit", ">", 24.6))
        .list(new CollectionCallback<Task>() {         
          @Override
View Full Code Here

      }
    });
  }

  public void testPropertyFilterString() {
    setupTest(new Callback() {
      public void onSuccess() {       
        taskEntity.all().filter("Profit", ">", 24.1)
        .or(Persistence.newPropertyFilter("Name", "=", "Task1"))
        .list(new CollectionCallback<Task>() {         
          @Override
View Full Code Here

      }
    });
  }

  public void testPropertyFilterDate() {
    setupTest(new Callback() {
      public void onSuccess() {       
        taskEntity.all().filter("Alphabet", "=", 'A')
        .or(Persistence.newPropertyFilter("CompleteDate", "<", new Date()))
        .list(new CollectionCallback<Task>() {         
          @Override
View Full Code Here

      }
    });
  }

  public void testOrFilter() {
    setupTest(new Callback() {
      public void onSuccess() {       
        taskEntity.all().filter("Alphabet", "=", 'A')
        .or(Persistence.newOrFilter(
            Persistence.newPropertyFilter("Alphabet", "=", 'C'),
            Persistence.newPropertyFilter("Alphabet", "=", 'E')))
View Full Code Here

      }
    });
  }

  public void testAndFilter() {
    setupTest(new Callback() {
      @SuppressWarnings("deprecation")
      public void onSuccess() {       
        taskEntity.all().filter("Alphabet", ">", 'C')
        .and(Persistence.newAndFilter(
            Persistence.newPropertyFilter("Done", "=", true),
View Full Code Here

      }
    });
  }

  public void testIndex() {
    setupTest(new Callback() {
      public void onSuccess() {       
        taskEntity.index("Name");
        Persistence.schemaSync(new Callback() {         
          @Override
          public void onSuccess() {
            tearDownTest();
          }
        });
View Full Code Here

      }
    });
  }

  public void testIndexUnique() {
    setupTest(new Callback() {
      public void onSuccess() {       
        taskEntity.index("Name", true);
        Persistence.schemaSync(new Callback() {         
          @Override
          public void onSuccess() {
            tearDownTest();
          }
        });
View Full Code Here

TOP

Related Classes of com.gwtmobile.persistence.client.Callback

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.