Author: erwan
Date: Fri Feb 26 11:17:26 2010
New Revision: 916646
URL:
http://svn.apache.org/viewvc?rev=916646&view=revLog:
Adding dependent-on on extend-entity (OFBIZ-3303)
Modified:
ofbiz/trunk/framework/entity/dtd/entitymodel.xsd
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java
Modified: ofbiz/trunk/framework/entity/dtd/entitymodel.xsd
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/dtd/entitymodel.xsd?rev=916646&r1=916645&r2=916646&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/dtd/entitymodel.xsd (original)
+++ ofbiz/trunk/framework/entity/dtd/entitymodel.xsd Fri Feb 26 11:17:26 2010
@@ -453,5 +453,6 @@
<xs:attributeGroup name="attlist.extend-entity">
<xs:attribute name="entity-name" type="xs:string" use="required"/>
<xs:attribute name="default-resource-name" type="xs:string"/>
+ <xs:attribute name="dependent-on" type="xs:string"/>
</xs:attributeGroup>
</xs:schema>
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java?rev=916646&r1=916645&r2=916646&view=diff==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java Fri Feb 26 11:17:26 2010
@@ -103,6 +103,12 @@
/** indexes on fields/columns in this entity */
protected List<ModelIndex> 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<String, ModelEntity> specializedEntities = FastMap.newInstance();
+
/** map of ModelViewEntities that references this model */
protected Set<String> viewEntities = FastSet.newInstance();
@@ -316,6 +322,9 @@
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 =====