Examples of beginWrites()


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

                        toolUser.save();
                    }

                } 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 {
View Full Code Here

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

            Database database = objectState.getDatabase();
            UUID objectId = objectState.getId();

            try {
                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();
View Full Code Here

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

        Draft draft = getOverlaidDraft(object);
        Workflow.Data workflowData = state.as(Workflow.Data.class);
        String oldWorkflowState = workflowData.getCurrentState();

        try {
            state.beginWrites();

            Workflow workflow = Query.from(Workflow.class).where("contentTypes = ?", state.getType()).first();

            if (workflow != null) {
                WorkflowTransition transition = workflow.getTransitions().get(action);
View Full Code Here

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

                state.as(Workflow.Data.class).getCurrentState() != null) {
            page.setContentFormScheduleDate(object);
        }

        try {
            state.beginWrites();
            page.updateUsingParameters(object);
            page.updateUsingAllWidgets(object);
            page.publish(object);

        } catch (IOException error) {
View Full Code Here

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

        Draft draft = getOverlaidDraft(object);
        UUID variationId = param(UUID.class, "variationId");
        Site site = getSite();

        try {
            state.beginWrites();
            state.as(Workflow.Data.class).changeState(null, user, (WorkflowLog) null);

            if (variationId == null ||
                    (site != null &&
                    ((state.isNew() && site.getDefaultVariation() != null) ||
View Full Code Here

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

            } else {
                try {
                    History history = new History(user, object);

                    state.beginWrites();
                    state.save();
                    history.save();
                    state.commitWrites();
                    return history;
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.