Examples of removeByCondition()


Examples of org.ofbiz.entity.Delegator.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) {
            Debug.logError(e, "Error cleaning out EntitySyncRemove info: " + e.toString(), module);
View Full Code Here

Examples of org.ofbiz.entity.Delegator.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

Examples of org.ofbiz.entity.Delegator.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) {
            Debug.logError(e, "Error cleaning out EntitySyncRemove info: " + e.toString(), module);
View Full Code Here

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

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

        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

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

            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

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

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

                    .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

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", 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

Examples of org.ofbiz.entity.datasource.GenericHelper.removeByCondition()

            List<GenericValue> removedEntities = null;
            if (testMode) {
                removedEntities = this.findList(entityName, condition, null, null, null, false);
            }

            int rowsAffected = helper.removeByCondition(modelEntity, condition);

            if (testMode) {
                for (GenericValue entity : removedEntities) {
                    storeForTestRollback(new TestOperation(OperationType.DELETE, entity));
                }
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.