Author: doogie
Date: Sun Jun 26 18:09:44 2011
New Revision: 1139872
URL:
http://svn.apache.org/viewvc?rev=1139872&view=revLog:
FEATURE: Allow for setting the ViewEntityCondition on
ModelViewLink programmatically.
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/DynamicViewEntity.java
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/DynamicViewEntity.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/DynamicViewEntity.java?rev=1139872&r1=1139871&r2=1139872&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/DynamicViewEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/DynamicViewEntity.java Sun Jun 26 18:09:44 2011
@@ -266,7 +266,7 @@ public class DynamicViewEntity {
}
public void addViewLink(String entityAlias, String relEntityAlias, Boolean relOptional, List<ModelKeyMap> modelKeyMaps) {
- ModelViewLink modelViewLink = new ModelViewLink(entityAlias, relEntityAlias, relOptional, modelKeyMaps);
+ ModelViewLink modelViewLink = new ModelViewLink(entityAlias, relEntityAlias, relOptional, null, modelKeyMaps);
this.viewLinks.add(modelViewLink);
}
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java?rev=1139872&r1=1139871&r2=1139872&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelViewEntity.java Sun Jun 26 18:09:44 2011
@@ -1045,17 +1045,28 @@ public class ModelViewEntity extends Mod
}
}
+ @Deprecated
public ModelViewLink(String entityAlias, String relEntityAlias, Boolean relOptional, ModelKeyMap... keyMaps) {
- this(entityAlias, relEntityAlias, relOptional, Arrays.asList(keyMaps));
+ this(entityAlias, relEntityAlias, relOptional, null, Arrays.asList(keyMaps));
}
+ @Deprecated
public ModelViewLink(String entityAlias, String relEntityAlias, Boolean relOptional, List<ModelKeyMap> keyMaps) {
+ this(entityAlias, relEntityAlias, relOptional, null, keyMaps);
+ }
+
+ public ModelViewLink(String entityAlias, String relEntityAlias, Boolean relOptional, ViewEntityCondition viewEntityCondition, ModelKeyMap... keyMaps) {
+ this(entityAlias, relEntityAlias, relOptional, viewEntityCondition, Arrays.asList(keyMaps));
+ }
+
+ public ModelViewLink(String entityAlias, String relEntityAlias, Boolean relOptional, ViewEntityCondition viewEntityCondition, List<ModelKeyMap> keyMaps) {
this.entityAlias = entityAlias;
this.relEntityAlias = relEntityAlias;
if (relOptional != null) {
this.relOptional = relOptional.booleanValue();
}
this.keyMaps.addAll(keyMaps);
+ this.viewEntityCondition = viewEntityCondition;
}
public String getEntityAlias() {