ActiveRecord entry = null;
try {
entry = Entry.findById(p("id"));
if (entry != null) {
entry.setData(params());
entry.update();
flash("notice", "Entry was successfully updated.");
}
else {
flash("notice", "There is no entry record with primary key id as " + p("id") + ".");
}