Author: jacopoc Date: Mon Oct 2 03:44:47 2006 New Revision: 451963 URL: http://svn.apache.org/viewvc?view=rev&rev=451963 Log: Added constructor to ComplexAliasMember class to avoid a build error. I don't know if this is the best way to handle it but for now it is better than a complile error.
Modified: incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java Modified: incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java?view=diff&rev=451963&r1=451962&r2=451963 ============================================================================== --- incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original) +++ incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java Mon Oct 2 03:44:47 2006 @@ -267,7 +267,7 @@ entityConditionList.add(new EntityExpr(prefix + "Keyword", EntityOperator.LIKE, keyword)); //don't add an alias for this, will be part of a complex alias: dynamicViewEntity.addAlias(entityAlias, prefix + "RelevancyWeight", "relevancyWeight", null, null, null, null); - relevancyComplexAlias.addComplexAliasMember(new ComplexAliasField(entityAlias, "relevancyWeight")); + relevancyComplexAlias.addComplexAliasMember(new ComplexAliasField(entityAlias, "relevancyWeight", null, null)); } //TODO: find out why Oracle and other dbs don't like the query resulting from this and fix: productIdGroupBy = true; @@ -299,7 +299,7 @@ productIdGroupBy = true; if (doingBothAndOr) { - relevancyComplexAlias.addComplexAliasMember(new ComplexAliasField(entityAlias, "relevancyWeight", "sum")); + relevancyComplexAlias.addComplexAliasMember(new ComplexAliasField(entityAlias, "relevancyWeight", null, "sum")); } else { dynamicViewEntity.addAlias(entityAlias, "totalRelevancy", "relevancyWeight", null, null, null, "sum"); } Modified: incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java?view=diff&rev=451963&r1=451962&r2=451963 ============================================================================== --- incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java (original) +++ incubator/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java Mon Oct 2 03:44:47 2006 @@ -867,6 +867,13 @@ this.function = complexAliasFieldElement.getAttribute("function"); } + public ComplexAliasField(String entityAlias, String field, String defaultValue, String function) { + this.entityAlias = entityAlias; + this.field = field; + this.defaultValue = defaultValue; + this.function = function; + } + /** * Make the alias as follows: function(coalesce(entityAlias.field, defaultValue)) */