Examples of save()


Examples of models.Album.save()

     */
    private static void saveAlbumJson() {
        Gson gson = new Gson();
        Album album = gson.fromJson(new InputStreamReader(request.body), Album.class);
        album.replaceDuplicateArtist();
        album.save();
    }

    /**
     * Save album via XML API
     */
 
View Full Code Here

Examples of models.AnotherEntity.save()

      parents = new ArrayList<AnotherEntity>();
  }
  if (parents.size() < 5) {
      for (Integer i = 0; i < 5; i++) {
    AnotherEntity parent = new AnotherEntity();
    parent.save();
    parent.prop = "parent " + parent.id.toString();
    parent.save();
    parents.add(parent);
      }
  }
View Full Code Here

Examples of models.Article.save()

    @Test
    public void addCommentValid() {
        Article article = createArticle("test");
        article.valid = true;
        article.save();
       
        // Non activity for the article
        assertEquals(0, Activity.count("article = ?", article));
       
        ArticleComment c = new ArticleComment(member, article, "Un commentaire");
View Full Code Here

Examples of models.Auction.save()

                                auction.setUserId(new Integer(multi.getParameter("newCat")));
                                auction.setLastPrice(null);
                                auction.setLastUserId(null);
                                auction.setDescription(multi.getParameter("newDesc"));
                               
                                auction.save();
      }
          }
        else if(servletPath.equals("/admin/auctions/update")) {
      if(session.getAttribute("admin") != null && session.getAttribute("admin").equals("true")) {
View Full Code Here

Examples of models.Audience.save()

            if (Audience.findByTitleAndEvent(formAudience.getTitle(),getEvent()) != null) {
                return badRequest(toJson(TransformValidationErrors.transform(Messages.get("error.audience.already.exist"))));
            }

            formAudience.setEvent(getEvent());
            formAudience.save();
        } else {
            // Mise à jour d'un track
            Audience dbAudience = Audience.find.byId(formAudience.getId());
            if (!formAudience.getTitle().equals(dbAudience.getTitle())
                    && Audience.findByTitleAndEvent(formAudience.getTitle(),getEvent()) != null) {
View Full Code Here

Examples of models.AutoTs.save()

        model.content = "hello";
        assertSame(model._getCreated(), 0L);
        assertSame(model._getModified(), 0L);
        long ts = System.currentTimeMillis();
        Thread.sleep(1);
        model.save();
        Logger.info("created: %1$s", model._getCreated());
        assertTrue(model._getCreated() >= ts);
        assertTrue(model._getModified() >= ts);
        Thread.sleep(1);
        ts = System.currentTimeMillis();
View Full Code Here

Examples of models.Bar.save()

        return ok(index.render("Your new application is ready."));
    }

    public static Result addBar() {
        Bar bar = Form.form(Bar.class).bindFromRequest().get();
        bar.save();
        return redirect(routes.Application.index());
    }

    public static Result getBar() {
        List<Bar> bars = Ebean.find(Bar.class).findList();
View Full Code Here

Examples of models.Beer.save()

    public static Result create()
    {
        JsonNode json = request().body().asJson();
        Beer beer = Json.fromJson(json, Beer.class);

        beer.save();

        return ok(Json.toJson(beer));

    }
View Full Code Here

Examples of models.Category.save()

        File f = multi.getFile("newLogo");
        String fileName = multi.getFilesystemName("newLogo");

        category.setImgPath(fileName);
        category.save();
      }
          }
    else if(servletPath.equals("/admin/categories/update")) {
      if(session.getAttribute("admin") != null && session.getAttribute("admin").equals("true")) {
View Full Code Here

Examples of models.City.save()


  public static void saveEntityTriggerJob() {
    final City city = new City();
    city.name = "cityNameJobLater";
    city.save();

    p = new Job() {
      public void doJob() throws Exception {
        City mycity = City.findById(city.id);
        resultName = mycity.name;
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.