Package models

Examples of models.ToDo.update()


                {
                    incoming.save();
                }
                else
                {
                    incoming.update();
                }
                saved.add(incoming);
            }
        }
View Full Code Here


        // the ID parameter isn't used here, since it's already in the JSON body
        // PUTs should have an identifier, you could use it to confirm against the model you're sending, etc
        JsonNode json = request().body().asJson();
        ToDo incoming = Json.fromJson(json, ToDo.class);

        incoming.update();

        return ok(Json.toJson(incoming));
    }

    public static Result delete(Long id)
View Full Code Here

        // the ID parameter isn't used here, since it's already in the JSON body
        // PUTs should have an identifier, you could use it to confirm against the model you're sending, etc
        JsonNode json = request().body().asJson();
        ToDo incoming = Json.fromJson(json, ToDo.class);

        incoming.update();

        return ok(Json.toJson(incoming));
    }

    public static Result delete(Long id)
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.