Package org.ofbiz.entity

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


            Calendar nowCal = Calendar.getInstance();
            nowCal.setTimeInMillis(System.currentTimeMillis());
            nowCal.add(Calendar.SECOND, -keepSeconds);
            Timestamp keepAfterStamp = new Timestamp(nowCal.getTimeInMillis());

            int numRemoved = delegator.removeByCondition("EntitySyncRemove", EntityCondition.makeCondition(ModelEntity.STAMP_TX_FIELD, EntityOperator.LESS_THAN, keepAfterStamp));
            Debug.logInfo("In cleanSyncRemoveInfo removed [" + numRemoved + "] values with TX timestamp before [" + keepAfterStamp + "]", module);

            return ServiceUtil.returnSuccess();
        } catch (GenericEntityException e) {
            String errorMsg = "Error cleaning out EntitySyncRemove info: " + e.toString();
View Full Code Here


        try {
            beganTransaction = TransactionUtil.begin();

            GenericDelegator delegator = dctx.getDelegator();
            String vatItemId = (String)context.get("vatItemId");
            delegator.removeByCondition("VatItem",
                    new EntityConditionList<EntityExpr>(UtilMisc
                            .<EntityExpr> toList(new EntityExpr(
                                    "vatItemId", EntityOperator.EQUALS,
                                    vatItemId)), EntityJoinOperator.AND));
View Full Code Here

            String vatType = (String)vatValue.get("vatType");
            String partyId = (String)context.get(ACCOUNT_ENTITY_ID);
            String updateFlag = "Y";
            String cancelledFlag = "Y";

            delegator.removeByCondition("VatItem",
                    new EntityConditionList<EntityExpr>(UtilMisc
                            .<EntityExpr> toList(new EntityExpr(
                                    "vatItemId", EntityOperator.EQUALS,
                                    vatItemId)), EntityJoinOperator.AND));
View Full Code Here

            Calendar nowCal = Calendar.getInstance();
            nowCal.setTimeInMillis(System.currentTimeMillis());
            nowCal.add(Calendar.SECOND, -keepSeconds);
            Timestamp keepAfterStamp = new Timestamp(nowCal.getTimeInMillis());
           
            int numRemoved = delegator.removeByCondition("EntitySyncRemove", EntityCondition.makeCondition(ModelEntity.STAMP_TX_FIELD, EntityOperator.LESS_THAN, keepAfterStamp));
            Debug.logInfo("In cleanSyncRemoveInfo removed [" + numRemoved + "] values with TX timestamp before [" + keepAfterStamp + "]", module);
           
            return ServiceUtil.returnSuccess();
        } catch (GenericEntityException e) {
            String errorMsg = "Error cleaning out EntitySyncRemove info: " + e.toString();
View Full Code Here

                    .getPath();
            oldFileName += "/" + similarName.get(0).get("fileName");
            File templateFile = new File(oldFileName);
            templateFile.delete();
            try {
                delegator.removeByCondition("ReportTemplate",
                        new EntityConditionList<EntityExpr>(UtilMisc
                                .<EntityExpr> toList(new EntityExpr(
                                        "templateName", EntityOperator.EQUALS,
                                        templateName), new EntityExpr(
                                        "partyId", EntityOperator.EQUALS,
View Full Code Here

            Calendar nowCal = Calendar.getInstance();
            nowCal.setTimeInMillis(System.currentTimeMillis());
            nowCal.add(Calendar.SECOND, -keepSeconds);
            Timestamp keepAfterStamp = new Timestamp(nowCal.getTimeInMillis());
           
            int numRemoved = delegator.removeByCondition("EntitySyncRemove", new EntityExpr(ModelEntity.STAMP_TX_FIELD, EntityOperator.LESS_THAN, keepAfterStamp));
            Debug.logInfo("In cleanSyncRemoveInfo removed [" + numRemoved + "] values with TX timestamp before [" + keepAfterStamp + "]", module);
           
            return ServiceUtil.returnSuccess();
        } catch (GenericEntityException e) {
            String errorMsg = "Error cleaning out EntitySyncRemove info: " + e.toString();
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.