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
This commit is contained in:
Erwan de Ferrieres
2010-02-26 11:17:26 +00:00
parent 3c5a4d4764
commit e2f65a76a3
2 changed files with 10 additions and 0 deletions
+1
View File
@@ -453,5 +453,6 @@ under the License.
<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>
@@ -103,6 +103,12 @@ public class ModelEntity extends ModelInfo implements Comparable<ModelEntity>, S
/** 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 @@ public class ModelEntity extends ModelInfo implements Comparable<ModelEntity>, 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 =====