You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2012/05/14 23:02:04 UTC
svn commit: r1338411 [2/3] - in /ofbiz/trunk/applications/product:
src/org/ofbiz/product/catalog/ src/org/ofbiz/product/category/
src/org/ofbiz/product/config/ src/org/ofbiz/product/feature/
src/org/ofbiz/product/imagemanagement/ src/org/ofbiz/product/...
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java Mon May 14 21:02:02 2012
@@ -143,7 +143,7 @@ public class ProductSearchEvents {
while ((searchResultView = eli.next()) != null) {
String productId = searchResultView.getString("mainProductId");
//get all tuples that match product and category
- List<GenericValue> pcmList = delegator.findByAnd("ProductCategoryMember", UtilMisc.toMap("productCategoryId", productCategoryId, "productId", productId));
+ List<GenericValue> pcmList = delegator.findByAnd("ProductCategoryMember", UtilMisc.toMap("productCategoryId", productCategoryId, "productId", productId), null, false);
//set those thrudate to that specificed maybe remove then add new one
for (GenericValue pcm: pcmList) {
@@ -413,14 +413,14 @@ public class ProductSearchEvents {
String productId = searchResultView.getString("mainProductId");
productMap.put("productId", productId);
- List<GenericValue> productFeaturesCustomRaw = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, "productFeatureTypeId", "HAZMAT"));
+ List<GenericValue> productFeaturesCustomRaw = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, "productFeatureTypeId", "HAZMAT"), null, false);
List<GenericValue> productFeaturesCustom = EntityUtil.filterByDate(productFeaturesCustomRaw);
productMap.put("productFeatureCustom", EntityUtil.getFirst(productFeaturesCustom));
- List<GenericValue> productCategoriesRaw = delegator.findByAnd("ProductCategoryAndMember", UtilMisc.toMap("productId", productId));
+ List<GenericValue> productCategoriesRaw = delegator.findByAnd("ProductCategoryAndMember", UtilMisc.toMap("productId", productId), null, false);
List<GenericValue> productCategories = EntityUtil.filterByDate(productCategoriesRaw);
productMap.put("productCategories", productCategories);
- List<GenericValue> productFeaturesRaw = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId));
+ List<GenericValue> productFeaturesRaw = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId), null, false);
List<GenericValue> productFeatures = EntityUtil.filterByDate(productFeaturesRaw);
productMap.put("productFeatures", productFeatures);
productExportList.add(productMap);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearchSession.java Mon May 14 21:02:02 2012
@@ -400,7 +400,7 @@ public class ProductSearchSession {
if (keywords.size() > 0) {
List<GenericValue> productStoreKeywordOvrdList = null;
try {
- productStoreKeywordOvrdList = delegator.findByAndCache("ProductStoreKeywordOvrd", UtilMisc.toMap("productStoreId", productStoreId), UtilMisc.toList("-fromDate"));
+ productStoreKeywordOvrdList = delegator.findByAnd("ProductStoreKeywordOvrd", UtilMisc.toMap("productStoreId", productStoreId), UtilMisc.toList("-fromDate"), true);
productStoreKeywordOvrdList = EntityUtil.filterByDate(productStoreKeywordOvrdList, true);
} catch (GenericEntityException e) {
Debug.logError(e, "Error reading ProductStoreKeywordOvrd list, not doing keyword override", module);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductServices.java Mon May 14 21:02:02 2012
@@ -165,7 +165,7 @@ public class ProductServices {
try {
Map<String, String> fields = UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", productFeatureApplTypeId);
List<String> order = UtilMisc.toList("sequenceNum", "productFeatureTypeId");
- List<GenericValue> features = delegator.findByAndCache("ProductFeatureAndAppl", fields, order);
+ List<GenericValue> features = delegator.findByAnd("ProductFeatureAndAppl", fields, order, true);
for (GenericValue v: features) {
featureSet.add(v.getString("productFeatureTypeId"));
}
@@ -298,7 +298,7 @@ public class ProductServices {
Map<String, String> fields = UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", "SELECTABLE_FEATURE");
List<String> sort = UtilMisc.toList("sequenceNum");
- selectableFeatures = delegator.findByAndCache("ProductFeatureAndAppl", fields, sort);
+ selectableFeatures = delegator.findByAnd("ProductFeatureAndAppl", fields, sort, true);
selectableFeatures = EntityUtil.filterByDate(selectableFeatures, true);
} catch (GenericEntityException e) {
Debug.logError(e, module);
@@ -376,7 +376,7 @@ public class ProductServices {
if (distinct != null) fields.put("productFeatureTypeId", distinct);
if (type != null) fields.put("productFeatureApplTypeId", type);
- features = delegator.findByAndCache("ProductFeatureAndAppl", fields, order);
+ features = delegator.findByAnd("ProductFeatureAndAppl", fields, order, true);
result.put("productFeatures", features);
result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS);
} catch (GenericEntityException e) {
@@ -588,7 +588,7 @@ public class ProductServices {
List<String> sort = UtilMisc.toList("sequenceNum");
// get the features and filter out expired dates
- features = delegator.findByAndCache("ProductFeatureAndAppl", fields, sort);
+ features = delegator.findByAnd("ProductFeatureAndAppl", fields, sort, true);
features = EntityUtil.filterByDate(features, true);
} catch (GenericEntityException e) {
throw new IllegalStateException("Problem reading relation: " + e.getMessage());
@@ -665,7 +665,7 @@ public class ProductServices {
List<String> sort = UtilMisc.toList("sequenceNum", "description");
// get the features and filter out expired dates
- features = delegator.findByAndCache("ProductFeatureAndAppl", fields, sort);
+ features = delegator.findByAnd("ProductFeatureAndAppl", fields, sort, true);
features = EntityUtil.filterByDate(features, true);
} catch (GenericEntityException e) {
throw new IllegalStateException("Problem reading relation: " + e.getMessage());
@@ -846,7 +846,7 @@ public class ProductServices {
variantProductsById.put(variantProductId, variantProduct);
} else {
// is a GoodIdentification.idValue?
- List<GenericValue> goodIdentificationList = delegator.findByAnd("GoodIdentification", UtilMisc.toMap("idValue", variantProductId));
+ List<GenericValue> goodIdentificationList = delegator.findByAnd("GoodIdentification", UtilMisc.toMap("idValue", variantProductId), null, false);
if (UtilValidate.isEmpty(goodIdentificationList)) {
// whoops, nothing found... return error
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
@@ -1005,7 +1005,7 @@ public class ProductServices {
List<GenericValue> fileExtension = FastList.newInstance();
try {
- fileExtension = delegator.findByAnd("FileExtension", UtilMisc.toMap("mimeTypeId", (String) context.get("_uploadedFile_contentType")));
+ fileExtension = delegator.findByAnd("FileExtension", UtilMisc.toMap("mimeTypeId", (String) context.get("_uploadedFile_contentType")), null, false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(e.getMessage());
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductUtilServices.java Mon May 14 21:02:02 2012
@@ -81,7 +81,7 @@ public class ProductUtilServices {
if (virtualProduct == null) {
continue;
}
- List<GenericValue> passocList = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", virtualProductId, "productIdTo", productOne.get("productId"), "productAssocTypeId", "PRODUCT_VARIANT"));
+ List<GenericValue> passocList = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", virtualProductId, "productIdTo", productOne.get("productId"), "productAssocTypeId", "PRODUCT_VARIANT"), null, false);
passocList = EntityUtil.filterByDate(passocList);
if (passocList.size() > 0) {
for (GenericValue passoc: passocList) {
@@ -106,7 +106,7 @@ public class ProductUtilServices {
GenericValue product = null;
int numSoFar = 0;
while ((product = eli.next()) != null) {
- List<GenericValue> passocList = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", product.get("productId"), "productAssocTypeId", "PRODUCT_VARIANT"));
+ List<GenericValue> passocList = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", product.get("productId"), "productAssocTypeId", "PRODUCT_VARIANT"), null, false);
passocList = EntityUtil.filterByDate(passocList);
if (passocList.size() == 0) {
product.set("salesDiscontinuationDate", nowTimestamp);
@@ -146,7 +146,7 @@ public class ProductUtilServices {
int numSoFar = 0;
while ((product = eli.next()) != null) {
String productId = product.getString("productId");
- List<GenericValue> productCategoryMemberList = delegator.findByAnd("ProductCategoryMember", UtilMisc.toMap("productId", productId));
+ List<GenericValue> productCategoryMemberList = delegator.findByAnd("ProductCategoryMember", UtilMisc.toMap("productId", productId), null, false);
if (productCategoryMemberList.size() > 0) {
for (GenericValue productCategoryMember: productCategoryMemberList) {
// coded this way rather than a removeByAnd so it can be easily changed...
@@ -194,7 +194,7 @@ public class ProductUtilServices {
GenericValue pcm = null;
int numSoFar = 0;
while ((pcm = eli.next()) != null) {
- List<GenericValue> productCategoryMemberList = delegator.findByAnd("ProductCategoryMember", UtilMisc.toMap("productId", pcm.get("productId"), "productCategoryId", pcm.get("productCategoryId")));
+ List<GenericValue> productCategoryMemberList = delegator.findByAnd("ProductCategoryMember", UtilMisc.toMap("productId", pcm.get("productId"), "productCategoryId", pcm.get("productCategoryId")), null, false);
if (productCategoryMemberList.size() > 1) {
// remove all except the first...
productCategoryMemberList.remove(0);
@@ -259,7 +259,7 @@ public class ProductUtilServices {
for (GenericValue value: valueList) {
// has only one variant period, is it valid? should already be discontinued if not
String productId = value.getString("productId");
- List<GenericValue> paList = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_VARIANT"));
+ List<GenericValue> paList = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_VARIANT"), null, false);
paList = EntityUtil.filterByDate(paList);
// verify the query; tested on a bunch, looks good
if (paList.size() != 1) {
@@ -295,7 +295,7 @@ public class ProductUtilServices {
// has only one valid variant
String productId = value.getString("productId");
- List<GenericValue> paList = EntityUtil.filterByDate(delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_VARIANT")));
+ List<GenericValue> paList = EntityUtil.filterByDate(delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_VARIANT"), null, false));
// verify the query; tested on a bunch, looks good
if (paList.size() != 1) {
@@ -347,7 +347,7 @@ public class ProductUtilServices {
GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false);
Debug.logInfo("Processing virtual product with one variant with ID: " + productId + " and name: " + product.getString("internalName"), module);
- List<GenericValue> paList = EntityUtil.filterByDate(delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_VARIANT")));
+ List<GenericValue> paList = EntityUtil.filterByDate(delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_VARIANT"), null, false));
if (paList.size() > 1) {
Map<String, String> messageMap = UtilMisc.toMap("productId", productId);
errMsg = UtilProperties.getMessage(resourceError,"productutilservices.found_more_than_one_valid_variant_for_virtual_ID", messageMap, locale);
@@ -455,7 +455,7 @@ public class ProductUtilServices {
// can't just set to null, need to remove the value so it isn't a constraint in the query
//findValue.set("fromDate", null);
findValue.remove("fromDate");
- List<GenericValue> existingValueList = EntityUtil.filterByDate(delegator.findByAnd(relatedEntityName, findValue), nowTimestamp);
+ List<GenericValue> existingValueList = EntityUtil.filterByDate(delegator.findByAnd(relatedEntityName, findValue, null, false), nowTimestamp);
if (existingValueList.size() > 0) {
if (test) {
Debug.logInfo("Found " + existingValueList.size() + " existing values for related entity name: " + relatedEntityName + ", not copying, findValue is: " + findValue, module);
@@ -511,7 +511,7 @@ public class ProductUtilServices {
if ("Y".equals(product.getString("isVirtual"))) {
// find the first variant, use it's ID for the names...
- List<GenericValue> productAssocList = EntityUtil.filterByDate(delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_VARIANT")));
+ List<GenericValue> productAssocList = EntityUtil.filterByDate(delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_VARIANT"), null, false));
if (productAssocList.size() > 0) {
GenericValue productAssoc = EntityUtil.getFirst(productAssocList);
smallMap.put("productId", productAssoc.getString("productIdTo"));
@@ -652,7 +652,7 @@ while (allCatIter.hasNext()) {
}
// do sub-categories first so all feature groups will be in place
- List<GenericValue> subCategoryList = delegator.findByAnd("ProductCategoryRollup", UtilMisc.toMap("parentProductCategoryId", productCategoryId));
+ List<GenericValue> subCategoryList = delegator.findByAnd("ProductCategoryRollup", UtilMisc.toMap("parentProductCategoryId", productCategoryId), null, false);
if (doSubCategories) {
for (GenericValue productCategoryRollup: subCategoryList) {
attachProductFeaturesToCategory(productCategoryRollup.getString("productCategoryId"), productFeatureTypeIdsToInclude, productFeatureTypeIdsToExclude, delegator, true, nowTimestamp);
@@ -661,7 +661,7 @@ while (allCatIter.hasNext()) {
// now get all features for this category and make associated feature groups
Map<String, Set<String>> productFeatureIdByTypeIdSetMap = FastMap.newInstance();
- List<GenericValue> productCategoryMemberList = delegator.findByAnd("ProductCategoryMember", UtilMisc.toMap("productCategoryId", productCategoryId));
+ List<GenericValue> productCategoryMemberList = delegator.findByAnd("ProductCategoryMember", UtilMisc.toMap("productCategoryId", productCategoryId), null, false);
for (GenericValue productCategoryMember: productCategoryMemberList) {
String productId = productCategoryMember.getString("productId");
EntityCondition condition = EntityCondition.makeCondition(UtilMisc.toList(
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java Mon May 14 21:02:02 2012
@@ -281,7 +281,7 @@ public class ProductWorker {
// find all selectable features on the virtual product that are also standard features on the variant
Set<GenericValue> distFeatures = FastSet.newInstance();
- List<GenericValue> variantDistinguishingFeatures = delegator.findByAndCache("ProductFeatureAndAppl", UtilMisc.toMap("productId", variantProduct.get("productId"), "productFeatureApplTypeId", "DISTINGUISHING_FEAT"));
+ List<GenericValue> variantDistinguishingFeatures = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", variantProduct.get("productId"), "productFeatureApplTypeId", "DISTINGUISHING_FEAT"), null, true);
// Debug.logInfo("Found variantDistinguishingFeatures: " + variantDistinguishingFeatures, module);
for (GenericValue variantDistinguishingFeature: EntityUtil.filterByDate(variantDistinguishingFeatures)) {
@@ -290,7 +290,7 @@ public class ProductWorker {
distFeatures.add(dummyFeature);
}
- List<GenericValue> virtualSelectableFeatures = delegator.findByAndCache("ProductFeatureAndAppl", UtilMisc.toMap("productId", virtualProductId, "productFeatureApplTypeId", "SELECTABLE_FEATURE"));
+ List<GenericValue> virtualSelectableFeatures = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", virtualProductId, "productFeatureApplTypeId", "SELECTABLE_FEATURE"), null, true);
// Debug.logInfo("Found virtualSelectableFeatures: " + virtualSelectableFeatures, module);
Set<String> virtualSelectableFeatureIds = FastSet.newInstance();
@@ -298,7 +298,7 @@ public class ProductWorker {
virtualSelectableFeatureIds.add(virtualSelectableFeature.getString("productFeatureId"));
}
- List<GenericValue> variantStandardFeatures = delegator.findByAndCache("ProductFeatureAndAppl", UtilMisc.toMap("productId", variantProduct.get("productId"), "productFeatureApplTypeId", "STANDARD_FEATURE"));
+ List<GenericValue> variantStandardFeatures = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", variantProduct.get("productId"), "productFeatureApplTypeId", "STANDARD_FEATURE"), null, true);
// Debug.logInfo("Found variantStandardFeatures: " + variantStandardFeatures, module);
for (GenericValue variantStandardFeature: EntityUtil.filterByDate(variantStandardFeatures)) {
@@ -429,7 +429,7 @@ public class ProductWorker {
Delegator delegator = product.getDelegator();
Map<String,String> fields = UtilMisc.toMap("productId", product.getString("productId"), "productFeatureApplTypeId", "SELECTABLE_FEATURE");
List<String> order = UtilMisc.toList("productFeatureTypeId", "sequenceNum");
- List<GenericValue> features = delegator.findByAndCache("ProductFeatureAndAppl", fields, order);
+ List<GenericValue> features = delegator.findByAnd("ProductFeatureAndAppl", fields, order, true);
List<GenericValue> featuresSorted = EntityUtil.orderBy(features, order);
String oldType = null;
List<Map<String,String>> featureList = FastList.newInstance();
@@ -454,7 +454,7 @@ public class ProductWorker {
featureData.put("description", productFeatureAppl.getString("productFeatureId"));
}
List<GenericValue> productFeaturePrices = EntityUtil.filterByDate(delegator.findByAnd("ProductFeaturePrice",
- UtilMisc.toMap("productFeatureId", productFeatureAppl.getString("productFeatureId"), "productPriceTypeId", "DEFAULT_PRICE")));
+ UtilMisc.toMap("productFeatureId", productFeatureAppl.getString("productFeatureId"), "productPriceTypeId", "DEFAULT_PRICE"), null, false));
if (UtilValidate.isNotEmpty(productFeaturePrices)) {
GenericValue productFeaturePrice = productFeaturePrices.get(0);
if (UtilValidate.isNotEmpty(productFeaturePrice.get("price"))) {
@@ -511,7 +511,7 @@ public class ProductWorker {
List<GenericValue> productFeatureAppls = null;
try {
- productFeatureAppls = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", "OPTIONAL_FEATURE"), UtilMisc.toList("productFeatureTypeId", "sequenceNum"));
+ productFeatureAppls = delegator.findByAnd("ProductFeatureAndAppl", UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", "OPTIONAL_FEATURE"), UtilMisc.toList("productFeatureTypeId", "sequenceNum"), false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
@@ -709,11 +709,11 @@ public class ProductWorker {
}
try {
- List<GenericValue> virtualProductAssocs = delegator.findByAndCache("ProductAssoc", UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", "PRODUCT_VARIANT"), UtilMisc.toList("-fromDate"));
+ List<GenericValue> virtualProductAssocs = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", "PRODUCT_VARIANT"), UtilMisc.toList("-fromDate"), true);
virtualProductAssocs = EntityUtil.filterByDate(virtualProductAssocs);
if (UtilValidate.isEmpty(virtualProductAssocs)) {
//okay, not a variant, try a UNIQUE_ITEM
- virtualProductAssocs = delegator.findByAndCache("ProductAssoc", UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", "UNIQUE_ITEM"), UtilMisc.toList("-fromDate"));
+ virtualProductAssocs = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", "UNIQUE_ITEM"), UtilMisc.toList("-fromDate"), true);
virtualProductAssocs = EntityUtil.filterByDate(virtualProductAssocs);
}
if (UtilValidate.isNotEmpty(virtualProductAssocs)) {
@@ -873,7 +873,7 @@ public class ProductWorker {
if (UtilValidate.isNotEmpty(goodIdentificationTypeId)) {
conditions.put("goodIdentificationTypeId", goodIdentificationTypeId);
}
- productsFound = delegator.findByAndCache("GoodIdentificationAndProduct", conditions, UtilMisc.toList("productId"));
+ productsFound = delegator.findByAnd("GoodIdentificationAndProduct", conditions, UtilMisc.toList("productId"), true);
}
if (! searchProductFirst) {
@@ -972,14 +972,14 @@ public class ProductWorker {
// find associated refurb items, we want serial number for main item or any refurb items too
List<GenericValue> refubProductAssocs = EntityUtil.filterByDate(delegator.findByAnd("ProductAssoc",
- UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_REFURB")));
+ UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_REFURB"), null, false));
for (GenericValue refubProductAssoc: refubProductAssocs) {
productIdSet.add(refubProductAssoc.getString("productIdTo"));
}
// see if this is a refurb productId to, and find product(s) it is a refurb of
List<GenericValue> refubProductToAssocs = EntityUtil.filterByDate(delegator.findByAnd("ProductAssoc",
- UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", "PRODUCT_REFURB")));
+ UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", "PRODUCT_REFURB"), null, false));
for (GenericValue refubProductToAssoc: refubProductToAssocs) {
productIdSet.add(refubProductToAssoc.getString("productId"));
}
@@ -995,8 +995,8 @@ public class ProductWorker {
for (String paramValue: selectedFeatures) {
// find incompatibilities..
- List<GenericValue> incompatibilityVariants = delegator.findByAndCache("ProductFeatureIactn", UtilMisc.toMap("productId", productId,
- "productFeatureIactnTypeId","FEATURE_IACTN_INCOMP"));
+ List<GenericValue> incompatibilityVariants = delegator.findByAnd("ProductFeatureIactn", UtilMisc.toMap("productId", productId,
+ "productFeatureIactnTypeId","FEATURE_IACTN_INCOMP"), null, true);
for (GenericValue incompatibilityVariant: incompatibilityVariants) {
String featur = incompatibilityVariant.getString("productFeatureId");
if (paramValue.equals(featur)) {
@@ -1011,8 +1011,8 @@ public class ProductWorker {
}
}
// find dependencies..
- List<GenericValue> dependenciesVariants = delegator.findByAndCache("ProductFeatureIactn", UtilMisc.toMap("productId", productId,
- "productFeatureIactnTypeId","FEATURE_IACTN_DEPEND"));
+ List<GenericValue> dependenciesVariants = delegator.findByAnd("ProductFeatureIactn", UtilMisc.toMap("productId", productId,
+ "productFeatureIactnTypeId","FEATURE_IACTN_DEPEND"), null, true);
for (GenericValue dpVariant: dependenciesVariants) {
String featur = dpVariant.getString("productFeatureId");
if (paramValue.equals(featur)) {
@@ -1033,12 +1033,12 @@ public class ProductWorker {
}
// find variant
// Debug.logInfo("=====try to find variant for product: " + productId + " and features: " + selectedFeatures);
- List<GenericValue> productAssocs = EntityUtil.filterByDate(delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", productId, "productAssocTypeId","PRODUCT_VARIANT")));
+ List<GenericValue> productAssocs = EntityUtil.filterByDate(delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", productId, "productAssocTypeId","PRODUCT_VARIANT"), null, false));
boolean productFound = false;
nextProd:
for (GenericValue productAssoc: productAssocs) {
for (String featureId: selectedFeatures) {
- List<GenericValue> pAppls = delegator.findByAndCache("ProductFeatureAppl", UtilMisc.toMap("productId", productAssoc.getString("productIdTo"), "productFeatureId", featureId, "productFeatureApplTypeId","STANDARD_FEATURE"));
+ List<GenericValue> pAppls = delegator.findByAnd("ProductFeatureAppl", UtilMisc.toMap("productId", productAssoc.getString("productIdTo"), "productFeatureId", featureId, "productFeatureApplTypeId","STANDARD_FEATURE"), null, true);
if (UtilValidate.isEmpty(pAppls)) {
continue nextProd;
}
@@ -1071,7 +1071,7 @@ nextProd:
productFeatureAppl.create();
}
//add standard features too
- List<GenericValue> stdFeaturesAppls = EntityUtil.filterByDate(delegator.findByAnd("ProductFeatureAppl", UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", "STANDARD_FEATURE")));
+ List<GenericValue> stdFeaturesAppls = EntityUtil.filterByDate(delegator.findByAnd("ProductFeatureAppl", UtilMisc.toMap("productId", productId, "productFeatureApplTypeId", "STANDARD_FEATURE"), null, false));
for (GenericValue stdFeaturesAppl: stdFeaturesAppls) {
stdFeaturesAppl.put("productId", product.getString("productId"));
stdFeaturesAppl.create();
@@ -1080,11 +1080,11 @@ nextProd:
* take the default price from the vitual product, go to the productfeature table and retrieve all the prices for the difFerent features
* add these to the price of the virtual product, store the result as the default price on the variant you created.
*/
- List<GenericValue> productPrices = EntityUtil.filterByDate(delegator.findByAnd("ProductPrice", UtilMisc.toMap("productId", productId)));
+ List<GenericValue> productPrices = EntityUtil.filterByDate(delegator.findByAnd("ProductPrice", UtilMisc.toMap("productId", productId), null, false));
for (GenericValue productPrice: productPrices) {
for (String selectedFeaturedId: selectedFeatures) {
List<GenericValue> productFeaturePrices = EntityUtil.filterByDate(delegator.findByAnd("ProductFeaturePrice",
- UtilMisc.toMap("productFeatureId", selectedFeaturedId, "productPriceTypeId", productPrice.getString("productPriceTypeId"))));
+ UtilMisc.toMap("productFeatureId", selectedFeaturedId, "productPriceTypeId", productPrice.getString("productPriceTypeId")), null, false));
if (UtilValidate.isNotEmpty(productFeaturePrices)) {
GenericValue productFeaturePrice = productFeaturePrices.get(0);
if (UtilValidate.isNotEmpty(productFeaturePrice)) {
@@ -1105,14 +1105,14 @@ nextProd:
Debug.logInfo("set the productId to: " + product.getString("productId"), module);
// copy the supplier
- List<GenericValue> supplierProducts = delegator.findByAndCache("SupplierProduct", UtilMisc.toMap("productId", productId));
+ List<GenericValue> supplierProducts = delegator.findByAnd("SupplierProduct", UtilMisc.toMap("productId", productId), null, true);
for (GenericValue supplierProduct: supplierProducts) {
supplierProduct.set("productId", product.getString("productId"));
supplierProduct.create();
}
// copy the content
- List<GenericValue> productContents = delegator.findByAndCache("ProductContent", UtilMisc.toMap("productId", productId));
+ List<GenericValue> productContents = delegator.findByAnd("ProductContent", UtilMisc.toMap("productId", productId), null, true);
for (GenericValue productContent: productContents) {
productContent.set("productId", product.getString("productId"));
productContent.create();
@@ -1157,7 +1157,7 @@ nextProd:
if (isAlternativePacking) {
List<GenericValue> productAssocs = null;
try {
- productAssocs = delegator.findByAndCache("ProductAssoc", UtilMisc.toMap("productId", productId , "productAssocTypeId", "ALTERNATIVE_PACKAGE"));
+ productAssocs = delegator.findByAnd("ProductAssoc", UtilMisc.toMap("productId", productId , "productAssocTypeId", "ALTERNATIVE_PACKAGE"), null, false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreWorker.java Mon May 14 21:02:02 2012
@@ -174,7 +174,7 @@ public class ProductStoreWorker {
if (anyServiceType) {
if (storePayment == null) {
try {
- List<GenericValue> storePayments = delegator.findByAnd("ProductStorePaymentSetting", UtilMisc.toMap("productStoreId", productStoreId, "paymentMethodTypeId", paymentMethodTypeId));
+ List<GenericValue> storePayments = delegator.findByAnd("ProductStorePaymentSetting", UtilMisc.toMap("productStoreId", productStoreId, "paymentMethodTypeId", paymentMethodTypeId), null, false);
storePayment = EntityUtil.getFirst(storePayments);
} catch (GenericEntityException e) {
Debug.logError(e, "Problems looking up store payment settings", module);
@@ -183,7 +183,7 @@ public class ProductStoreWorker {
if (storePayment == null) {
try {
- List<GenericValue> storePayments = delegator.findByAnd("ProductStorePaymentSetting", UtilMisc.toMap("productStoreId", productStoreId));
+ List<GenericValue> storePayments = delegator.findByAnd("ProductStorePaymentSetting", UtilMisc.toMap("productStoreId", productStoreId), null, false);
storePayment = EntityUtil.getFirst(storePayments);
} catch (GenericEntityException e) {
Debug.logError(e, "Problems looking up store payment settings", module);
@@ -202,7 +202,7 @@ public class ProductStoreWorker {
List<GenericValue> storeShipMethods = null;
try {
- storeShipMethods = delegator.findByAndCache("ProductStoreShipmentMeth", storeFields);
+ storeShipMethods = delegator.findByAnd("ProductStoreShipmentMeth", storeFields, null, true);
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
@@ -223,7 +223,7 @@ public class ProductStoreWorker {
}
List<GenericValue> shippingMethods = null;
try {
- shippingMethods = delegator.findByAndCache("ProductStoreShipmentMethView", UtilMisc.toMap("productStoreId", productStoreId), UtilMisc.toList("sequenceNumber"));
+ shippingMethods = delegator.findByAnd("ProductStoreShipmentMethView", UtilMisc.toMap("productStoreId", productStoreId), UtilMisc.toList("sequenceNumber"), true);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get ProductStore shipping methods", module);
return null;
@@ -379,7 +379,7 @@ public class ProductStoreWorker {
if (UtilValidate.isNotEmpty(includeFeatures)) {
List<GenericValue> includedFeatures = null;
try {
- includedFeatures = delegator.findByAndCache("ProductFeatureGroupAppl", UtilMisc.toMap("productFeatureGroupId", includeFeatures));
+ includedFeatures = delegator.findByAnd("ProductFeatureGroupAppl", UtilMisc.toMap("productFeatureGroupId", includeFeatures), null, true);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to lookup ProductFeatureGroupAppl records for group : " + includeFeatures, module);
}
@@ -401,7 +401,7 @@ public class ProductStoreWorker {
if (UtilValidate.isNotEmpty(excludeFeatures)) {
List<GenericValue> excludedFeatures = null;
try {
- excludedFeatures = delegator.findByAndCache("ProductFeatureGroupAppl", UtilMisc.toMap("productFeatureGroupId", excludeFeatures));
+ excludedFeatures = delegator.findByAnd("ProductFeatureGroupAppl", UtilMisc.toMap("productFeatureGroupId", excludeFeatures), null, true);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to lookup ProductFeatureGroupAppl records for group : " + excludeFeatures, module);
}
@@ -464,7 +464,7 @@ public class ProductStoreWorker {
List<GenericValue> surveys = FastList.newInstance();
List<GenericValue> storeSurveys = null;
try {
- storeSurveys = delegator.findByAndCache("ProductStoreSurveyAppl", UtilMisc.toMap("productStoreId", productStoreId, "surveyApplTypeId", surveyApplTypeId), UtilMisc.toList("sequenceNum"));
+ storeSurveys = delegator.findByAnd("ProductStoreSurveyAppl", UtilMisc.toMap("productStoreId", productStoreId, "surveyApplTypeId", surveyApplTypeId), UtilMisc.toList("sequenceNum"), true);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get ProductStoreSurveyAppl for store : " + productStoreId, module);
return surveys;
@@ -511,7 +511,7 @@ public class ProductStoreWorker {
} else if (surveyAppl.get("productCategoryId") != null) {
List<GenericValue> categoryMembers = null;
try {
- categoryMembers = delegator.findByAndCache("ProductCategoryMember", UtilMisc.toMap("productCategoryId", surveyAppl.get("productCategoryId")));
+ categoryMembers = delegator.findByAnd("ProductCategoryMember", UtilMisc.toMap("productCategoryId", surveyAppl.get("productCategoryId")), null, true);
} catch (GenericEntityException e) {
Debug.logError(e, "Unable to get ProductCategoryMember records for survey application : " + surveyAppl, module);
}
@@ -555,7 +555,7 @@ public class ProductStoreWorker {
List<GenericValue> surveyResponse = null;
try {
- surveyResponse = delegator.findByAnd("SurveyResponse", UtilMisc.toMap("surveyId", surveyId, "partyId", partyId));
+ surveyResponse = delegator.findByAnd("SurveyResponse", UtilMisc.toMap("surveyId", surveyId, "partyId", partyId), null, false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
return -1;
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java Mon May 14 21:02:02 2012
@@ -73,7 +73,7 @@ public class SubscriptionServices {
Map<String, String> subscriptionFindMap = UtilMisc.toMap("partyId", partyId, "subscriptionResourceId", subscriptionResourceId);
// if this subscription is attached to something the customer owns, filter by that too
if (UtilValidate.isNotEmpty(inventoryItemId)) subscriptionFindMap.put("inventoryItemId", inventoryItemId);
- List<GenericValue> subscriptionList = delegator.findByAnd("Subscription", subscriptionFindMap);
+ List<GenericValue> subscriptionList = delegator.findByAnd("Subscription", subscriptionFindMap, null, false);
// DEJ20070718 DON'T filter by date, we want to consider all subscriptions: List listFiltered = EntityUtil.filterByDate(subscriptionList, true);
List<GenericValue> listOrdered = EntityUtil.orderBy(subscriptionList, UtilMisc.toList("-fromDate"));
if (listOrdered.size() > 0) {
@@ -193,7 +193,7 @@ public class SubscriptionServices {
orderCreatedDate = UtilDateTime.nowTimestamp();
}
try {
- List<GenericValue> productSubscriptionResourceList = delegator.findByAndCache("ProductSubscriptionResource", UtilMisc.toMap("productId", productId));
+ List<GenericValue> productSubscriptionResourceList = delegator.findByAnd("ProductSubscriptionResource", UtilMisc.toMap("productId", productId), null, true);
productSubscriptionResourceList = EntityUtil.filterByDate(productSubscriptionResourceList, orderCreatedDate, null, null, true);
productSubscriptionResourceList = EntityUtil.filterByDate(productSubscriptionResourceList, orderCreatedDate, "purchaseFromDate", "purchaseThruDate", true);
@@ -247,7 +247,7 @@ public class SubscriptionServices {
GenericValue orderHeader = null;
try {
- List<GenericValue> orderRoleList = delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "END_USER_CUSTOMER"));
+ List<GenericValue> orderRoleList = delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "END_USER_CUSTOMER"), null, false);
if (orderRoleList.size() > 0) {
GenericValue orderRole = orderRoleList.get(0);
String partyId = (String) orderRole.get("partyId");
@@ -272,7 +272,7 @@ public class SubscriptionServices {
if (UtilValidate.isEmpty(productId)) {
continue;
}
- List<GenericValue> productSubscriptionResourceList = delegator.findByAndCache("ProductSubscriptionResource", UtilMisc.toMap("productId", productId));
+ List<GenericValue> productSubscriptionResourceList = delegator.findByAnd("ProductSubscriptionResource", UtilMisc.toMap("productId", productId), null, true);
List<GenericValue> productSubscriptionResourceListFiltered = EntityUtil.filterByDate(productSubscriptionResourceList, true);
if (productSubscriptionResourceListFiltered.size() > 0) {
subContext.put("subscriptionTypeId", "PRODUCT_SUBSCR");
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/packing/PackingSession.java Mon May 14 21:02:02 2012
@@ -131,7 +131,7 @@ public class PackingSession implements j
invLookup.put("orderId", orderId);
invLookup.put("orderItemSeqId", orderItemSeqId);
invLookup.put("shipGroupSeqId", shipGroupSeqId);
- List<GenericValue> reservations = this.getDelegator().findByAnd("OrderItemShipGrpInvRes", invLookup, UtilMisc.toList("quantity DESC"));
+ List<GenericValue> reservations = this.getDelegator().findByAnd("OrderItemShipGrpInvRes", invLookup, UtilMisc.toList("quantity DESC"), false);
// no reservations we cannot add this item
if (UtilValidate.isEmpty(reservations)) {
@@ -254,7 +254,7 @@ public class PackingSession implements j
lookupMap.put("shipGroupSeqId", shipGroupSeqId);
List<String> sort = UtilMisc.toList("-quantity");
- List<GenericValue> orderItems = this.getDelegator().findByAnd("OrderItemAndShipGroupAssoc", lookupMap, sort);
+ List<GenericValue> orderItems = this.getDelegator().findByAnd("OrderItemAndShipGroupAssoc", lookupMap, sort, false);
String orderItemSeqId = null;
if (orderItems != null) {
@@ -264,7 +264,7 @@ public class PackingSession implements j
invLookup.put("orderId", orderId);
invLookup.put("orderItemSeqId", item.getString("orderItemSeqId"));
invLookup.put("shipGroupSeqId", shipGroupSeqId);
- List<GenericValue> reservations = this.getDelegator().findByAnd("OrderItemShipGrpInvRes", invLookup);
+ List<GenericValue> reservations = this.getDelegator().findByAnd("OrderItemShipGrpInvRes", invLookup, null, false);
for (GenericValue res: reservations) {
BigDecimal qty = res.getBigDecimal("quantity");
if (quantity.compareTo(qty) <= 0) {
@@ -445,7 +445,7 @@ public class PackingSession implements j
BigDecimal reserved = BigDecimal.ONE.negate();
try {
GenericValue res = EntityUtil.getFirst(this.getDelegator().findByAnd("OrderItemAndShipGrpInvResAndItemSum", UtilMisc.toMap("orderId", orderId,
- "orderItemSeqId", orderItemSeqId, "shipGroupSeqId", shipGroupSeqId, "inventoryProductId", productId)));
+ "orderItemSeqId", orderItemSeqId, "shipGroupSeqId", shipGroupSeqId, "inventoryProductId", productId), null, false));
reserved = res.getBigDecimal("totQuantityAvailable");
if (reserved == null) {
reserved = BigDecimal.ONE.negate();
@@ -702,7 +702,7 @@ public class PackingSession implements j
lookupMap.put("shipGroupSeqId", shipGroupSeqId);
}
try {
- issues = this.getDelegator().findByAnd("ItemIssuance", lookupMap);
+ issues = this.getDelegator().findByAnd("ItemIssuance", lookupMap, null, false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
}
@@ -723,13 +723,13 @@ public class PackingSession implements j
newShipment.put("picklistBinId", picklistBinId);
newShipment.put("additionalShippingCharge", additionalShippingCharge);
newShipment.put("userLogin", userLogin);
- GenericValue orderRoleShipTo = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", primaryOrderId, "roleTypeId", "SHIP_TO_CUSTOMER")));
+ GenericValue orderRoleShipTo = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", primaryOrderId, "roleTypeId", "SHIP_TO_CUSTOMER"), null, false));
if (UtilValidate.isNotEmpty(orderRoleShipTo)) {
newShipment.put("partyIdTo", orderRoleShipTo.getString("partyId"));
}
String partyIdFrom = null;
if (primaryOrderId != null) {
- GenericValue orderItemShipGroup = EntityUtil.getFirst(delegator.findByAnd("OrderItemShipGroup", UtilMisc.toMap("orderId", primaryOrderId, "shipGroupSeqId", primaryShipGrp)));
+ GenericValue orderItemShipGroup = EntityUtil.getFirst(delegator.findByAnd("OrderItemShipGroup", UtilMisc.toMap("orderId", primaryOrderId, "shipGroupSeqId", primaryShipGrp), null, false));
if (UtilValidate.isNotEmpty(orderItemShipGroup.getString("vendorPartyId"))) {
partyIdFrom = orderItemShipGroup.getString("vendorPartyId");
} else if (UtilValidate.isNotEmpty(orderItemShipGroup.getString("facilityId"))) {
@@ -739,11 +739,11 @@ public class PackingSession implements j
}
}
if (UtilValidate.isEmpty(partyIdFrom)) {
- GenericValue orderRoleShipFrom = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", primaryOrderId, "roleTypeId", "SHIP_FROM_VENDOR")));
+ GenericValue orderRoleShipFrom = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", primaryOrderId, "roleTypeId", "SHIP_FROM_VENDOR"), null, false));
if (UtilValidate.isNotEmpty(orderRoleShipFrom)) {
partyIdFrom = orderRoleShipFrom.getString("partyId");
} else {
- orderRoleShipFrom = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", primaryOrderId, "roleTypeId", "BILL_FROM_VENDOR")));
+ orderRoleShipFrom = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", primaryOrderId, "roleTypeId", "BILL_FROM_VENDOR"), null, false));
partyIdFrom = orderRoleShipFrom.getString("partyId");
}
}
@@ -816,7 +816,7 @@ public class PackingSession implements j
protected void updateShipmentRouteSegments() throws GeneralException {
BigDecimal shipmentWeight = getTotalWeight();
if (shipmentWeight.compareTo(BigDecimal.ZERO) <= 0) return;
- List<GenericValue> shipmentRouteSegments = getDelegator().findByAnd("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", this.getShipmentId()));
+ List<GenericValue> shipmentRouteSegments = getDelegator().findByAnd("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", this.getShipmentId()), null, false);
if (! UtilValidate.isEmpty(shipmentRouteSegments)) {
for (GenericValue shipmentRouteSegment: shipmentRouteSegments) {
shipmentRouteSegment.set("billingWeight", shipmentWeight);
@@ -845,7 +845,7 @@ public class PackingSession implements j
ctx.put("roleTypeId", "PICKER");
// check if the role already exists and is valid
- List<GenericValue> currentRoles = this.getDelegator().findByAnd("PicklistRole", ctx);
+ List<GenericValue> currentRoles = this.getDelegator().findByAnd("PicklistRole", ctx, null, false);
currentRoles = EntityUtil.filterByDate(currentRoles);
// if not; create the role
@@ -906,7 +906,7 @@ public class PackingSession implements j
if (UtilValidate.isEmpty(shippableItemInfo)) {
shippableItemInfo = FastList.newInstance();
for (PackingSessionLine line: getLines()) {
- List<GenericValue> oiasgas = getDelegator().findByAnd("OrderItemAndShipGroupAssoc", UtilMisc.toMap("orderId", line.getOrderId(), "orderItemSeqId", line.getOrderItemSeqId(), "shipGroupSeqId", line.getShipGroupSeqId()));
+ List<GenericValue> oiasgas = getDelegator().findByAnd("OrderItemAndShipGroupAssoc", UtilMisc.toMap("orderId", line.getOrderId(), "orderItemSeqId", line.getOrderItemSeqId(), "shipGroupSeqId", line.getShipGroupSeqId()), null, false);
shippableItemInfo.addAll(oiasgas);
}
}
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/picklist/PickListServices.java Mon May 14 21:02:02 2012
@@ -89,7 +89,7 @@ public class PickListServices {
// lookup the items in the bin
List<GenericValue> items;
try {
- items = delegator.findByAnd("PicklistItem", UtilMisc.toMap("picklistBinId", picklistBinId));
+ items = delegator.findByAnd("PicklistItem", UtilMisc.toMap("picklistBinId", picklistBinId), null, false);
} catch (GenericEntityException e) {
Debug.logError(e, module);
throw e;
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Mon May 14 21:02:02 2012
@@ -562,7 +562,7 @@ public class ShipmentServices {
GenericValue appl = null;
Map<String, String> fields = UtilMisc.toMap("productFeatureGroupId", featureGroupId, "productFeatureId", featureId);
try {
- List<GenericValue> appls = delegator.findByAndCache("ProductFeatureGroupAppl", fields);
+ List<GenericValue> appls = delegator.findByAnd("ProductFeatureGroupAppl", fields, null, true);
appls = EntityUtil.filterByDate(appls);
appl = EntityUtil.getFirst(appls);
} catch (GenericEntityException e) {
@@ -910,7 +910,7 @@ public class ShipmentServices {
GenericValue userLogin = (GenericValue) context.get("userLogin");
try {
- List<GenericValue> shipmentReceipts = delegator.findByAnd("ShipmentReceipt", UtilMisc.toMap("shipmentId", shipmentId));
+ List<GenericValue> shipmentReceipts = delegator.findByAnd("ShipmentReceipt", UtilMisc.toMap("shipmentId", shipmentId), null, false);
if (shipmentReceipts.size() == 0) return ServiceUtil.returnSuccess();
// If there are shipment receipts, the shipment must have been shipped, so set the shipment status to PURCH_SHIP_SHIPPED if it's only PURCH_SHIP_CREATED
@@ -922,7 +922,7 @@ public class ShipmentServices {
}
}
- List<GenericValue> shipmentAndItems = delegator.findByAnd("ShipmentAndItem", UtilMisc.toMap("shipmentId", shipmentId, "statusId", "PURCH_SHIP_SHIPPED"));
+ List<GenericValue> shipmentAndItems = delegator.findByAnd("ShipmentAndItem", UtilMisc.toMap("shipmentId", shipmentId, "statusId", "PURCH_SHIP_SHIPPED"), null, false);
if (shipmentAndItems.size() == 0) {
return ServiceUtil.returnSuccess();
}
@@ -1083,7 +1083,7 @@ public class ShipmentServices {
return ServiceUtil.returnError(errorMessage);
}
- List<GenericValue> packageContents = delegator.findByAnd("PackedQtyVsOrderItemQuantity", UtilMisc.toMap("shipmentId", shipmentId, "shipmentPackageSeqId", shipmentPackageSeqId));
+ List<GenericValue> packageContents = delegator.findByAnd("PackedQtyVsOrderItemQuantity", UtilMisc.toMap("shipmentId", shipmentId, "shipmentPackageSeqId", shipmentPackageSeqId), null, false);
for (GenericValue packageContent: packageContents) {
String orderId = packageContent.getString("orderId");
String orderItemSeqId = packageContent.getString("orderItemSeqId");
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/fedex/FedexServices.java Mon May 14 21:02:02 2012
@@ -202,7 +202,7 @@ public class FedexServices {
}
// Get the contact information for the company
- List<GenericValue> partyContactDetails = delegator.findByAnd("PartyContactDetailByPurpose", UtilMisc.toMap("partyId", companyPartyId));
+ List<GenericValue> partyContactDetails = delegator.findByAnd("PartyContactDetailByPurpose", UtilMisc.toMap("partyId", companyPartyId), null, false);
partyContactDetails = EntityUtil.filterByDate(partyContactDetails);
partyContactDetails = EntityUtil.filterByDate(partyContactDetails, UtilDateTime.nowTimestamp(), "purposeFromDate", "purposeThruDate", true);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/thirdparty/ups/UpsServices.java Mon May 14 21:02:02 2012
@@ -3095,7 +3095,7 @@ public class UpsServices {
GenericValue carrierShipmentMethod = null;
// Filtering out rates of shipping methods which are not configured in ProductStoreShipmentMeth entity.
try {
- List <GenericValue> productStoreShipmentMethods = delegator.findByAnd("ProductStoreShipmentMethView", UtilMisc.toMap("productStoreId", productStoreId));
+ List <GenericValue> productStoreShipmentMethods = delegator.findByAnd("ProductStoreShipmentMethView", UtilMisc.toMap("productStoreId", productStoreId), null, false);
for (GenericValue productStoreShipmentMethod :productStoreShipmentMethods) {
if ("UPS".equals(productStoreShipmentMethod.get("partyId"))) {
Map<String,Object> thisUpsRateCodeMap = FastMap.newInstance();
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/verify/VerifyPickSession.java Mon May 14 21:02:02 2012
@@ -94,7 +94,7 @@ public class VerifyPickSession implement
inventoryLookupMap.put("orderId", orderId);
inventoryLookupMap.put("orderItemSeqId", orderItemSeqId);
inventoryLookupMap.put("shipGroupSeqId", shipGroupSeqId);
- List<GenericValue> reservations = this.getDelegator().findByAnd("OrderItemShipGrpInvRes", inventoryLookupMap, UtilMisc.toList("quantity DESC"));
+ List<GenericValue> reservations = this.getDelegator().findByAnd("OrderItemShipGrpInvRes", inventoryLookupMap, UtilMisc.toList("quantity DESC"), false);
// no reservations we cannot add this item
if (UtilValidate.isEmpty(reservations)) {
@@ -160,7 +160,7 @@ public class VerifyPickSession implement
orderItemLookupMap.put("statusId", "ITEM_APPROVED");
orderItemLookupMap.put("shipGroupSeqId", shipGroupSeqId);
- List<GenericValue> orderItems = this.getDelegator().findByAnd("OrderItemAndShipGroupAssoc", orderItemLookupMap);
+ List<GenericValue> orderItems = this.getDelegator().findByAnd("OrderItemAndShipGroupAssoc", orderItemLookupMap, null, false);
String orderItemSeqId = null;
if (orderItems != null) {
@@ -170,7 +170,7 @@ public class VerifyPickSession implement
inventoryLookupMap.put("orderId", orderId);
inventoryLookupMap.put("orderItemSeqId", orderItem.getString("orderItemSeqId"));
inventoryLookupMap.put("shipGroupSeqId", shipGroupSeqId);
- List<GenericValue> reservations = this.getDelegator().findByAnd("OrderItemShipGrpInvRes", inventoryLookupMap);
+ List<GenericValue> reservations = this.getDelegator().findByAnd("OrderItemShipGrpInvRes", inventoryLookupMap, null, false);
for (GenericValue reservation : reservations) {
BigDecimal qty = reservation.getBigDecimal("quantity");
if (quantity.compareTo(qty) <= 0) {
@@ -335,7 +335,7 @@ public class VerifyPickSession implement
public BigDecimal getReservedQty(String orderId, String orderItemSeqId, String shipGroupSeqId) {
BigDecimal reservedQty = ZERO;
try {
- GenericValue reservation = EntityUtil.getFirst(this.getDelegator().findByAnd("OrderItemAndShipGrpInvResAndItemSum", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId, "shipGroupSeqId", shipGroupSeqId)));
+ GenericValue reservation = EntityUtil.getFirst(this.getDelegator().findByAnd("OrderItemAndShipGrpInvResAndItemSum", UtilMisc.toMap("orderId", orderId, "orderItemSeqId", orderItemSeqId, "shipGroupSeqId", shipGroupSeqId), null, false));
reservedQty = reservation.getBigDecimal("totQuantityAvailable");
} catch (GenericEntityException e) {
Debug.logError(e, module);
@@ -348,7 +348,7 @@ public class VerifyPickSession implement
BigDecimal verifiedQty = ZERO;
BigDecimal orderedQty = ZERO;
- List<GenericValue> orderItems = this.getDelegator().findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId, "statusId", "ITEM_APPROVED"));
+ List<GenericValue> orderItems = this.getDelegator().findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId, "statusId", "ITEM_APPROVED"), null, false);
for (GenericValue orderItem : orderItems) {
orderedQty = orderedQty.add(orderItem.getBigDecimal("quantity"));
}
@@ -393,12 +393,12 @@ public class VerifyPickSession implement
newShipment.put("shipmentTypeId", "OUTGOING_SHIPMENT");
newShipment.put("statusId", "SHIPMENT_SCHEDULED");
newShipment.put("userLogin", this.getUserLogin());
- GenericValue orderRoleShipTo = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "SHIP_TO_CUSTOMER")));
+ GenericValue orderRoleShipTo = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "SHIP_TO_CUSTOMER"), null, false));
if (UtilValidate.isNotEmpty(orderRoleShipTo)) {
newShipment.put("partyIdTo", orderRoleShipTo.getString("partyId"));
}
String partyIdFrom = null;
- GenericValue orderItemShipGroup = EntityUtil.getFirst(delegator.findByAnd("OrderItemShipGroup", UtilMisc.toMap("orderId", orderId, "shipGroupSeqId", line.getShipGroupSeqId())));
+ GenericValue orderItemShipGroup = EntityUtil.getFirst(delegator.findByAnd("OrderItemShipGroup", UtilMisc.toMap("orderId", orderId, "shipGroupSeqId", line.getShipGroupSeqId()), null, false));
if (UtilValidate.isNotEmpty(orderItemShipGroup.getString("vendorPartyId"))) {
partyIdFrom = orderItemShipGroup.getString("vendorPartyId");
} else if (UtilValidate.isNotEmpty(orderItemShipGroup.getString("facilityId"))) {
@@ -408,11 +408,11 @@ public class VerifyPickSession implement
}
}
if (UtilValidate.isEmpty(partyIdFrom)) {
- GenericValue orderRoleShipFrom = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "SHIP_FROM_VENDOR")));
+ GenericValue orderRoleShipFrom = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "SHIP_FROM_VENDOR"), null, false));
if (UtilValidate.isNotEmpty(orderRoleShipFrom)) {
partyIdFrom = orderRoleShipFrom.getString("partyId");
} else {
- orderRoleShipFrom = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "BILL_FROM_VENDOR")));
+ orderRoleShipFrom = EntityUtil.getFirst(delegator.findByAnd("OrderRole", UtilMisc.toMap("orderId", orderId, "roleTypeId", "BILL_FROM_VENDOR"), null, false));
partyIdFrom = orderRoleShipFrom.getString("partyId");
}
}
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageServices.java Mon May 14 21:02:02 2012
@@ -64,7 +64,7 @@ public class WeightPackageServices {
}
try {
// Checked no of packages, it should not be greater than ordered quantity
- List<GenericValue> orderItems = delegator.findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId, "statusId", "ITEM_APPROVED"));
+ List<GenericValue> orderItems = delegator.findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId, "statusId", "ITEM_APPROVED"), null, false);
BigDecimal orderedItemQty = ZERO;
for (GenericValue orderItem : orderItems) {
orderedItemQty = orderedItemQty.add(orderItem.getBigDecimal("quantity"));
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/shipment/weightPackage/WeightPackageSession.java Mon May 14 21:02:02 2012
@@ -352,7 +352,7 @@ public class WeightPackageSession implem
protected BigDecimal upsShipmentConfirm() throws GeneralException {
Delegator delegator = this.getDelegator();
BigDecimal actualCost = ZERO;
- List<GenericValue> shipmentRouteSegments = delegator.findByAnd("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", shipmentId));
+ List<GenericValue> shipmentRouteSegments = delegator.findByAnd("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", shipmentId), null, false);
if (UtilValidate.isNotEmpty(shipmentRouteSegments)) {
for (GenericValue shipmentRouteSegment : shipmentRouteSegments) {
Map<String, Object> shipmentRouteSegmentMap = FastMap.newInstance();
@@ -371,7 +371,7 @@ public class WeightPackageSession implem
}
protected void upsShipmentAccept() throws GeneralException {
- List<GenericValue> shipmentRouteSegments = this.getDelegator().findByAnd("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", shipmentId));
+ List<GenericValue> shipmentRouteSegments = this.getDelegator().findByAnd("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", shipmentId), null, false);
if (UtilValidate.isNotEmpty(shipmentRouteSegments)) {
for (GenericValue shipmentRouteSegment : shipmentRouteSegments) {
Map<String, Object> shipmentRouteSegmentMap = FastMap.newInstance();
@@ -432,13 +432,13 @@ public class WeightPackageSession implem
}
protected void changeOrderItemStatus(String orderId) throws GeneralException {
- List<GenericValue> shipmentItems = this.getDelegator().findByAnd("ShipmentItem", UtilMisc.toMap("shipmentId", shipmentId));
+ List<GenericValue> shipmentItems = this.getDelegator().findByAnd("ShipmentItem", UtilMisc.toMap("shipmentId", shipmentId), null, false);
for (GenericValue shipmentItem : shipmentItems) {
for (WeightPackageSessionLine packedLine : this.getPackedLines(orderId)) {
packedLine.setShipmentItemSeqId(shipmentItem.getString("shipmentItemSeqId"));
}
}
- List<GenericValue> orderItems = this.getDelegator().findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId, "statusId", "ITEM_APPROVED"));
+ List<GenericValue> orderItems = this.getDelegator().findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId, "statusId", "ITEM_APPROVED"), null, false);
for (GenericValue orderItem : orderItems) {
List<GenericValue> orderItemShipGrpInvReserves = orderItem.getRelated("OrderItemShipGrpInvRes");
if (UtilValidate.isEmpty(orderItemShipGrpInvReserves)) {
@@ -468,7 +468,7 @@ public class WeightPackageSession implem
if (UtilValidate.isNotEmpty(orderId)) {
BigDecimal shipmentWeight = getShippableWeight(orderId);
if (UtilValidate.isNotEmpty(shipmentWeight) && shipmentWeight.compareTo(BigDecimal.ZERO) <= 0) return;
- List<GenericValue> shipmentRouteSegments = getDelegator().findByAnd("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", this.getShipmentId()));
+ List<GenericValue> shipmentRouteSegments = getDelegator().findByAnd("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", this.getShipmentId()), null, false);
if (UtilValidate.isNotEmpty(shipmentRouteSegments)) {
for (GenericValue shipmentRouteSegment : shipmentRouteSegments) {
shipmentRouteSegment.set("billingWeight", shipmentWeight);
@@ -539,7 +539,7 @@ public class WeightPackageSession implem
protected Integer getOrderedQuantity(String orderId) {
BigDecimal orderedQuantity = ZERO;
try {
- List<GenericValue> orderItems = getDelegator().findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId, "statusId", "ITEM_APPROVED"));
+ List<GenericValue> orderItems = getDelegator().findByAnd("OrderItem", UtilMisc.toMap("orderId", orderId, "statusId", "ITEM_APPROVED"), null, false);
for (GenericValue orderItem : orderItems) {
orderedQuantity = orderedQuantity.add(orderItem.getBigDecimal("quantity"));
}
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy Mon May 14 21:02:02 2012
@@ -47,7 +47,7 @@ List separateRootType(roots) {
completedTree = [];
// Get the Catalogs
-prodCatalogs = delegator.findByAnd("ProdCatalog");
+prodCatalogs = delegator.findByAnd("ProdCatalog", null, null, false);
if (prodCatalogs) {
prodCatalogs.each { prodCatalog ->
prodCatalogMap = [:];
@@ -55,7 +55,7 @@ if (prodCatalogs) {
prodCatalogMap.categoryName = prodCatalog.getString("catalogName");
prodCatalogMap.isCatalog = true;
prodCatalogMap.isCategoryType = false;
- prodCatalogCategories = EntityUtil.filterByDate(delegator.findByAnd("ProdCatalogCategory", ["prodCatalogId" : prodCatalog.prodCatalogId]));
+ prodCatalogCategories = EntityUtil.filterByDate(delegator.findByAnd("ProdCatalogCategory", ["prodCatalogId" : prodCatalog.prodCatalogId], null, false));
if (prodCatalogCategories) {
prodCatalogMap.child = separateRootType(prodCatalogCategories);
}
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategoryContentContent.groovy Mon May 14 21:02:02 2012
@@ -38,7 +38,7 @@ if (("PAGE_TITLE".equals(prodCatContentT
context.contentFormTitle = "${uiLabelMap.ProductUpdateSEOContentCategory}";
}
if ("RELATED_URL".equals(prodCatContentTypeId)) {
- contentList = delegator.findByAnd("ContentDataResourceView", UtilMisc.toMap("contentId", contentId));
+ contentList = delegator.findByAnd("ContentDataResourceView", UtilMisc.toMap("contentId", contentId), null, false);
if (contentList) {
context.contentId = contentList.get(0).contentId;
context.dataResourceId = contentList.get(0).dataResourceId;
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategorySEO.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategorySEO.groovy?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategorySEO.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/category/EditCategorySEO.groovy Mon May 14 21:02:02 2012
@@ -19,7 +19,7 @@
productCategoryId = parameters.productCategoryId;
if (productCategoryId) {
- productCategoryContents = delegator.findByAnd("ProductCategoryContent", ["productCategoryId" : productCategoryId]);
+ productCategoryContents = delegator.findByAnd("ProductCategoryContent", ["productCategoryId" : productCategoryId], null, false);
productCategoryContents.each{ productCategoryContent->
if (productCategoryContent.prodCatContentTypeId == "PAGE_TITLE") {
contentTitle = delegator.findOne("Content", ["contentId" : productCategoryContent.contentId], false);
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageGallery.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageGallery.groovy?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageGallery.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/ImageGallery.groovy Mon May 14 21:02:02 2012
@@ -28,10 +28,10 @@ import org.ofbiz.entity.condition.*;
import org.ofbiz.entity.util.*;
productImageList = [];
-productContentAndInfoImageManamentList = delegator.findByAnd("ProductContentAndInfo", ["productId": productId, productContentTypeId : "IMAGE", "statusId" : "IM_APPROVED"], ["sequenceNum"]);
+productContentAndInfoImageManamentList = delegator.findByAnd("ProductContentAndInfo", ["productId": productId, productContentTypeId : "IMAGE", "statusId" : "IM_APPROVED"], ["sequenceNum"], false);
if(productContentAndInfoImageManamentList) {
productContentAndInfoImageManamentList.each { productContentAndInfoImageManament ->
- contentAssocThumbList = delegator.findByAnd("ContentAssoc", [contentId : productContentAndInfoImageManament.contentId, contentAssocTypeId : "IMAGE_THUMBNAIL"]);
+ contentAssocThumbList = delegator.findByAnd("ContentAssoc", [contentId : productContentAndInfoImageManament.contentId, contentAssocTypeId : "IMAGE_THUMBNAIL"], null, false);
contentAssocThumb = EntityUtil.getFirst(contentAssocThumbList);
if(contentAssocThumb) {
imageContentThumb = delegator.findOne("Content", [contentId : contentAssocThumb.contentIdTo], false);
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/SetDefaultImage.groovy Mon May 14 21:02:02 2012
@@ -37,7 +37,7 @@ imageManagementPath = FlexibleStringExpa
String fileType = "original";
String productId = request.getParameter("productId");
-productContentList = delegator.findByAnd("ProductContentAndInfo", UtilMisc.toMap("productId", productId, "productContentTypeId", "DEFAULT_IMAGE"));
+productContentList = delegator.findByAnd("ProductContentAndInfo", UtilMisc.toMap("productId", productId, "productContentTypeId", "DEFAULT_IMAGE"), null, false);
if (productContentList) {
dataResourceName = productContentList.get(0).drDataResourceName
}
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/imagemanagement/sortSequenceNum.groovy Mon May 14 21:02:02 2012
@@ -20,12 +20,12 @@
import org.ofbiz.entity.*
import org.ofbiz.base.util.*
-allSequenceNums = delegator.findByAnd("ProductContent", ["productId":parameters.productId, "productContentTypeId":"IMAGE"], ["sequenceNum"])
-nullSequenceNums = delegator.findByAnd("ProductContent", ["productId":parameters.productId, "productContentTypeId":"IMAGE", "sequenceNum":null])
+allSequenceNums = delegator.findByAnd("ProductContent", ["productId":parameters.productId, "productContentTypeId":"IMAGE"], ["sequenceNum"], false)
+nullSequenceNums = delegator.findByAnd("ProductContent", ["productId":parameters.productId, "productContentTypeId":"IMAGE", "sequenceNum":null], null, false)
productContents = allSequenceNums - nullSequenceNums
def duplicate = 0
if(parameters.sequenceNum){
- findExisted = delegator.findByAnd("ProductContent", ["productId":parameters.productId, "productContentTypeId":"IMAGE", "sequenceNum":(Long)parameters.sequenceNum])
+ findExisted = delegator.findByAnd("ProductContent", ["productId":parameters.productId, "productContentTypeId":"IMAGE", "sequenceNum":(Long)parameters.sequenceNum], null, false)
duplicate = findExisted.size()
}
if(duplicate > 1){
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductInventoryItems.groovy Mon May 14 21:02:02 2012
@@ -99,7 +99,7 @@ if (product) {
productInventoryItems = delegator.findByAnd("InventoryItem",
[productId : productId],
- ['facilityId', '-datetimeReceived', '-inventoryItemId']);
+ ['facilityId', '-datetimeReceived', '-inventoryItemId'], false);
// TODO: get all incoming shipments not yet arrived coming into each facility that this product is in, use a view entity with ShipmentAndItem
findIncomingShipmentsConds = [];
Modified: ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductSEO.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductSEO.groovy?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductSEO.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/WEB-INF/actions/product/EditProductSEO.groovy Mon May 14 21:02:02 2012
@@ -19,7 +19,7 @@
productId = parameters.productId;
if (productId) {
- productContents = delegator.findByAnd("ProductContent", ["productId" : productId]);
+ productContents = delegator.findByAnd("ProductContent", ["productId" : productId], null, false);
productContents.each{ productContent->
if (productContent.productContentTypeId == "PAGE_TITLE") {
contentTitle = delegator.findOne("Content", ["contentId" : productContent.contentId], false);
Modified: ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryStart.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryStart.ftl?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryStart.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/category/createProductInCategoryStart.ftl Mon May 14 21:02:02 2012
@@ -65,7 +65,7 @@ under the License.
<td width="15%">${uiLabelMap.ProductDefaultPrice}:</td>
<td><input type="text" name="defaultPrice" size="8"/>
<#assign findCurrenciesMap = Static["org.ofbiz.base.util.UtilMisc"].toMap("uomTypeId", "CURRENCY_MEASURE")>
- <#assign currencies = delegator.findByAndCache('Uom', findCurrenciesMap) />
+ <#assign currencies = delegator.findByAnd('Uom', findCurrenciesMap, null, true) />
<#if currencies?has_content && (currencies?size > 0)>
<select name="currencyUomId">
<option value=""></option>
Modified: ofbiz/trunk/applications/product/webapp/catalog/product/ViewProductOrders.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/product/ViewProductOrders.ftl?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/product/ViewProductOrders.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/product/ViewProductOrders.ftl Mon May 14 21:02:02 2012
@@ -72,7 +72,7 @@ under the License.
</tr>
<#if orderList?has_content && productId?exists>
<#list orderList as order>
- <#assign orderItems = delegator.findByAnd("OrderItem", {"orderId" : order.orderId, "productId" : productId})/>
+ <#assign orderItems = delegator.findByAnd("OrderItem", {"orderId" : order.orderId, "productId" : productId}, null, false)/>
<#list orderItems as orderItem>
<tr>
<td><a href="/ordermgr/control/orderview?orderId=${orderItem.orderId}" class='buttontext'>${orderItem.orderId}</a></td>
Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/LookupInventoryItems.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/LookupInventoryItems.groovy?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/LookupInventoryItems.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/inventory/LookupInventoryItems.groovy Mon May 14 21:02:02 2012
@@ -22,16 +22,16 @@ partyId = parameters.partyId;
productId = parameters.productId;
if (orderId && productId) {
- shipmentReceiptAndItems = delegator.findByAnd("ShipmentReceiptAndItem", [orderId : orderId, productId : productId]);
+ shipmentReceiptAndItems = delegator.findByAnd("ShipmentReceiptAndItem", [orderId : orderId, productId : productId], null, false);
context.inventoryItemsForPo = shipmentReceiptAndItems;
context.orderId = orderId;
}
if (partyId && productId) {
- orderRoles = delegator.findByAnd("OrderRole", [partyId : partyId, roleTypeId : "BILL_FROM_VENDOR"]);
+ orderRoles = delegator.findByAnd("OrderRole", [partyId : partyId, roleTypeId : "BILL_FROM_VENDOR"], null, false);
inventoryItemsForSupplier = [];
orderRoles.each { orderRole ->
- shipmentReceiptAndItems = delegator.findByAnd("ShipmentReceiptAndItem", [productId : productId, orderId : orderRole.orderId]);
+ shipmentReceiptAndItems = delegator.findByAnd("ShipmentReceiptAndItem", [productId : productId, orderId : orderRole.orderId], null, false);
inventoryItemsForSupplier.addAll(shipmentReceiptAndItems);
}
context.inventoryItemsForSupplier = inventoryItemsForSupplier;
@@ -39,7 +39,7 @@ if (partyId && productId) {
}
if (productId) {
- inventoryItems = delegator.findByAnd("InventoryItem", [productId : productId]);
+ inventoryItems = delegator.findByAnd("InventoryItem", [productId : productId], null, false);
context.inventoryItemsForProduct = inventoryItems;
context.productId = productId;
product = delegator.findOne("Product", [productId : productId], false);
Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy?rev=1338411&r1=1338410&r2=1338411&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/PackOrder.groovy Mon May 14 21:02:02 2012
@@ -114,7 +114,7 @@ packSession.setFacilityId(facilityId);
if (invoiceIds) {
orderId = null;
}
-shipment = EntityUtil.getFirst(delegator.findByAnd("Shipment", [primaryOrderId : orderId, statusId : "SHIPMENT_PICKED"]));
+shipment = EntityUtil.getFirst(delegator.findByAnd("Shipment", [primaryOrderId : orderId, statusId : "SHIPMENT_PICKED"], null, false));
context.shipment = shipment;
context.packingSession = packSession;