Examples of persistAndReturnSelf()


Examples of com.google.web.bindery.requestfactory.shared.SimpleFooRequest.persistAndReturnSelf()

    simpleFooRequest().findSimpleFooById(999L).fire(new Receiver<SimpleFooProxy>() {
      @Override
      public void onSuccess(SimpleFooProxy fooProxy) {
        fooProxy = checkSerialization(fooProxy);
        SimpleFooRequest context = simpleFooRequest();
        Request<SimpleFooProxy> updReq = context.persistAndReturnSelf().using(fooProxy);
        fooProxy = context.edit(fooProxy);
        final ArrayList<Integer> al = new ArrayList<Integer>();
        al.add(5);
        al.add(8);
        al.add(13);
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.SimpleFooRequest.persistAndReturnSelf()

    simpleFooRequest().findSimpleFooById(999L).fire(new Receiver<SimpleFooProxy>() {
      @Override
      public void onSuccess(SimpleFooProxy fooProxy) {
        fooProxy = checkSerialization(fooProxy);
        SimpleFooRequest context = simpleFooRequest();
        Request<SimpleFooProxy> updReq = context.persistAndReturnSelf().using(fooProxy);
        fooProxy = context.edit(fooProxy);
        final ArrayList<Integer> al = new ArrayList<Integer>();
        List<Integer> listField = fooProxy.getNumberListField();
        al.addAll(listField);
        Collections.reverse(listField);
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.SimpleFooRequest.persistAndReturnSelf()

    simpleFooRequest().findSimpleFooById(999L).fire(new Receiver<SimpleFooProxy>() {
      @Override
      public void onSuccess(SimpleFooProxy fooProxy) {
        fooProxy = checkSerialization(fooProxy);
        SimpleFooRequest context = simpleFooRequest();
        Request<SimpleFooProxy> updReq = context.persistAndReturnSelf().using(fooProxy);
        fooProxy = context.edit(fooProxy);
        fooProxy.getNumberListField().set(0, 10);
        updReq.fire(new Receiver<SimpleFooProxy>() {
          @Override
          public void onSuccess(SimpleFooProxy response) {
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.SimpleFooRequest.persistAndReturnSelf()

              @Override
              public void onSuccess(SimpleFooProxy fooProxy) {
                fooProxy = checkSerialization(fooProxy);
                SimpleFooRequest context = simpleFooRequest();
                Request<SimpleFooProxy> updReq =
                    context.persistAndReturnSelf().using(fooProxy).with("oneToManySetField");
                fooProxy = context.edit(fooProxy);

                Set<SimpleBarProxy> setField = fooProxy.getOneToManySetField();
                final int listCount = setField.size();
                setField.add(barProxy);
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.SimpleFooRequest.persistAndReturnSelf()

              @Override
              public void onSuccess(SimpleFooProxy fooProxy) {
                fooProxy = checkSerialization(fooProxy);
                SimpleFooRequest context = simpleFooRequest();
                Request<SimpleFooProxy> updReq =
                    context.persistAndReturnSelf().using(fooProxy).with("oneToManySetField");
                fooProxy = context.edit(fooProxy);

                Set<SimpleBarProxy> setField = fooProxy.getOneToManySetField();
                final int listCount = setField.size();
                assertContains(setField, barProxy);
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.SimpleFooRequest.persistAndReturnSelf()

              @Override
              public void onSuccess(SimpleFooProxy fooProxy) {
                fooProxy = checkSerialization(fooProxy);
                SimpleFooRequest context = simpleFooRequest();
                Request<SimpleFooProxy> updReq =
                    context.persistAndReturnSelf().using(fooProxy).with("oneToManySetField");
                fooProxy = context.edit(fooProxy);

                Set<SimpleBarProxy> setField = fooProxy.getOneToManySetField();
                final int listCount = setField.size();
                assertContains(setField, barProxy);
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.SimpleFooRequest.persistAndReturnSelf()

  public void testServerFailureCheckedException() {
    delayTestFinish(DELAY_TEST_FINISH);

    SimpleFooRequest context = simpleFooRequest();
    SimpleFooProxy newFoo = context.create(SimpleFooProxy.class);
    final Request<SimpleFooProxy> persistRequest = context.persistAndReturnSelf().using(newFoo);
    final SimpleFooProxy mutableFoo = context.edit(newFoo);
    // 43 is the crash causing magic number for a checked exception
    mutableFoo.setPleaseCrash(43);
    persistRequest.fire(new SimpleFooFailureReceiver(mutableFoo, persistRequest, null));
  }
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.SimpleFooRequest.persistAndReturnSelf()

  public void testServerFailureRuntimeException() {
    delayTestFinish(DELAY_TEST_FINISH);
    SimpleFooRequest context = simpleFooRequest();
    SimpleFooProxy newFoo = context.create(SimpleFooProxy.class);
    final Request<SimpleFooProxy> persistRequest = context.persistAndReturnSelf().using(newFoo);
    final SimpleFooProxy mutableFoo = context.edit(newFoo);
    // 42 is the crash causing magic number for a runtime exception
    mutableFoo.setPleaseCrash(42);
    persistRequest.fire(new SimpleFooFailureReceiver(mutableFoo, persistRequest, null));
  }
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.SimpleFooRequest.persistAndReturnSelf()

            // Set
            foo.setSimpleValue(created);
            foo.setSimpleValues(Collections.singletonList(created));

            // Retrieve
            context.persistAndReturnSelf().using(foo).with("simpleValue.simpleFoo",
                "simpleValue.simpleValue").fire(new Receiver<SimpleFooProxy>() {
              @Override
              public void onSuccess(SimpleFooProxy foo) {
                foo = checkSerialization(foo);
                SimpleFooRequest context = simpleFooRequest();
View Full Code Here

Examples of com.google.web.bindery.requestfactory.shared.SimpleFooRequest.persistAndReturnSelf()

    SimpleFooRequest context = simpleFooRequest();
    final SimpleFooProxy foo = context.create(SimpleFooProxy.class);
    final EntityProxyId<SimpleFooProxy> futureId = foo.stableId();
    assertTrue(((SimpleEntityProxyId<?>) futureId).isEphemeral());
    Request<SimpleFooProxy> fooReq = context.persistAndReturnSelf().using(foo);
    fooReq.fire(new Receiver<SimpleFooProxy>() {

      @Override
      public void onSuccess(SimpleFooProxy returned) {
        returned = checkSerialization(returned);
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.