You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2015/04/10 22:22:59 UTC
svn commit: r1672752 [11/18] - in /ofbiz/trunk:
applications/accounting/src/org/ofbiz/accounting/agreement/
applications/accounting/src/org/ofbiz/accounting/finaccount/
applications/accounting/src/org/ofbiz/accounting/invoice/
applications/accounting/s...
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java Fri Apr 10 20:22:54 2015
@@ -22,16 +22,15 @@ import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashSet;
import java.util.Iterator;
+import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
-import javolution.util.FastList;
-import javolution.util.FastSet;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilMisc;
@@ -60,6 +59,8 @@ import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.party.party.PartyHelper;
import org.ofbiz.product.category.CategoryContentWrapper;
+import com.sun.syndication.feed.atom.Link;
+
/**
* Utilities for product search based on various constraints including categories, features and keywords.
@@ -71,7 +72,7 @@ public class ProductSearch {
public static final String resourceCommon = "CommonUiLabels";
public static ArrayList<String> parametricKeywordSearch(Map<?, String> featureIdByType, String keywordsString, Delegator delegator, String productCategoryId, String visitId, boolean anyPrefix, boolean anySuffix, boolean isAnd) {
- Set<String> featureIdSet = FastSet.newInstance();
+ Set<String> featureIdSet = new HashSet<String>();
if (featureIdByType != null) {
featureIdSet.addAll(featureIdByType.values());
}
@@ -80,7 +81,7 @@ public class ProductSearch {
}
public static ArrayList<String> parametricKeywordSearch(Set<String> featureIdSet, String keywordsString, Delegator delegator, String productCategoryId, boolean includeSubCategories, String visitId, boolean anyPrefix, boolean anySuffix, boolean isAnd) {
- List<ProductSearchConstraint> productSearchConstraintList = FastList.newInstance();
+ List<ProductSearchConstraint> productSearchConstraintList = new LinkedList<ProductSearch.ProductSearchConstraint>();
if (UtilValidate.isNotEmpty(productCategoryId)) {
productSearchConstraintList.add(new CategoryConstraint(productCategoryId, includeSubCategories, null));
@@ -141,17 +142,17 @@ public class ProductSearch {
public static class ProductSearchContext {
public int index = 1;
- public List<EntityCondition> entityConditionList = FastList.newInstance();
- public List<String> orderByList = FastList.newInstance();
+ public List<EntityCondition> entityConditionList = new LinkedList<EntityCondition>();
+ public List<String> orderByList = new LinkedList<String>();
public List<String> fieldsToSelect = UtilMisc.toList("mainProductId");
public DynamicViewEntity dynamicViewEntity = new DynamicViewEntity();
public boolean productIdGroupBy = false;
public boolean includedKeywordSearch = false;
public Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
- public List<Set<String>> keywordFixedOrSetAndList = FastList.newInstance();
- public Set<String> orKeywordFixedSet = FastSet.newInstance();
- public Set<String> andKeywordFixedSet = FastSet.newInstance();
- public List<GenericValue> productSearchConstraintList = FastList.newInstance();
+ public List<Set<String>> keywordFixedOrSetAndList = new LinkedList<Set<String>>();
+ public Set<String> orKeywordFixedSet = new HashSet<String>();
+ public Set<String> andKeywordFixedSet = new HashSet<String>();
+ public List<GenericValue> productSearchConstraintList = new LinkedList<GenericValue>();
public ResultSortOrder resultSortOrder = null;
public Integer resultOffset = null;
public Integer maxResults = null;
@@ -159,29 +160,29 @@ public class ProductSearch {
protected String visitId = null;
protected Integer totalResults = null;
- public Set<String> includeCategoryIds = FastSet.newInstance();
- public Set<String> excludeCategoryIds = FastSet.newInstance();
- public Set<String> alwaysIncludeCategoryIds = FastSet.newInstance();
+ public Set<String> includeCategoryIds = new HashSet<String>();
+ public Set<String> excludeCategoryIds = new HashSet<String>();
+ public Set<String> alwaysIncludeCategoryIds = new HashSet<String>();
- public List<Set<String>> includeCategoryIdOrSetAndList = FastList.newInstance();
- public List<Set<String>> alwaysIncludeCategoryIdOrSetAndList = FastList.newInstance();
+ public List<Set<String>> includeCategoryIdOrSetAndList = new LinkedList<Set<String>>();
+ public List<Set<String>> alwaysIncludeCategoryIdOrSetAndList = new LinkedList<Set<String>>();
- public Set<String> includeFeatureIds = FastSet.newInstance();
- public Set<String> excludeFeatureIds = FastSet.newInstance();
- public Set<String> alwaysIncludeFeatureIds = FastSet.newInstance();
+ public Set<String> includeFeatureIds = new HashSet<String>();
+ public Set<String> excludeFeatureIds = new HashSet<String>();
+ public Set<String> alwaysIncludeFeatureIds = new HashSet<String>();
- public List<Set<String>> includeFeatureIdOrSetAndList = FastList.newInstance();
- public List<Set<String>> alwaysIncludeFeatureIdOrSetAndList = FastList.newInstance();
+ public List<Set<String>> includeFeatureIdOrSetAndList = new LinkedList<Set<String>>();
+ public List<Set<String>> alwaysIncludeFeatureIdOrSetAndList = new LinkedList<Set<String>>();
- public Set<String> includeFeatureCategoryIds = FastSet.newInstance();
- public Set<String> excludeFeatureCategoryIds = FastSet.newInstance();
- public Set<String> alwaysIncludeFeatureCategoryIds = FastSet.newInstance();
+ public Set<String> includeFeatureCategoryIds = new HashSet<String>();
+ public Set<String> excludeFeatureCategoryIds = new HashSet<String>();
+ public Set<String> alwaysIncludeFeatureCategoryIds = new HashSet<String>();
- public Set<String> includeFeatureGroupIds = FastSet.newInstance();
- public Set<String> excludeFeatureGroupIds = FastSet.newInstance();
- public Set<String> alwaysIncludeFeatureGroupIds = FastSet.newInstance();
+ public Set<String> includeFeatureGroupIds = new HashSet<String>();
+ public Set<String> excludeFeatureGroupIds = new HashSet<String>();
+ public Set<String> alwaysIncludeFeatureGroupIds = new HashSet<String>();
- public List<String> keywordTypeIds = FastList.newInstance();
+ public List<String> keywordTypeIds = new LinkedList<String>();
public String statusId = null;
public ProductSearchContext(Delegator delegator, String visitId) {
@@ -301,7 +302,7 @@ public class ProductSearch {
// keyword type filter
if (UtilValidate.isNotEmpty(keywordTypeIds)) {
- List<EntityCondition> keywordTypeCons = FastList.newInstance();
+ List<EntityCondition> keywordTypeCons = new LinkedList<EntityCondition>();
for (String keywordTypeId : keywordTypeIds) {
keywordTypeCons.add(EntityCondition.makeCondition("keywordTypeId", EntityOperator.EQUALS, keywordTypeId));
}
@@ -337,7 +338,7 @@ public class ProductSearch {
dynamicViewEntity.addMemberEntity(entityAlias, "ProductKeyword");
dynamicViewEntity.addAlias(entityAlias, prefix + "Keyword", "keyword", null, null, null, null);
dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
- List<EntityCondition> keywordOrList = FastList.newInstance();
+ List<EntityCondition> keywordOrList = new LinkedList<EntityCondition>();
for (String keyword: keywordFixedOrSet) {
keywordOrList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword));
}
@@ -369,10 +370,10 @@ public class ProductSearch {
// create new view members with logic:
// ((each Id = category includes AND Id IN feature includes) AND (Id NOT IN category excludes AND Id NOT IN feature excludes))
// OR (each Id = category alwaysIncludes AND each Id = feature alwaysIncludes)
- List<EntityCondition> incExcCondList = FastList.newInstance();
+ List<EntityCondition> incExcCondList = new LinkedList<EntityCondition>();
EntityCondition incExcCond = null;
- List<EntityCondition> alwIncCondList = FastList.newInstance();
+ List<EntityCondition> alwIncCondList = new LinkedList<EntityCondition>();
EntityCondition alwIncCond = null;
EntityCondition topCond = null;
@@ -455,7 +456,7 @@ public class ProductSearch {
}
if (excludeCategoryIds.size() > 0) {
- List<EntityCondition> idExcludeCondList = FastList.newInstance();
+ List<EntityCondition> idExcludeCondList = new LinkedList<EntityCondition>();
idExcludeCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
idExcludeCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
idExcludeCondList.add(EntityCondition.makeCondition("productCategoryId", EntityOperator.IN, excludeCategoryIds));
@@ -463,7 +464,7 @@ public class ProductSearch {
incExcCondList.add(EntityCondition.makeCondition("mainProductId", EntityOperator.NOT_EQUAL, subSelCond));
}
if (excludeFeatureIds.size() > 0) {
- List<EntityCondition> idExcludeCondList = FastList.newInstance();
+ List<EntityCondition> idExcludeCondList = new LinkedList<EntityCondition>();
idExcludeCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
idExcludeCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
idExcludeCondList.add(EntityCondition.makeCondition("productFeatureId", EntityOperator.IN, excludeFeatureIds));
@@ -471,7 +472,7 @@ public class ProductSearch {
incExcCondList.add(EntityCondition.makeCondition("mainProductId", EntityOperator.NOT_EQUAL, subSelCond));
}
if (excludeFeatureCategoryIds.size() > 0) {
- List<EntityCondition> idExcludeCondList = FastList.newInstance();
+ List<EntityCondition> idExcludeCondList = new LinkedList<EntityCondition>();
idExcludeCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
idExcludeCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
idExcludeCondList.add(EntityCondition.makeCondition("productFeatureCategoryId", EntityOperator.IN, excludeFeatureCategoryIds));
@@ -479,7 +480,7 @@ public class ProductSearch {
incExcCondList.add(EntityCondition.makeCondition("mainProductId", EntityOperator.NOT_EQUAL, subSelCond));
}
if (excludeFeatureGroupIds.size() > 0) {
- List<EntityCondition> idExcludeCondList = FastList.newInstance();
+ List<EntityCondition> idExcludeCondList = new LinkedList<EntityCondition>();
idExcludeCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
idExcludeCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, this.nowTimestamp));
idExcludeCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("groupThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("groupThruDate", EntityOperator.GREATER_THAN, this.nowTimestamp)));
@@ -647,7 +648,7 @@ public class ProductSearch {
this.entityConditionList.add(topCond);
- Debug.logInfo("topCond=" + topCond.makeWhereString(null, FastList.<EntityConditionParam>newInstance(), EntityConfig.getDatasource(delegator.getEntityHelperName("Product"))), module);
+ if (Debug.infoOn()) Debug.logInfo("topCond=" + topCond.makeWhereString(null, new LinkedList<EntityConditionParam>(), EntityConfig.getDatasource(delegator.getEntityHelperName("Product"))), module);
}
public EntityListIterator doQuery(Delegator delegator) {
@@ -744,7 +745,7 @@ public class ProductSearch {
int numRetreived = 1;
int duplicatesFound = 0;
- Set<String> productIdSet = FastSet.newInstance();
+ Set<String> productIdSet = new HashSet<String>();
productIds.add(searchResult.getString("mainProductId"));
productIdSet.add(searchResult.getString("mainProductId"));
@@ -862,7 +863,7 @@ public class ProductSearch {
@Override
public void addConstraint(ProductSearchContext productSearchContext) {
- List<String> productCategoryIds = FastList.newInstance();
+ List<String> productCategoryIds = new LinkedList<String>();
for (GenericValue category: productCategories) {
productCategoryIds.add(category.getString("productCategoryId"));
}
@@ -945,7 +946,7 @@ public class ProductSearch {
@Override
public void addConstraint(ProductSearchContext productSearchContext) {
- Set<String> productCategoryIdSet = FastSet.newInstance();
+ Set<String> productCategoryIdSet = new HashSet<String>();
if (includeSubCategories) {
// find all sub-categories recursively, make a Set of productCategoryId
ProductSearch.getAllSubCategoryIds(productCategoryId, productCategoryIdSet, productSearchContext.getDelegator(), productSearchContext.nowTimestamp);
@@ -1277,7 +1278,7 @@ public class ProductSearch {
* @param exclude This is a tri-state variable: null = Include, true = Exclude, false = AlwaysInclude
*/
public FeatureSetConstraint(Collection<String> productFeatureIdSet, Boolean exclude) {
- this.productFeatureIdSet = FastSet.newInstance();
+ this.productFeatureIdSet = new HashSet<String>();
this.productFeatureIdSet.addAll(productFeatureIdSet);
this.exclude = exclude;
}
@@ -1416,7 +1417,7 @@ public class ProductSearch {
expandedSet.add(keyword);
}
Set<String> fixedSet = KeywordSearchUtil.fixKeywordsForSearch(expandedSet, anyPrefix, anySuffix, removeStems, isAnd);
- Set<String> fixedKeywordSet = FastSet.newInstance();
+ Set<String> fixedKeywordSet = new HashSet<String>();
fixedKeywordSet.addAll(fixedSet);
productSearchContext.keywordFixedOrSetAndList.add(fixedKeywordSet);
}
@@ -2205,8 +2206,8 @@ public class ProductSearch {
// make view-entity & EntityCondition
int index = 1;
- List entityConditionList = new FastList.newInstance();
- List orderByList = new FastList.newInstance();
+ List entityConditionList = new LinkedList();
+ List orderByList = new LinkedList();
List fieldsToSelect = UtilMisc.toList("productId");
DynamicViewEntity dynamicViewEntity = new DynamicViewEntity();
dynamicViewEntity.addMemberEntity("PROD", "Product");
@@ -2218,7 +2219,7 @@ public class ProductSearch {
List productCategoryIdList = null;
if (includeSubCategories) {
// find all sub-categories recursively, make a Set of productCategoryId
- Set productCategoryIdSet = Fast.newInstance();
+ Set productCategoryIdSet = new HashSet();
getAllSubCategoryIds(productCategoryId, productCategoryIdSet, delegator, nowTimestamp);
productCategoryIdList = UtilMisc.makeListWritable(productCategoryIdSet);
} else {
@@ -2278,7 +2279,7 @@ public class ProductSearch {
dynamicViewEntity.addViewLink("PROD", entityAlias, Boolean.FALSE, ModelKeyMap.makeKeyMapList("productId"));
orderByList.add("-totalRelevancy");
fieldsToSelect.add("totalRelevancy");
- List<EntityCondition> keywordOrList = new FastList.newInstance();
+ List<EntityCondition> keywordOrList = new LinkedList();
for (String keyword: keywordList) {
keywordOrList.add(EntityCondition.makeCondition(prefix + "Keyword", EntityOperator.LIKE, keyword));
}
@@ -2320,8 +2321,8 @@ public class ProductSearch {
return null;
}
- ArrayList productIds = FastList.newInstance();
- Set productIdSet = Fast.newInstance();
+ ArrayList productIds = new LinkedList();
+ Set productIdSet = new HashSet();
GenericValue searchResult = null;
while ((searchResult = (GenericValue) eli.next()) != null) {
String productId = searchResult.getString("productId");
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=1672752&r1=1672751&r2=1672752&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 Fri Apr 10 20:22:54 2015
@@ -20,6 +20,8 @@ package org.ofbiz.product.product;
import java.math.BigDecimal;
import java.sql.Timestamp;
+import java.util.HashMap;
+import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -28,9 +30,6 @@ import javax.servlet.http.HttpServletReq
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
-import javolution.util.FastList;
-import javolution.util.FastMap;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilHttp;
import org.ofbiz.base.util.UtilMisc;
@@ -395,7 +394,7 @@ public class ProductSearchEvents {
public static String searchExportProductList(HttpServletRequest request, HttpServletResponse response) {
Delegator delegator = (Delegator) request.getAttribute("delegator");
String errMsg = null;
- List<Map<String, Object>> productExportList = FastList.newInstance();
+ List<Map<String, Object>> productExportList = new LinkedList<Map<String,Object>>();
try {
boolean beganTransaction = TransactionUtil.begin(DEFAULT_TX_TIMEOUT);
@@ -409,7 +408,7 @@ public class ProductSearchEvents {
GenericValue searchResultView = null;
while ((searchResultView = eli.next()) != null) {
- Map<String, Object> productMap = FastMap.newInstance();
+ Map<String, Object> productMap = new HashMap<String, Object>();
String productId = searchResultView.getString("mainProductId");
productMap.put("productId", productId);
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=1672752&r1=1672751&r2=1672752&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 Fri Apr 10 20:22:54 2015
@@ -23,6 +23,9 @@ import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -33,10 +36,6 @@ import javax.servlet.http.HttpServletReq
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
-import javolution.util.FastList;
-import javolution.util.FastMap;
-import javolution.util.FastSet;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilGenerics;
@@ -89,7 +88,7 @@ public class ProductSearchSession {
/** Basic copy constructor */
public ProductSearchOptions(ProductSearchOptions productSearchOptions) {
- this.constraintList = FastList.newInstance();
+ this.constraintList = new LinkedList<ProductSearch.ProductSearchConstraint>();
if (UtilValidate.isNotEmpty(productSearchOptions.constraintList)) {
this.constraintList.addAll(productSearchOptions.constraintList);
}
@@ -111,7 +110,7 @@ public class ProductSearchSession {
public static void addConstraint(ProductSearchConstraint productSearchConstraint, HttpSession session) {
ProductSearchOptions productSearchOptions = getProductSearchOptions(session);
if (productSearchOptions.constraintList == null) {
- productSearchOptions.constraintList = FastList.newInstance();
+ productSearchOptions.constraintList = new LinkedList<ProductSearch.ProductSearchConstraint>();
}
if (!productSearchOptions.constraintList.contains(productSearchConstraint)) {
productSearchOptions.constraintList.add(productSearchConstraint);
@@ -280,7 +279,7 @@ public class ProductSearchSession {
public List<String> searchGetConstraintStrings(boolean detailed, Delegator delegator, Locale locale) {
List<ProductSearchConstraint> productSearchConstraintList = this.getConstraintList();
- List<String> constraintStrings = FastList.newInstance();
+ List<String> constraintStrings = new LinkedList<String>();
if (productSearchConstraintList == null) {
return constraintStrings;
}
@@ -318,7 +317,7 @@ public class ProductSearchSession {
public static List<ProductSearchOptions> getSearchOptionsHistoryList(HttpSession session) {
List<ProductSearchOptions> optionsHistoryList = UtilGenerics.checkList(session.getAttribute("_PRODUCT_SEARCH_OPTIONS_HISTORY_"));
if (optionsHistoryList == null) {
- optionsHistoryList = FastList.newInstance();
+ optionsHistoryList = new LinkedList<ProductSearchSession.ProductSearchOptions>();
session.setAttribute("_PRODUCT_SEARCH_OPTIONS_HISTORY_", optionsHistoryList);
}
return optionsHistoryList;
@@ -384,7 +383,7 @@ public class ProductSearchSession {
String productStoreId = ProductStoreWorker.getProductStoreId(request);
if (productStoreId != null) {
// get a Set of all keywords in the search, if there are any...
- Set<String> keywords = FastSet.newInstance();
+ Set<String> keywords = new HashSet<String>();
List<ProductSearchConstraint> constraintList = ProductSearchOptions.getConstraintList(session);
if (constraintList != null) {
for (ProductSearchConstraint constraint: constraintList) {
@@ -869,7 +868,7 @@ public class ProductSearchSession {
String paging = "Y";
int previousViewSize = 20;
Map<String, Object> requestParams = UtilHttp.getCombinedMap(request);
- List<String> keywordTypeIds = FastList.newInstance();
+ List<String> keywordTypeIds = new LinkedList<String>();
if (requestParams.get("keywordTypeId") instanceof String) {
keywordTypeIds.add((String) requestParams.get("keywordTypeId"));
} else if (requestParams.get("keywordTypeId") instanceof List){
@@ -906,7 +905,7 @@ public class ProductSearchSession {
highIndex = (viewIndex + 1) * viewSize;
// ========== Do the actual search
- List<String> productIds = FastList.newInstance();
+ List<String> productIds = new LinkedList<String>();
String visitId = VisitHandler.getVisitId(session);
List<ProductSearchConstraint> productSearchConstraintList = ProductSearchOptions.getConstraintList(session);
String noConditionFind = (String) requestParams.get("noConditionFind");
@@ -920,11 +919,11 @@ public class ProductSearchSession {
int addOnTopTotalListSize = 0;
int addOnTopListSize = 0;
- List<GenericValue> addOnTopProductCategoryMembers = FastList.newInstance();
+ List<GenericValue> addOnTopProductCategoryMembers = new LinkedList<GenericValue>();
if (UtilValidate.isNotEmpty(addOnTopProdCategoryId)) {
// always include the members of the addOnTopProdCategoryId
Timestamp now = UtilDateTime.nowTimestamp();
- List<EntityCondition> addOnTopProdCondList = FastList.newInstance();
+ List<EntityCondition> addOnTopProdCondList = new LinkedList<EntityCondition>();
addOnTopProdCondList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("thruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("thruDate", EntityOperator.GREATER_THAN, now)));
addOnTopProdCondList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN, now));
addOnTopProdCondList.add(EntityCondition.makeCondition("productCategoryId", EntityOperator.EQUALS, addOnTopProdCategoryId));
@@ -1007,7 +1006,7 @@ public class ProductSearchSession {
String searchSortOrderString = searchGetSortOrderString(false, request);
// ========== populate the result Map
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
result.put("productIds", productIds);
result.put("viewIndex", Integer.valueOf(viewIndex));
@@ -1252,7 +1251,7 @@ public class ProductSearchSession {
return null;
}
- List<Map<String, String>> featureCountList = FastList.newInstance();
+ List<Map<String, String>> featureCountList = new LinkedList<Map<String,String>>();
GenericValue searchResult = null;
while ((searchResult = eli.next()) != null) {
featureCountList.add(UtilMisc.<String, String>toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount"))));
@@ -1301,7 +1300,7 @@ public class ProductSearchSession {
DynamicViewEntity dynamicViewEntity = productSearchContext.dynamicViewEntity;
List<EntityCondition> entityConditionList = productSearchContext.entityConditionList;
- List<String> fieldsToSelect = FastList.newInstance();
+ List<String> fieldsToSelect = new LinkedList<String>();
dynamicViewEntity.addMemberEntity("PPC", "ProductPrice");
dynamicViewEntity.addAlias("PPC", "ppcProductPriceTypeId", "productPriceTypeId", null, null, null, null);
@@ -1367,7 +1366,7 @@ public class ProductSearchSession {
DynamicViewEntity dynamicViewEntity = productSearchContext.dynamicViewEntity;
List<EntityCondition> entityConditionList = productSearchContext.entityConditionList;
- List<String> fieldsToSelect = FastList.newInstance();
+ List<String> fieldsToSelect = new LinkedList<String>();
dynamicViewEntity.addMemberEntity("PCMC", "ProductCategoryMember");
dynamicViewEntity.addAlias("PCMC", "pcmcProductCategoryId", "productCategoryId", null, null, null, null);
@@ -1379,7 +1378,7 @@ public class ProductSearchSession {
entityConditionList.add(EntityCondition.makeCondition(EntityCondition.makeCondition("pcmcThruDate", EntityOperator.EQUALS, null), EntityOperator.OR, EntityCondition.makeCondition("pcmcThruDate", EntityOperator.GREATER_THAN, productSearchContext.nowTimestamp)));
entityConditionList.add(EntityCondition.makeCondition("pcmcFromDate", EntityOperator.LESS_THAN, productSearchContext.nowTimestamp));
- Set<String> productCategoryIdSet = FastSet.newInstance();
+ Set<String> productCategoryIdSet = new HashSet<String>();
ProductSearch.getAllSubCategoryIds(productCategoryId, productCategoryIdSet, delegator, productSearchContext.nowTimestamp);
entityConditionList.add(EntityCondition.makeCondition("pcmcProductCategoryId", EntityOperator.IN, productCategoryIdSet));
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=1672752&r1=1672751&r2=1672752&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 Fri Apr 10 20:22:54 2015
@@ -28,18 +28,16 @@ import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.sql.Timestamp;
import java.util.Arrays;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
+import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
-import javolution.util.FastList;
-import javolution.util.FastMap;
-import javolution.util.FastSet;
-
import org.jdom.JDOMException;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
@@ -94,13 +92,13 @@ public class ProductServices {
Delegator delegator = dctx.getDelegator();
Locale locale = (Locale) context.get("locale");
Map<String, String> selectedFeatures = UtilGenerics.checkMap(context.get("selectedFeatures"));
- List<GenericValue> products = FastList.newInstance();
+ List<GenericValue> products = new LinkedList<GenericValue>();
// All the variants for this products are retrieved
Map<String, Object> resVariants = prodFindAllVariants(dctx, context);
List<GenericValue> variants = UtilGenerics.checkList(resVariants.get("assocProducts"));
for (GenericValue oneVariant: variants) {
// For every variant, all the standard features are retrieved
- Map<String, String> feaContext = FastMap.newInstance();
+ Map<String, String> feaContext = new HashMap<String, String>();
feaContext.put("productId", oneVariant.getString("productIdTo"));
feaContext.put("type", "STANDARD_FEATURE");
Map<String, Object> resFeatures = prodGetFeatures(dctx, feaContext);
@@ -201,7 +199,7 @@ public class ProductServices {
Delegator delegator = dctx.getDelegator();
LocalDispatcher dispatcher = dctx.getDispatcher();
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
List<String> featureOrder = UtilMisc.makeListWritable(UtilGenerics.<String>checkCollection(context.get("featureOrder")));
if (UtilValidate.isEmpty(featureOrder)) {
@@ -210,13 +208,13 @@ public class ProductServices {
}
List<GenericValue> variants = UtilGenerics.checkList(prodFindAllVariants(dctx, context).get("assocProducts"));
- List<String> virtualVariant = FastList.newInstance();
+ List<String> virtualVariant = new LinkedList<String>();
if (UtilValidate.isEmpty(variants)) {
return ServiceUtil.returnSuccess();
}
- List<String> items = FastList.newInstance();
- List<GenericValue> outOfStockItems = FastList.newInstance();
+ List<String> items = new LinkedList<String>();
+ List<GenericValue> outOfStockItems = new LinkedList<GenericValue>();
for (GenericValue variant: variants) {
String productIdTo = variant.getString("productIdTo");
@@ -301,13 +299,13 @@ public class ProductServices {
return ServiceUtil.returnError(UtilProperties.getMessage(resourceError,
"productservices.empty_list_of_selectable_features_found", locale));
}
- Map<String, List<String>> features = FastMap.newInstance();
+ Map<String, List<String>> features = new HashMap<String, List<String>>();
for (GenericValue v: selectableFeatures) {
String featureType = v.getString("productFeatureTypeId");
String feature = v.getString("description");
if (!features.containsKey(featureType)) {
- List<String> featureList = FastList.newInstance();
+ List<String> featureList = new LinkedList<String>();
featureList.add(feature);
features.put(featureType, featureList);
} else {
@@ -358,7 +356,7 @@ public class ProductServices {
// * String type -- Type of feature (STANDARD_FEATURE, SELECTABLE_FEATURE)
// * String distinct -- Distinct feature (SIZE, COLOR)
Delegator delegator = dctx.getDelegator();
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
String productId = (String) context.get("productId");
String distinct = (String) context.get("distinct");
String type = (String) context.get("type");
@@ -390,7 +388,7 @@ public class ProductServices {
public static Map<String, Object> prodFindProduct(DispatchContext dctx, Map<String, ? extends Object> context) {
// * String productId -- Product ID to find
Delegator delegator = dctx.getDelegator();
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
String productId = (String) context.get("productId");
Locale locale = (Locale) context.get("locale");
String errMsg = null;
@@ -441,7 +439,7 @@ public class ProductServices {
// * String productId -- Current Product ID
// * String type -- Type of association (ie PRODUCT_UPGRADE, PRODUCT_COMPLEMENT, PRODUCT_VARIANT)
Delegator delegator = dctx.getDelegator();
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
String productId = (String) context.get("productId");
String productIdTo = (String) context.get("productIdTo");
String type = (String) context.get("type");
@@ -497,7 +495,7 @@ public class ProductServices {
try {
List<GenericValue> productAssocs = null;
- List<String> orderBy = FastList.newInstance();
+ List<String> orderBy = new LinkedList<String>();
if (sortDescending) {
orderBy.add("sequenceNum DESC");
} else {
@@ -550,8 +548,8 @@ public class ProductServices {
// Builds a product feature tree
private static Map<String, Object> makeGroup(Delegator delegator, Map<String, List<String>> featureList, List<String> items, List<String> order, int index)
throws IllegalArgumentException, IllegalStateException {
- //List featureKey = FastList.newInstance();
- Map<String, List<String>> tempGroup = FastMap.newInstance();
+ //List featureKey = new LinkedList();
+ Map<String, List<String>> tempGroup = new HashMap<String, List<String>>();
Map<String, Object> group = new LinkedHashMap<String, Object>();
String orderKey = order.get(index);
@@ -647,7 +645,7 @@ public class ProductServices {
// builds a variant sample (a single sku for a featureType)
private static Map<String, GenericValue> makeVariantSample(Delegator delegator, Map<String, List<String>> featureList, List<String> items, String feature) {
- Map<String, GenericValue> tempSample = FastMap.newInstance();
+ Map<String, GenericValue> tempSample = new HashMap<String, GenericValue>();
Map<String, GenericValue> sample = new LinkedHashMap<String, GenericValue>();
for (String productId: items) {
List<GenericValue> features = null;
@@ -686,7 +684,7 @@ public class ProductServices {
public static Map<String, Object> quickAddVariant(DispatchContext dctx, Map<String, ? extends Object> context) {
Delegator delegator = dctx.getDelegator();
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
Locale locale = (Locale) context.get("locale");
String errMsg=null;
String productId = (String) context.get("productId");
@@ -819,14 +817,14 @@ public class ProductServices {
// separate variantProductIdsBag into a Set of variantProductIds
//note: can be comma, tab, or white-space delimited
- Set<String> prelimVariantProductIds = FastSet.newInstance();
+ Set<String> prelimVariantProductIds = new HashSet<String>();
List<String> splitIds = Arrays.asList(variantProductIdsBag.split("[,\\p{Space}]"));
Debug.logInfo("Variants: bag=" + variantProductIdsBag, module);
Debug.logInfo("Variants: split=" + splitIds, module);
prelimVariantProductIds.addAll(splitIds);
//note: should support both direct productIds and GoodIdentification entries (what to do if more than one GoodID? Add all?
- Map<String, GenericValue> variantProductsById = FastMap.newInstance();
+ Map<String, GenericValue> variantProductsById = new HashMap<String, GenericValue>();
for (String variantProductId: prelimVariantProductIds) {
if (UtilValidate.isEmpty(variantProductId)) {
// not sure why this happens, but seems to from time to time with the split method
@@ -860,7 +858,7 @@ public class ProductServices {
}
// Attach productFeatureIdOne, Two, Three to the new virtual and all variant products as a standard feature
- Set<String> featureProductIds = FastSet.newInstance();
+ Set<String> featureProductIds = new HashSet<String>();
featureProductIds.add(productId);
featureProductIds.addAll(variantProductsById.keySet());
Set<String> productFeatureIds = new HashSet<String>();
@@ -975,7 +973,7 @@ public class ProductServices {
Locale locale = (Locale) context.get("locale");
if (UtilValidate.isNotEmpty(context.get("_uploadedFile_fileName"))) {
- Map<String, Object>imageContext = FastMap.newInstance();
+ Map<String, Object> imageContext = new HashMap<String, Object>();
imageContext.putAll(context);
imageContext.put("delegator", delegator);
imageContext.put("tenantId",delegator.getDelegatorTenantId());
@@ -1001,7 +999,7 @@ public class ProductServices {
filenameToUse = fileLocation.substring(fileLocation.lastIndexOf("/") + 1);
}
- List<GenericValue> fileExtension = FastList.newInstance();
+ List<GenericValue> fileExtension = new LinkedList<GenericValue>();
try {
fileExtension = EntityQuery.use(delegator).from("FileExtension").where("mimeTypeId", (String) context.get("_uploadedFile_contentType")).queryList();
} catch (GenericEntityException e) {
@@ -1072,7 +1070,7 @@ public class ProductServices {
}
/* scale Image in different sizes */
- Map<String, Object> resultResize = FastMap.newInstance();
+ Map<String, Object> resultResize = new HashMap<String, Object>();
try {
resultResize.putAll(ScaleImage.scaleImageInAllSize(imageContext, filenameToUse, "additional", viewNumber));
} catch (IOException e) {
@@ -1126,12 +1124,12 @@ public class ProductServices {
if (UtilValidate.isNotEmpty(imageUrl) && imageUrl.length() > 0) {
String contentId = (String) context.get("contentId");
- Map<String, Object> dataResourceCtx = FastMap.newInstance();
+ Map<String, Object> dataResourceCtx = new HashMap<String, Object>();
dataResourceCtx.put("objectInfo", imageUrl);
dataResourceCtx.put("dataResourceName", context.get("_uploadedFile_fileName"));
dataResourceCtx.put("userLogin", userLogin);
- Map<String, Object> productContentCtx = FastMap.newInstance();
+ Map<String, Object> productContentCtx = new HashMap<String, Object>();
productContentCtx.put("productId", productId);
productContentCtx.put("productContentTypeId", productContentTypeId);
productContentCtx.put("fromDate", context.get("fromDate"));
@@ -1167,7 +1165,7 @@ public class ProductServices {
} else {
dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT");
dataResourceCtx.put("mimeTypeId", "text/html");
- Map<String, Object> dataResourceResult = FastMap.newInstance();
+ Map<String, Object> dataResourceResult = new HashMap<String, Object>();
try {
dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx);
} catch (GenericServiceException e) {
@@ -1175,7 +1173,7 @@ public class ProductServices {
return ServiceUtil.returnError(e.getMessage());
}
- Map<String, Object> contentCtx = FastMap.newInstance();
+ Map<String, Object> contentCtx = new HashMap<String, Object>();
contentCtx.put("contentId", contentId);
contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId"));
contentCtx.put("userLogin", userLogin);
@@ -1198,7 +1196,7 @@ public class ProductServices {
} else {
dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT");
dataResourceCtx.put("mimeTypeId", "text/html");
- Map<String, Object> dataResourceResult = FastMap.newInstance();
+ Map<String, Object> dataResourceResult = new HashMap<String, Object>();
try {
dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx);
} catch (GenericServiceException e) {
@@ -1206,11 +1204,11 @@ public class ProductServices {
return ServiceUtil.returnError(e.getMessage());
}
- Map<String, Object> contentCtx = FastMap.newInstance();
+ Map<String, Object> contentCtx = new HashMap<String, Object>();
contentCtx.put("contentTypeId", "DOCUMENT");
contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId"));
contentCtx.put("userLogin", userLogin);
- Map<String, Object> contentResult = FastMap.newInstance();
+ Map<String, Object> contentResult = new HashMap<String, Object>();
try {
contentResult = dispatcher.runSync("createContent", contentCtx);
} catch (GenericServiceException e) {
@@ -1281,7 +1279,7 @@ public class ProductServices {
Locale locale = (Locale) context.get("locale");
if (UtilValidate.isNotEmpty(context.get("_uploadedFile_fileName"))) {
- Map<String, Object>imageContext = FastMap.newInstance();
+ Map<String, Object> imageContext = new HashMap<String, Object>();
imageContext.putAll(context);
imageContext.put("tenantId",delegator.getDelegatorTenantId());
String imageFilenameFormat = EntityUtilProperties.getPropertyValue("catalog", "image.filename.format", delegator);
@@ -1300,7 +1298,7 @@ public class ProductServices {
filenameToUse = fileLocation.substring(fileLocation.lastIndexOf("/") + 1);
}
- List<GenericValue> fileExtension = FastList.newInstance();
+ List<GenericValue> fileExtension = new LinkedList<GenericValue>();
try {
fileExtension = EntityQuery.use(delegator).from("FileExtension").where("mimeTypeId", EntityOperator.EQUALS, (String) context.get("_uploadedFile_contentType")).queryList();
} catch (GenericEntityException e) {
@@ -1337,12 +1335,12 @@ public class ProductServices {
String imageUrl = imageUrlPrefix + "/" + filePathPrefix + filenameToUse;
if (UtilValidate.isNotEmpty(imageUrl) && imageUrl.length() > 0) {
- Map<String, Object> dataResourceCtx = FastMap.newInstance();
+ Map<String, Object> dataResourceCtx = new HashMap<String, Object>();
dataResourceCtx.put("objectInfo", imageUrl);
dataResourceCtx.put("dataResourceName", context.get("_uploadedFile_fileName"));
dataResourceCtx.put("userLogin", userLogin);
- Map<String, Object> productPromoContentCtx = FastMap.newInstance();
+ Map<String, Object> productPromoContentCtx = new HashMap<String, Object>();
productPromoContentCtx.put("productPromoId", productPromoId);
productPromoContentCtx.put("productPromoContentTypeId", productPromoContentTypeId);
productPromoContentCtx.put("fromDate", context.get("fromDate"));
@@ -1378,7 +1376,7 @@ public class ProductServices {
} else {
dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT");
dataResourceCtx.put("mimeTypeId", "text/html");
- Map<String, Object> dataResourceResult = FastMap.newInstance();
+ Map<String, Object> dataResourceResult = new HashMap<String, Object>();
try {
dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx);
} catch (GenericServiceException e) {
@@ -1386,7 +1384,7 @@ public class ProductServices {
return ServiceUtil.returnError(e.getMessage());
}
- Map<String, Object> contentCtx = FastMap.newInstance();
+ Map<String, Object> contentCtx = new HashMap<String, Object>();
contentCtx.put("contentId", contentId);
contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId"));
contentCtx.put("userLogin", userLogin);
@@ -1409,7 +1407,7 @@ public class ProductServices {
} else {
dataResourceCtx.put("dataResourceTypeId", "SHORT_TEXT");
dataResourceCtx.put("mimeTypeId", "text/html");
- Map<String, Object> dataResourceResult = FastMap.newInstance();
+ Map<String, Object> dataResourceResult = new HashMap<String, Object>();
try {
dataResourceResult = dispatcher.runSync("createDataResource", dataResourceCtx);
} catch (GenericServiceException e) {
@@ -1417,11 +1415,11 @@ public class ProductServices {
return ServiceUtil.returnError(e.getMessage());
}
- Map<String, Object> contentCtx = FastMap.newInstance();
+ Map<String, Object> contentCtx = new HashMap<String, Object>();
contentCtx.put("contentTypeId", "DOCUMENT");
contentCtx.put("dataResourceId", dataResourceResult.get("dataResourceId"));
contentCtx.put("userLogin", userLogin);
- Map<String, Object> contentResult = FastMap.newInstance();
+ Map<String, Object> contentResult = new HashMap<String, Object>();
try {
contentResult = dispatcher.runSync("createContent", contentCtx);
} catch (GenericServiceException e) {
@@ -1439,7 +1437,7 @@ public class ProductServices {
}
}
} else {
- Map<String, Object> productPromoContentCtx = FastMap.newInstance();
+ Map<String, Object> productPromoContentCtx = new HashMap<String, Object>();
productPromoContentCtx.put("productPromoId", productPromoId);
productPromoContentCtx.put("productPromoContentTypeId", productPromoContentTypeId);
productPromoContentCtx.put("contentId", contentId);
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=1672752&r1=1672751&r2=1672752&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 Fri Apr 10 20:22:54 2015
@@ -19,14 +19,13 @@
package org.ofbiz.product.product;
import java.sql.Timestamp;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Locale;
-import javolution.util.FastMap;
-import javolution.util.FastSet;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.StringUtil;
import org.ofbiz.base.util.UtilDateTime;
@@ -501,7 +500,7 @@ public class ProductUtilServices {
String errMsg = null;
if (UtilValidate.isEmpty(pattern)) {
- Map<String, Object>imageContext = FastMap.newInstance();
+ Map<String, Object> imageContext = new HashMap<String, Object>();
imageContext.putAll(context);
imageContext.put("tenantId",delegator.getDelegatorTenantId());
String imageFilenameFormat = EntityUtilProperties.getPropertyValue("catalog", "image.filename.format", delegator);
@@ -627,7 +626,7 @@ while (allCatIter.hasNext()) {
boolean doSubCategories = !"N".equals(doSubCategoriesStr);
Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
- Set<String> productFeatureTypeIdsToExclude = FastSet.newInstance();
+ Set<String> productFeatureTypeIdsToExclude = new HashSet<String>();
String excludeProp = EntityUtilProperties.getPropertyValue("prodsearch", "attach.feature.type.exclude", delegator);
if (UtilValidate.isNotEmpty(excludeProp)) {
List<String> typeList = StringUtil.split(excludeProp, ",");
@@ -672,7 +671,7 @@ while (allCatIter.hasNext()) {
}
// now get all features for this category and make associated feature groups
- Map<String, Set<String>> productFeatureIdByTypeIdSetMap = FastMap.newInstance();
+ Map<String, Set<String>> productFeatureIdByTypeIdSetMap = new HashMap<String, Set<String>>();
List<GenericValue> productCategoryMemberList = EntityQuery.use(delegator).from("ProductCategoryMember").where("productCategoryId", productCategoryId).queryList();
for (GenericValue productCategoryMember: productCategoryMemberList) {
String productId = productCategoryMember.getString("productId");
@@ -694,7 +693,7 @@ while (allCatIter.hasNext()) {
}
Set<String> productFeatureIdSet = productFeatureIdByTypeIdSetMap.get(productFeatureTypeId);
if (productFeatureIdSet == null) {
- productFeatureIdSet = FastSet.newInstance();
+ productFeatureIdSet = new HashSet<String>();
productFeatureIdByTypeIdSetMap.put(productFeatureTypeId, productFeatureIdSet);
}
productFeatureIdSet.add(productFeatureId);
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=1672752&r1=1672751&r2=1672752&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 Fri Apr 10 20:22:54 2015
@@ -22,16 +22,15 @@ import java.math.BigDecimal;
import java.math.MathContext;
import java.sql.Timestamp;
import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.LinkedHashMap;
+import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
-import javolution.util.FastList;
-import javolution.util.FastMap;
-import javolution.util.FastSet;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.GeneralException;
import org.ofbiz.base.util.UtilDateTime;
@@ -269,7 +268,7 @@ public class ProductWorker {
*/
public static Set<GenericValue> getVariantDistinguishingFeatures(GenericValue variantProduct) throws GenericEntityException {
if (variantProduct == null) {
- return FastSet.newInstance();
+ return new HashSet<GenericValue>();
}
if (!"Y".equals(variantProduct.getString("isVariant"))) {
throw new IllegalArgumentException("Cannot get distinguishing features for a product that is not a variant (ie isVariant!=Y).");
@@ -278,7 +277,7 @@ public class ProductWorker {
String virtualProductId = getVariantVirtualId(variantProduct);
// find all selectable features on the virtual product that are also standard features on the variant
- Set<GenericValue> distFeatures = FastSet.newInstance();
+ Set<GenericValue> distFeatures = new HashSet<GenericValue>();
List<GenericValue> variantDistinguishingFeatures = EntityQuery.use(delegator).from("ProductFeatureAndAppl").where("productId", variantProduct.get("productId"), "productFeatureApplTypeId", "DISTINGUISHING_FEAT").cache(true).queryList();
// Debug.logInfo("Found variantDistinguishingFeatures: " + variantDistinguishingFeatures, module);
@@ -292,7 +291,7 @@ public class ProductWorker {
List<GenericValue> virtualSelectableFeatures = EntityQuery.use(delegator).from("ProductFeatureAndAppl").where("productId", virtualProductId, "productFeatureApplTypeId", "SELECTABLE_FEATURE").cache(true).queryList();
// Debug.logInfo("Found virtualSelectableFeatures: " + virtualSelectableFeatures, module);
- Set<String> virtualSelectableFeatureIds = FastSet.newInstance();
+ Set<String> virtualSelectableFeatureIds = new HashSet<String>();
for (GenericValue virtualSelectableFeature: EntityUtil.filterByDate(virtualSelectableFeatures)) {
virtualSelectableFeatureIds.add(virtualSelectableFeature.getString("productFeatureId"));
}
@@ -394,7 +393,7 @@ public class ProductWorker {
features = EntityUtil.orderBy(features, UtilMisc.toList("description"));
} catch (GenericEntityException e) {
Debug.logError(e, module);
- features = FastList.newInstance();
+ features = new LinkedList<GenericValue>();
}
return features;
}
@@ -423,7 +422,7 @@ public class ProductWorker {
if (product == null) {
return null;
}
- List <List<Map<String,String>>> featureTypeFeatures = FastList.newInstance();
+ List <List<Map<String,String>>> featureTypeFeatures = new LinkedList<List<Map<String,String>>>();
try {
Delegator delegator = product.getDelegator();
//List<GenericValue> features = delegator.findByAnd("ProductFeatureAndAppl", fields, order, true);
@@ -435,13 +434,13 @@ public class ProductWorker {
.cache(true)
.queryList();
String oldType = null;
- List<Map<String,String>> featureList = FastList.newInstance();
+ List<Map<String,String>> featureList = new LinkedList<Map<String,String>>();
for (GenericValue productFeatureAppl: featuresSorted) {
if (oldType == null || !oldType.equals(productFeatureAppl.getString("productFeatureTypeId"))) {
// use first entry for type and description
if (oldType != null) {
featureTypeFeatures.add(featureList);
- featureList = FastList.newInstance();
+ featureList = new LinkedList<Map<String,String>>();
}
GenericValue productFeatureType = EntityQuery.use(delegator).from("ProductFeatureType").where("productFeatureTypeId", productFeatureAppl.getString("productFeatureTypeId")).queryOne();
featureList.add(UtilMisc.<String, String>toMap("productFeatureTypeId", productFeatureAppl.getString("productFeatureTypeId"),
@@ -498,7 +497,7 @@ public class ProductWorker {
List<String> selectableTypes = EntityUtil.getFieldListFromEntityList(selectableFeatures, "productFeatureTypeId", true);
// The standard features from the variant product
List<GenericValue> standardFeatures = ProductWorker.getProductFeaturesByApplTypeId(variantProduct, "STANDARD_FEATURE");
- List<GenericValue> result = FastList.newInstance();
+ List<GenericValue> result = new LinkedList<GenericValue>();
for (GenericValue standardFeature : standardFeatures) {
// For each standard variant feature check it is also a virtual selectable feature and
// if a feature of the same type hasn't already been added to the list
@@ -525,7 +524,7 @@ public class ProductWorker {
String featureType = appl.getString("productFeatureTypeId");
List<GenericValue> features = featureMap.get(featureType);
if (features == null) {
- features = FastList.newInstance();
+ features = new LinkedList<GenericValue>();
}
features.add(appl);
featureMap.put(featureType, features);
@@ -562,7 +561,7 @@ public class ProductWorker {
}
public static List<GenericValue> filterOrderAdjustments(List<GenericValue> adjustments, boolean includeOther, boolean includeTax, boolean includeShipping, boolean forTax, boolean forShipping) {
- List<GenericValue> newOrderAdjustmentsList = FastList.newInstance();
+ List<GenericValue> newOrderAdjustmentsList = new LinkedList<GenericValue>();
if (UtilValidate.isNotEmpty(adjustments)) {
for (GenericValue orderAdjustment: adjustments) {
@@ -694,7 +693,7 @@ public class ProductWorker {
if (product == null) {
return null;
}
- List<GenericValue> categories = FastList.newInstance();
+ List<GenericValue> categories = new LinkedList<GenericValue>();
try {
List<GenericValue> categoryMembers = product.getRelated("ProductCategoryMember", null, null, false);
categoryMembers = EntityUtil.filterByDate(categoryMembers);
@@ -832,7 +831,7 @@ public class ProductWorker {
} else {
// attempt a conversion if necessary
if (desiredUomId != null && product.get("weightUomId") != null && !desiredUomId.equals(product.get("weightUomId"))) {
- Map<String, Object> result = FastMap.newInstance();
+ Map<String, Object> result = new HashMap<String, Object>();
try {
result = dispatcher.runSync("convertUom", UtilMisc.<String, Object>toMap("uomId", weightUomId, "uomIdTo", desiredUomId, "originalValue", weight));
} catch (GenericServiceException e) {
@@ -980,7 +979,7 @@ public class ProductWorker {
}
public static Set<String> getRefurbishedProductIdSet(String productId, Delegator delegator) throws GenericEntityException {
- Set<String> productIdSet = FastSet.newInstance();
+ Set<String> productIdSet = new HashSet<String>();
// find associated refurb items, we want serial number for main item or any refurb items too
List<GenericValue> refubProductAssocs = EntityQuery.use(delegator).from("ProductAssoc").where("productId", productId, "productAssocTypeId", "PRODUCT_REFURB").filterByDate().queryList();
@@ -1147,7 +1146,7 @@ nextProd:
if(productId != null || virtualVariantId != null){
List<GenericValue> alternativePackingProds = null;
try {
- List<EntityCondition> condList = FastList.newInstance();
+ List<EntityCondition> condList = new LinkedList<EntityCondition>();
if (UtilValidate.isNotEmpty(productId)) {
condList.add(EntityCondition.makeCondition("productIdTo", productId));
@@ -1232,7 +1231,7 @@ nextProd:
Boolean isMarketingPackage = EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId", product.getString("productTypeId"), "parentTypeId", "MARKETING_PKG");
if ( UtilValidate.isNotEmpty(isMarketingPackage) && isMarketingPackage) {
- Map<String, Object> resultOutput = new FastMap<String, Object>();
+ Map<String, Object> resultOutput = new HashMap<String, Object>();
resultOutput = dispatcher.runSync("getMktgPackagesAvailable", UtilMisc.toMap("productId" ,productId));
Debug.logWarning("Error getting available marketing package.", module);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/promo/PromoServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/promo/PromoServices.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/promo/PromoServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/promo/PromoServices.java Fri Apr 10 20:22:54 2015
@@ -24,13 +24,12 @@ import java.io.StringReader;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.sql.Timestamp;
+import java.util.HashMap;
+import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import javolution.util.FastList;
-import javolution.util.FastMap;
-
import org.apache.commons.lang.RandomStringUtils;
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
@@ -131,7 +130,7 @@ public class PromoServices {
Locale locale = (Locale) context.get("locale");
Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
- List<EntityCondition> condList = FastList.newInstance();
+ List<EntityCondition> condList = new LinkedList<EntityCondition>();
if (UtilValidate.isEmpty(productStoreId)) {
condList.add(EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, productStoreId));
}
@@ -184,7 +183,7 @@ public class PromoServices {
// read the bytes into a reader
BufferedReader reader = new BufferedReader(new StringReader(file));
- List<Object> errors = FastList.newInstance();
+ List<Object> errors = new LinkedList<Object>();
int lines = 0;
String line;
@@ -195,7 +194,7 @@ public class PromoServices {
if (line.length() > 0 && !line.startsWith("#")) {
if (line.length() > 0 && line.length() <= 20) {
// valid promo code
- Map<String, Object> inContext = FastMap.newInstance();
+ Map<String, Object> inContext = new HashMap<String, Object>();
inContext.putAll(invokeCtx);
inContext.put("productPromoCodeId", line);
Map<String, Object> result = dispatcher.runSync("createProductPromoCode", inContext);
@@ -250,7 +249,7 @@ public class PromoServices {
// read the bytes into a reader
BufferedReader reader = new BufferedReader(new StringReader(new String(wrapper)));
- List<Object> errors = FastList.newInstance();
+ List<Object> errors = new LinkedList<Object>();
int lines = 0;
String line;
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductHelper.java Fri Apr 10 20:22:54 2015
@@ -20,10 +20,9 @@
package org.ofbiz.product.spreadsheetimport;
import java.math.BigDecimal;
+import java.util.HashMap;
import java.util.Map;
-import javolution.util.FastMap;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.entity.Delegator;
import org.ofbiz.entity.GenericEntityException;
@@ -36,7 +35,7 @@ public class ImportProductHelper {
// prepare the product map
public static Map<String, Object> prepareProduct(String productId) {
- Map<String, Object> fields = FastMap.newInstance();
+ Map<String, Object> fields = new HashMap<String, Object>();
fields.put("productId", productId);
fields.put("productTypeId", "FINISHED_GOOD");
fields.put("internalName", "Product_" + productId);
@@ -48,7 +47,7 @@ public class ImportProductHelper {
// prepare the inventoryItem map
public static Map<String, Object> prepareInventoryItem(String productId,
BigDecimal quantityOnHand, String inventoryItemId) {
- Map<String, Object> fields = FastMap.newInstance();
+ Map<String, Object> fields = new HashMap<String, Object>();
fields.put("inventoryItemId", inventoryItemId);
fields.put("inventoryItemTypeId", "NON_SERIAL_INV_ITEM");
fields.put("productId", productId);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductServices.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/spreadsheetimport/ImportProductServices.java Fri Apr 10 20:22:54 2015
@@ -23,12 +23,11 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.math.BigDecimal;
+import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import javolution.util.FastList;
-
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
@@ -67,7 +66,7 @@ public class ImportProductServices {
// System.getProperty("user.dir") returns the path upto ofbiz home
// directory
String path = System.getProperty("user.dir") + "/spreadsheet";
- List<File> fileItems = FastList.newInstance();
+ List<File> fileItems = new LinkedList<File>();
if (UtilValidate.isNotEmpty(path)) {
File importDir = new File(path);
@@ -96,8 +95,8 @@ public class ImportProductServices {
for (File item: fileItems) {
// read all xls file and create workbook one by one.
- List<Map<String, Object>> products = FastList.newInstance();
- List<Map<String, Object>> inventoryItems = FastList.newInstance();
+ List<Map<String, Object>> products = new LinkedList<Map<String,Object>>();
+ List<Map<String, Object>> inventoryItems = new LinkedList<Map<String,Object>>();
POIFSFileSystem fs = null;
HSSFWorkbook wb = null;
try {
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreEvents.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreEvents.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/store/ProductStoreEvents.java Fri Apr 10 20:22:54 2015
@@ -18,15 +18,14 @@
*******************************************************************************/
package org.ofbiz.product.store;
+import java.util.HashMap;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javolution.util.FastList;
-import javolution.util.FastMap;
-
import org.ofbiz.base.util.UtilMisc;
import org.ofbiz.base.util.UtilValidate;
import org.ofbiz.entity.Delegator;
@@ -45,7 +44,7 @@ public class ProductStoreEvents {
String parentGroupId = request.getParameter("parentGroupId");
String onclickFunction = request.getParameter("onclickFunction");
- List productStoreGroupList = FastList.newInstance();
+ List productStoreGroupList = new LinkedList();
List<GenericValue> children;
List<String> sortList = org.ofbiz.base.util.UtilMisc.toList("sequenceNum");
@@ -56,7 +55,7 @@ public class ProductStoreEvents {
if (UtilValidate.isNotEmpty(children)) {
for (GenericValue child : children ) {
String productStoreGroupId = child.getString("productStoreGroupId");
- Map josonMap = FastMap.newInstance();
+ Map josonMap = new HashMap();
List<GenericValue> childList = null;
// Get the child list of chosen category
childList = EntityQuery.use(delegator).from("ProductStoreGroupRollupAndChild").where("parentGroupId", productStoreGroupId).cache(true).filterByDate().queryList();
@@ -64,8 +63,8 @@ public class ProductStoreEvents {
if (UtilValidate.isNotEmpty(childList)) {
josonMap.put("state", "closed");
}
- Map dataMap = FastMap.newInstance();
- Map dataAttrMap = FastMap.newInstance();
+ Map dataMap = new HashMap();
+ Map dataAttrMap = new HashMap();
dataAttrMap.put("onClick", onclickFunction + "('" + productStoreGroupId + "')");
String hrefStr = "EditProductStoreGroupAndAssoc";
@@ -74,7 +73,7 @@ public class ProductStoreEvents {
dataMap.put("attr", dataAttrMap);
dataMap.put("title", child.get("productStoreGroupName") + " [" + child.get("productStoreGroupId") + "]");
josonMap.put("data", dataMap);
- Map attrMap = FastMap.newInstance();
+ Map attrMap = new HashMap();
attrMap.put("parentGroupId", productStoreGroupId);
josonMap.put("attr",attrMap);
josonMap.put("sequenceNum",child.get("sequenceNum"));
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=1672752&r1=1672751&r2=1672752&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 Fri Apr 10 20:22:54 2015
@@ -19,6 +19,8 @@
package org.ofbiz.product.store;
import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@@ -28,9 +30,6 @@ import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
-import javolution.util.FastList;
-import javolution.util.FastMap;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilHttp;
import org.ofbiz.base.util.UtilMisc;
@@ -220,7 +219,7 @@ public class ProductStoreWorker {
public static List<GenericValue> getAvailableStoreShippingMethods(Delegator delegator, String productStoreId, GenericValue shippingAddress, List<BigDecimal> itemSizes, Map<String, BigDecimal> featureIdMap, BigDecimal weight, BigDecimal orderTotal) {
if (featureIdMap == null) {
- featureIdMap = FastMap.newInstance();
+ featureIdMap = new HashMap<String, BigDecimal>();
}
List<GenericValue> shippingMethods = null;
try {
@@ -462,7 +461,7 @@ public class ProductStoreWorker {
}
public static List<GenericValue> getSurveys(Delegator delegator, String productStoreId, String groupName, String productId, String surveyApplTypeId, String parentProductId) {
- List<GenericValue> surveys = FastList.newInstance();
+ List<GenericValue> surveys = new LinkedList<GenericValue>();
List<GenericValue> storeSurveys = null;
try {
storeSurveys = EntityQuery.use(delegator).from("ProductStoreSurveyAppl").where("productStoreId", productStoreId, "surveyApplTypeId", surveyApplTypeId).orderBy("sequenceNum").cache(true).queryList();
@@ -700,7 +699,7 @@ public class ProductStoreWorker {
}
}
- protected static Map<String, String> defaultProductStoreEmailScreenLocation = FastMap.newInstance();
+ protected static Map<String, String> defaultProductStoreEmailScreenLocation = new HashMap<String, String>();
static {
defaultProductStoreEmailScreenLocation.put("PRDS_ODR_CONFIRM", "component://ecommerce/widget/EmailOrderScreens.xml#OrderConfirmNotice");
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=1672752&r1=1672751&r2=1672752&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 Fri Apr 10 20:22:54 2015
@@ -25,8 +25,6 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
-import javolution.util.FastMap;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilMisc;
@@ -150,7 +148,7 @@ public class SubscriptionServices {
null, null, updateSubscriptionResult);
}
} else {
- Map<String, Object> createPartyRoleMap = FastMap.newInstance();
+ Map<String, Object> createPartyRoleMap = new HashMap<String, Object>();
if (UtilValidate.isNotEmpty(roleTypeId)) {
createPartyRoleMap.put("partyId", partyId);
createPartyRoleMap.put("roleTypeId", roleTypeId);
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/supplier/SupplierProductServices.java Fri Apr 10 20:22:54 2015
@@ -21,11 +21,10 @@ package org.ofbiz.product.supplier;
import java.math.BigDecimal;
import java.util.Collection;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javolution.util.FastMap;
-
import org.ofbiz.base.util.Debug;
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.base.util.UtilGenerics;
@@ -56,7 +55,7 @@ public class SupplierProductServices {
* filtered by date and optionally by partyId, ordered with lowest price first
*/
public static Map<String, Object> getSuppliersForProduct(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> results = FastMap.newInstance();
+ Map<String, Object> results = new HashMap<String, Object>();
Delegator delegator = dctx.getDelegator();
GenericValue product = null;
@@ -128,7 +127,7 @@ public class SupplierProductServices {
* SupplierProduct entity for that supplier party and feature, and return it as convertedProductFeatures
*/
public static Map<String, Object> convertFeaturesForSupplier(DispatchContext dctx, Map<String, ? extends Object> context) {
- Map<String, Object> results = FastMap.newInstance();
+ Map<String, Object> results = new HashMap<String, Object>();
String partyId = (String) context.get("partyId");
Collection<GenericValue> features = UtilGenerics.checkList(context.get("productFeatures"));
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/test/InventoryItemTransferTest.java Fri Apr 10 20:22:54 2015
@@ -20,10 +20,9 @@
package org.ofbiz.product.test;
import java.math.BigDecimal;
+import java.util.HashMap;
import java.util.Map;
-import javolution.util.FastMap;
-
import org.ofbiz.base.util.UtilDateTime;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.util.EntityQuery;
@@ -50,7 +49,7 @@ public class InventoryItemTransferTest e
public void testCreateInventoryItemsTransfer() throws Exception {
// create
- Map<String, Object> ctx = FastMap.newInstance();
+ Map<String, Object> ctx = new HashMap<String, Object>();
String inventoryItemId = "9005";
ctx.put("inventoryItemId", inventoryItemId);
ctx.put("statusId", "IXF_REQUESTED");
@@ -64,7 +63,7 @@ public class InventoryItemTransferTest e
assertNotNull(inventoryTransferId);
// transfer
- ctx = FastMap.newInstance();
+ ctx = new HashMap<String, Object>();
ctx.put("inventoryTransferId", inventoryTransferId);
ctx.put("inventoryItemId", inventoryItemId);
ctx.put("statusId", "IXF_COMPLETE");
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java?rev=1672752&r1=1672751&r2=1672752&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/test/StockMovesTest.java Fri Apr 10 20:22:54 2015
@@ -20,12 +20,11 @@
package org.ofbiz.product.test;
import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.LinkedList;
import java.util.List;
import java.util.Map;
-import javolution.util.FastList;
-import javolution.util.FastMap;
-
import org.ofbiz.base.util.UtilGenerics;
import org.ofbiz.entity.GenericValue;
import org.ofbiz.entity.util.EntityQuery;
@@ -52,9 +51,9 @@ public class StockMovesTest extends OFBi
}
public void testStockMoves() throws Exception {
- Map<String, Object> fsmnCtx = FastMap.newInstance();
+ Map<String, Object> fsmnCtx = new HashMap<String, Object>();
Map<?,?> stockMoveHandled = null;
- List<?> warningList = FastList.newInstance();
+ List<?> warningList = new LinkedList();
fsmnCtx.put("facilityId", "WebStoreWarehouse");
fsmnCtx.put("userLogin", userLogin);
@@ -70,7 +69,7 @@ public class StockMovesTest extends OFBi
warningList = UtilGenerics.checkList(respMap2.get("warningMessageList"));
assertNull(warningList);
- Map<String, Object> ppsmCtx = FastMap.newInstance();
+ Map<String, Object> ppsmCtx = new HashMap<String, Object>();
ppsmCtx.put("productId", "GZ-2644");
ppsmCtx.put("facilityId", "WebStoreWarehouse");
ppsmCtx.put("locationSeqId","TLTLTLUL01");