Package com.scooterframework.orm.activerecord

Examples of com.scooterframework.orm.activerecord.ActiveRecord.save()


    public String create() {
        ActiveRecord newEntry = null;
        try {
            newEntry = Entry.newRecord();
            newEntry.setData(params());
            newEntry.save();
            flash("notice", "Entry was successfully created.");

            return redirectTo(R.resourcePath("entries"));
        }
        catch(Exception ex) {
View Full Code Here


    public String create() {
        ActiveRecord newEntry = null;
        try {
            newEntry = Entry.newRecord();
            newEntry.setData(params());
            newEntry.save();
            flash("notice", "Entry was successfully created.");
        }
        catch(Exception ex) {
            log.error("Error in create() caused by " + ex.getMessage());
            flash("error", "There was a problem creating the entry record.");
View Full Code Here

      ActiveRecord owner = (ActiveRecord)getFromRequestData("owner");
        ActiveRecord newPet = null;
        try {
            newPet = Pet.newRecord();
            newPet.setData(params());
            newPet.save();
            flash("notice", "Pet was successfully created.");

            return redirectTo(R.resourceRecordPath("owners", owner));
        }
        catch(Exception ex) {
View Full Code Here

      ActiveRecord owner = Owner.where("id=" + p("owner_id")).getRecord();
        ActiveRecord newVisit = null;
        try {
            newVisit = Visit.newRecord();
            newVisit.setData(params());
            newVisit.save();
            flash("notice", "Visit was successfully created.");

            return redirectTo(R.resourceRecordPath("owners", owner));
        }
        catch(Exception ex) {
View Full Code Here

    public String create() {
        ActiveRecord newOwner = null;
        try {
            newOwner = Owner.newRecord();
            newOwner.setData(params());
            newOwner.save();
            flash("notice", "Owner was successfully created.");

            return redirectTo(R.resourcePath("owners"));
        }
        catch(Exception ex) {
View Full Code Here

        try {
            newComment = Comment.newRecord();
            newComment.setData("commenter", p("commenter"));
            newComment.setData("body", p("body"));
            newComment.setData("post_id", p("post_id"));
            newComment.save();
            flash("notice", "Comment was successfully created.");

            return redirectTo(R.resourceRecordPath("posts", post));
        }
        catch(Exception ex) {
View Full Code Here

    public String create() {
        ActiveRecord newPost = null;
        try {
            newPost = Post.newRecord();
            newPost.setData(params());
            newPost.save();
            flash("notice", "Post was successfully created.");
           
            return redirectTo(R.resourcePath("posts"));
        }
        catch(Exception ex) {
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.