Package com.gwtmobile.persistence.client

Examples of com.gwtmobile.persistence.client.Callback


      }
    });           
  }
 
  public void testEntityFindByChar() {
    setupTest(new Callback() {
      public void onSuccess() {
        taskEntity.findBy(null, "Alphabet", 'C', new ScalarCallback<Task>(){
          @Override
          public void onSuccess(final Task result1) {
            assertNotNull(result1);
View Full Code Here


      }
    });
  }

  public void testEntityFindByDate() {
    setupTest(new Callback() {
      @SuppressWarnings("deprecation")
      public void onSuccess() {
        taskEntity.findBy(null, "CompleteDate", new Date("2010/12/01"), new ScalarCallback<Task>(){
          @Override
          public void onSuccess(final Task result1) {
View Full Code Here

      }
    });
  }
 
  public void testEntityFindByInteger() {
    setupTest(new Callback() {
      public void onSuccess() {
        taskEntity.findBy(null, "Priority", 2, new ScalarCallback<Task>(){
          @Override
          public void onSuccess(final Task result1) {
            assertNotNull(result1);
View Full Code Here

      }
    });
  }
 
  public void testEntityFindByDouble() {
    setupTest(new Callback() {
      public void onSuccess() {
        taskEntity.findBy(null, "Profit", 24.68, new ScalarCallback<Task>(){
          @Override
          public void onSuccess(final Task result1) {
            assertNotNull(result1);
View Full Code Here

      }
    });
  }
 
  public void testEntityFindByString() {
    setupTest(new Callback() {
      public void onSuccess() {
        taskEntity.findBy(null, "Name", "Task3", new ScalarCallback<Task>(){
          @Override
          public void onSuccess(final Task result1) {
            assertNotNull(result1);
View Full Code Here

      }
    });
  }
 
  public void testEntityFindByBoolean() {
    setupTest(new Callback() {
      public void onSuccess() {
        taskEntity.findBy(null, "Done", true, new ScalarCallback<Task>(){
          @Override
          public void onSuccess(final Task result1) {
            assertNotNull(result1);
View Full Code Here

      }
    });
  }
 
  public void testInstanceId() {
    setupTest(new Callback() {
      public void onSuccess() {
        taskEntity.all().one(new ScalarCallback<Task>() {         
          @Override
          public void onSuccess(Task result) {
            System.out.print(result.getId());
View Full Code Here

      }
    });           
  }

  public void testInstanceFetch() {
    setupTest(new Callback() {
      public void onSuccess() {       
        taskEntity.all().list(new CollectionCallback<Task>() {         
          @Override
          public void onSuccess(Task[] results) {
            results[0].fetch(null, categoryEntity, new ScalarCallback<Category>() {
View Full Code Here

      }
    });
  }

  public void testInstanceSelectJSON() {
    setupTest(new Callback() {
      public void onSuccess() {       
        taskEntity.all().list(new CollectionCallback<Task>() {         
          @Override
          public void onSuccess(Task[] results) {
            results[0].selectJSON(null, new String[] {"Name", "Description"}, new ScalarCallback<String>() {             
View Full Code Here

      }
    });
  }
 
  public void testDumpAndLoad() {
    setupTest(new Callback() {
      public void onSuccess() {
        Persistence.dumpToJson(null, new Entity[] {tagEntity, categoryEntity}, new ScalarCallback<String>() {         
          @Override
          public void onSuccess(final String jsonDump) {
            System.out.print(jsonDump);
            destroyAllData(new Callback() {                     
              @Override
              public void onSuccess() {
                Persistence.loadFromJson(null, jsonDump, new Callback() {                         
                  @Override
                  public void onSuccess() {
                    tagEntity.all().count(new ScalarCallback<Integer>() {                             
                      @Override
                      public void onSuccess(Integer result) {
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.