Examples of commitWrites()


Examples of com.psddev.cms.db.Schedule.commitWrites()

                } else if (page.param(String.class, "action-delete") != null) {
                    try {
                        schedule.beginWrites();
                        Query.from(Draft.class).where("schedule = ?", schedule).deleteAll();
                        schedule.delete();
                        schedule.commitWrites();

                    } finally {
                        schedule.endWrites();
                    }
                }
View Full Code Here

Examples of com.psddev.dari.db.Database.commitWrites()

                database.beginWrites();
                database.deleteByQuery(Query.from(Draft.class).where("objectId = ?", objectId));
                database.deleteByQuery(Query.from(History.class).where("objectId = ?", objectId));
                database.deleteByQuery(Query.from(Trash.class).where("objectId = ?", objectId));
                objectState.delete();
                database.commitWrites();
            } finally {
                database.endWrites();
            }
        }
    }
View Full Code Here

Examples of com.psddev.dari.db.State.commitWrites()

                    schedule.save();
                }

                draft.setSchedule(schedule);
                publish(draft);
                state.commitWrites();
                redirectOnSave("",
                        "_frame", param(boolean.class, "_frame") ? Boolean.TRUE : null,
                        ToolPageContext.DRAFT_ID_PARAMETER, draft.getId());

            } else {
View Full Code Here

Examples of com.psddev.dari.db.State.commitWrites()

                    contentData.setPublishDate(null);
                    contentData.setPublishUser(null);
                }

                publish(object);
                state.commitWrites();
                redirectOnSave("",
                        "_frame", param(boolean.class, "_frame") ? Boolean.TRUE : null,
                        "typeId", state.getTypeId(),
                        "id", state.getId(),
                        "historyId", null,
View Full Code Here

Examples of com.psddev.dari.db.State.commitWrites()

                        draft.as(Workflow.Data.class).changeState(transition, getUser(), log);
                        draft.setObject(object);
                        publish(draft);
                    }

                    state.commitWrites();
                }
            }

            redirectOnSave("", "id", state.getId());
            return true;
View Full Code Here

Examples of com.psddev.dari.db.State.commitWrites()

                    History history = new History(user, object);

                    state.beginWrites();
                    state.save();
                    history.save();
                    state.commitWrites();
                    return history;

                } finally {
                    state.endWrites();
                }
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.