Examples of save()


Examples of models.Talk.save()

    private Talk createTalk(Member... speakers) {
        Talk t = new Talk();
        for (Member s : speakers) {
            t.addSpeaker(s);
        }
        return t.save();
    }

    private LightningTalk createLT(Member... speakers) {
        LightningTalk lt = new LightningTalk();
        for (Member s : speakers) {
View Full Code Here

Examples of models.TalkFormat.save()

            // Nouveau format
            if (TalkFormat.findByLibelle(formFormat.getLibelle(),getEvent()) != null) {
                return badRequest(toJson(TransformValidationErrors.transform(Messages.get("error.format.already.exist"))));
            }
            formFormat.setEvent(getEvent());
            formFormat.save();
        } else {
            // Mise à jour d'un format
            TalkFormat dbFormat = TalkFormat.find.byId(formFormat.getId());
            if (!formFormat.getLibelle().equals(dbFormat.getLibelle())
                    && TalkFormat.findByLibelle(formFormat.getLibelle(),getEvent()) != null) {
View Full Code Here

Examples of models.Tick.save()

        Application application = new DefaultApplication(new File(args[0]), TickJob.class.getClassLoader(), null, Mode.Prod());

        Play.start(application);

        Tick tick = new Tick("Hello from the TickJob");
        tick.save();
       
        Play.stop();
    }

}
View Full Code Here

Examples of models.ToDo.save()

            for (JsonNode node: json)
            {
                ToDo incoming = Json.fromJson(node, ToDo.class);
                if (incoming.id == null)
                {
                    incoming.save();
                }
                else
                {
                    incoming.update();
                }
View Full Code Here

Examples of models.Track.save()

            }
            if (Track.findByShortTitleAndEvent(formTrack.getShortTitle(),getEvent()) != null) {
                return badRequest(toJson(TransformValidationErrors.transform(Messages.get("error.track.shortTitle.already.exist"))));
            }
            formTrack.setEvent(getEvent());
            formTrack.save();
        } else {
            // Mise à jour d'un track
            Track dbTrack = Track.find.byId(formTrack.getId());
            if (!formTrack.getTitle().equals(dbTrack.getTitle())
                    && Track.findByTitleAndEvent(formTrack.getTitle(),getEvent()) != null) {
View Full Code Here

Examples of models.TransactionAccountFromModel.save()

    TransactionAccountToModel accTo = TransactionAccountToModel.getByKey(TransactionAccountToModel.class, accToId);

    try {
      accFrom.getPersistenceManager().beginTransaction();
      accFrom.amount-=100L;
      accFrom.save();
      accTo.amount+=100L;
      accTo.save();
      accFrom.getPersistenceManager().commitTransaction();
    }catch(SienaException e){
      accFrom.getPersistenceManager().rollbackTransaction();
View Full Code Here

Examples of models.TransactionAccountToModel.save()

    try {
      accFrom.getPersistenceManager().beginTransaction();
      accFrom.amount-=100L;
      accFrom.save();
      accTo.amount+=100L;
      accTo.save();
      accFrom.getPersistenceManager().commitTransaction();
    }catch(SienaException e){
      accFrom.getPersistenceManager().rollbackTransaction();
    }finally{
      accFrom.getPersistenceManager().closeConnection();
View Full Code Here

Examples of models.UsageStats.save()

                DailyUsageStats dus = new DailyUsageStats(dUsers, dRules, dFileMoves, dUniqueFileMoveUsers);

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

Examples of models.User.save()

        JsonNode userJson = request().body().asJson();
        user.setNotifOnMyProposal(userJson.get("notifOnMyProposal").asBoolean());
        user.setNotifAdminOnAllProposal(userJson.get("notifAdminOnAllProposal").asBoolean());
        user.setNotifAdminOnProposalWithComment(userJson.get("notifAdminOnProposalWithComment").asBoolean());
        user.save();
        return ok();
    }
}
View Full Code Here

Examples of models.Vote.save()

                if (vote.voteType == Vote.VoteType.DOWN)
                {
                    --module.downVoteCount;
                    ++module.upVoteCount;
                    vote.voteType = Vote.VoteType.UP;
                    vote.save();
                    module.save();
                }
                else
                {
                    Logger.info(String.format("User [%s] tried to upvote module [%s] but vote already existed",
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.