use of org.bimserver.database.migrations.change.NewReferenceChange in project BIMserver by opensourceBIM.
the class Schema method createEReference.
public EReference createEReference(EClass eClass, String name, EClass type, Multiplicity multiplicity) {
EReference eReference = EcoreFactory.eINSTANCE.createEReference();
eReference.setName(name);
if (multiplicity == Multiplicity.MANY) {
eReference.setUpperBound(-1);
}
if (!isNew(eClass)) {
changes.add(new NewReferenceChange(this, eClass.getEAllStructuralFeatures().size(), eReference));
}
eReference.setEType(type);
eClass.getEStructuralFeatures().add(eReference);
return eReference;
}
Aggregations