Package org.ofbiz.entity

Examples of org.ofbiz.entity.GenericDelegator.removeByAnd()


        GenericDelegator delegator = SharkContainer.getDelegator();
        GenericValue value = this.getXpdlValue(xpdlId, xpdlVersion, false);
        if (value != null) {
            try {
                value.remove();
                delegator.removeByAnd(org.ofbiz.shark.SharkConstants.WfRepositoryRef, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.xpdlId, xpdlId));
            } catch (GenericEntityException e) {
                throw new RepositoryException(e);
            }
        }
    }
View Full Code Here


        GenericDelegator delegator = SharkContainer.getDelegator();
        GenericValue value = this.getXpdlValue(xpdlId, xpdlVersion, false);
        value.set(org.ofbiz.shark.SharkConstants.isHistorical, "Y");
        try {
            value.store();
            delegator.removeByAnd(org.ofbiz.shark.SharkConstants.WfRepositoryRef, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.xpdlId, xpdlId));
        } catch (GenericEntityException e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here

                pkToRemove.remove(ModelEntity.STAMP_TX_FIELD);
                pkToRemove.remove(ModelEntity.STAMP_FIELD);
                pkToRemove.remove(ModelEntity.CREATE_STAMP_TX_FIELD);
                pkToRemove.remove(ModelEntity.CREATE_STAMP_FIELD);

                int numRemByAnd = delegator.removeByAnd(pkToRemove.getEntityName(), pkToRemove);
                if (numRemByAnd == 0) {
                    toRemoveAlreadyDeleted++;
                } else {
                    toRemoveDeleted++;
                }
View Full Code Here

                    if (runtimeToDelete.size() > 0) {
                        for (String runtimeId: runtimeToDelete) {
                            boolean beganTx3 = false;
                            try {
                                beganTx3 = TransactionUtil.begin();
                                delegator.removeByAnd("RuntimeData", "runtimeDataId", runtimeId);

                            } catch (GenericEntityException e) {
                                Debug.logInfo("Cannot remove runtime data for ID: " + runtimeId, module);
                                try {
                                    TransactionUtil.rollback(beganTx3, e.getMessage(), e);
View Full Code Here

                        throw new PersistenceException(e);
                    }
                }
            }
            try {
                delegator.removeByAnd(org.ofbiz.shark.SharkConstants.WfActivity, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.subFlowId, processId));

                process.remove();
            } catch (Exception e) {
                throw new PersistenceException(e);
            }
View Full Code Here

    public void deleteAndJoinEntries(String procId, String asDefId, String aDefId, SharkTransaction trans) throws PersistenceException {
        if (Debug.infoOn()) Debug.log(":: deleteAndJoinEntries ::", module);
        GenericDelegator delegator = SharkContainer.getDelegator();
        try {
            delegator.removeByAnd(org.ofbiz.shark.SharkConstants.WfAndJoin, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.processId, procId,
                    org.ofbiz.shark.SharkConstants.activitySetDefId, asDefId, org.ofbiz.shark.SharkConstants.activityDefId, aDefId));
        } catch (GenericEntityException e) {
            throw new PersistenceException(e);
        }
    }
View Full Code Here

    }

    public void deleteDeadlines(String procId, SharkTransaction trans) throws PersistenceException {
        GenericDelegator delegator = SharkContainer.getDelegator();
        try {
            delegator.removeByAnd(org.ofbiz.shark.SharkConstants.WfDeadline, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.processId, procId));
        } catch (GenericEntityException e) {
            throw new PersistenceException(e);
        }
    }
View Full Code Here

    }

    public void deleteDeadlines(String procId, String actId, SharkTransaction trans) throws PersistenceException {
        GenericDelegator delegator = SharkContainer.getDelegator();
        try {
            delegator.removeByAnd(org.ofbiz.shark.SharkConstants.WfDeadline, UtilMisc.toMap(org.ofbiz.shark.SharkConstants.processId, procId, org.ofbiz.shark.SharkConstants.activityId, actId));
        } catch (GenericEntityException e) {
            throw new PersistenceException(e);
        }
    }
View Full Code Here

        // TODO: there are a number of other places which may need to be updated

        // remove all previous party roles
        try {
            delegator.removeByAnd("PartyRole", UtilMisc.toMap("partyId", partyId));
        } catch (GenericEntityException e) {
            Debug.logWarning(e, module);
            // if this fails no problem
        }
View Full Code Here

                Debug.logError(e, module);
                return ServiceUtil.returnError(e.getMessage());
            }
        }
        try {
            delegator.removeByAnd("PartyAttribute", UtilMisc.toMap("partyId", partyId));
        } catch (GenericEntityException e) {
            Debug.logError(e, module);
            return ServiceUtil.returnError(e.getMessage());
        }
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.