Examples of save()


Examples of models.CompositeIdEntity.save()

        b.testId = "Hello from B";
      b.save();
      CompositeIdEntity e = new CompositeIdEntity();
      e.compositeIdForeignA = a;
      e.compositeIdForeignB = b;
      e.save();

      Map<String, String[]> params = new HashMap<String, String[]>();
      params.put("object.compositeIdForeignA.id", new String[]{a.id.toString()});
      params.put("object.compositeIdForeignB.id", new String[]{b.id.toString()});
    CompositeIdEntity bound = (CompositeIdEntity)Binder.bind("object", CompositeIdEntity.class, CompositeIdEntity.class, null, params);
View Full Code Here

Examples of models.CompositeIdForeignA.save()

    @Test
    public void testBinderFound() {
      CompositeIdForeignA a = new CompositeIdForeignA();
        a.testId = "Hello from A";
      a.save();
      CompositeIdForeignB b = new CompositeIdForeignB();
        b.testId = "Hello from B";
      b.save();
      CompositeIdEntity e = new CompositeIdEntity();
      e.compositeIdForeignA = a;
View Full Code Here

Examples of models.CompositeIdForeignB.save()

      CompositeIdForeignA a = new CompositeIdForeignA();
        a.testId = "Hello from A";
      a.save();
      CompositeIdForeignB b = new CompositeIdForeignB();
        b.testId = "Hello from B";
      b.save();
      CompositeIdEntity e = new CompositeIdEntity();
      e.compositeIdForeignA = a;
      e.compositeIdForeignB = b;
      e.save();
View Full Code Here

Examples of models.ContentTag.save()

     
       Tag sharedTag = Tag.findOrCreateByName("shared", receiver);
        for(SharedContent sharedContent : sharedContents) {
          if(Content.ContentType.PHOTO == sharedContent.type) {
            ContentTag contentTag = new ContentTag(sharedContent.id, Content.ContentType.PHOTO, sharedTag);
            contentTag.save();
          }
        }
        Notification notification = new Notification();
        if(from.basic_information != null) {
          StringBuffer textSb = new StringBuffer();
View Full Code Here

Examples of models.Credentials.save()

            if (oAuth2.refreshToken().isDefined()) {
                credentials.oAuth2RefreshToken = oAuth2.refreshToken().get();
            }
        }
        credentials.user = user;
        credentials.save();

        return user;
    }

    private Identity userToIdentity(User user, IdentityId id) {
View Full Code Here

Examples of models.DailyUsageStats.save()

                Date cur = new DateTime().plusDays(i).toDate();
                us.created = cur;
                us.save();
                dus.created = cur;
                dus.save();
            }
            Logger.warn("Done generating fake data.");
        }

        User user = Login.getUser();
View Full Code Here

Examples of models.DiscoveryLifeCycle.save()

   
    d.insert();
    d.name = "name2";
    d.update();
    d.name = "name3";
    d.save();
    d.get();
    d.delete();
   
    render();
  }
View Full Code Here

Examples of models.DynamicField.save()

        if (formDynamicField.getId() == null) {
            // Nouveau dynamicField
            if (DynamicField.findByName(formDynamicField.getName()) != null) {
                return badRequest(toJson(TransformValidationErrors.transform(Messages.get("error.dynamicField.already.exist"))));
            }
            formDynamicField.save();
        } else {
            // Mise à jour d'un dynamicField
            DynamicField dbDynamicField = DynamicField.find.byId(formDynamicField.getId());
            if (!formDynamicField.getName().equals(dbDynamicField.getName())
                    && DynamicField.findByName(formDynamicField.getName()) != null) {
View Full Code Here

Examples of models.Element.save()

        List<models.ElementBase> eb = models.ElementBase.find.all();
        if(filledForm.hasErrors()) {
            return badRequest(edit.render(eb,nature,filledForm));
        } else {
            Element created = filledForm.get();
            created.save();
            return ok(edit.render(eb,nature,elementForm.fill(created)));
        }
  }
}
View Full Code Here

Examples of models.Entity2.save()

            Validation.clear();
            ParamNode rootParamNode = ParamNode.convert(params.all());
            entity2.edit(rootParamNode, "entity2");
            assertFalse(Validation.hasErrors());

            entity2.save();
            entity2.refresh();

            assertEquals("testNewEntity2", entity2.a);
            assertEquals(true, entity2.b);
            assertEquals(1, entity2.c);
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.