From e2f65a76a33a52419cb659fef3a30e8fbfa2f84b Mon Sep 17 00:00:00 2001 From: Erwan de Ferrieres Date: Fri, 26 Feb 2010 11:17:26 +0000 Subject: [PATCH] Adding dependent-on on extend-entity (OFBIZ-3303) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@916646 13f79535-47bb-0310-9956-ffa450edef68 --- framework/entity/dtd/entitymodel.xsd | 1 + .../entity/src/org/ofbiz/entity/model/ModelEntity.java | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/framework/entity/dtd/entitymodel.xsd b/framework/entity/dtd/entitymodel.xsd index e2677abe96..087da2f818 100644 --- a/framework/entity/dtd/entitymodel.xsd +++ b/framework/entity/dtd/entitymodel.xsd @@ -453,5 +453,6 @@ under the License. + diff --git a/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java b/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java index c45e1a240f..c70c4ecf1b 100644 --- a/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java +++ b/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java @@ -103,6 +103,12 @@ public class ModelEntity extends ModelInfo implements Comparable, S /** indexes on fields/columns in this entity */ protected List indexes = FastList.newInstance(); + /** The reference of the dependentOn entity model */ + protected ModelEntity specializationOfModelEntity = null; + + /** The list of entities that are specialization of on this entity */ + protected Map specializedEntities = FastMap.newInstance(); + /** map of ModelViewEntities that references this model */ protected Set viewEntities = FastSet.newInstance(); @@ -316,6 +322,9 @@ public class ModelEntity extends ModelInfo implements Comparable, S this.populateRelated(reader, extendEntityElement); this.populateIndexes(extendEntityElement); + // Begin addon modification : depend-on-inExtend + this.dependentOn = UtilXml.checkEmpty(extendEntityElement.getAttribute("dependent-on")).intern(); + // End addon modification : depend-on-inExtend } // ===== GETTERS/SETTERS =====