Package com.gwtmobile.persistence.client

Examples of com.gwtmobile.persistence.client.Callback


      }
    });
  }

  public void testIndexMultiCols() {
    setupTest(new Callback() {
      public void onSuccess() {       
        taskEntity.index(new String[] {"Name", "Done"});
        Persistence.schemaSync(new Callback() {         
          @Override
          public void onSuccess() {
            tearDownTest();
          }
        });
View Full Code Here


      }
    });
  }

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

    taskEntity = GWT.create(Task.class);
    tagEntity = GWT.create(Tag.class);
    categoryEntity = GWT.create(Category.class);

    Persistence.schemaSync(new Callback() {
      @SuppressWarnings("deprecation")
      public void onSuccess()
      {
        destroyAllData(new Callback() {           
          @Override
          public void onSuccess() {
            final Category c = categoryEntity.newInstance();
            c.setName("Main");
            final Tag tag = tagEntity.newInstance();
View Full Code Here

    });
    delayTestFinish(5000);
  }

  private void destroyAllData(final Callback callback) {
    taskEntity.all().destroyAll(new Callback() {             
      @Override
      public void onSuccess() {
        tagEntity.all().destroyAll(new Callback() {                 
          @Override
          public void onSuccess() {
            categoryEntity.all().destroyAll(new Callback() {                     
              @Override
              public void onSuccess() {
                Persistence.flush(callback);
              }
            });
View Full Code Here

      }
    });
  }
 
  private void tearDownTest() {
    Persistence.reset(new Callback() {     
      @Override
      public void onSuccess() {
        finishTest();
      }
    });   
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.