diff options
Diffstat (limited to 'hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java')
-rw-r--r-- | hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java index 02efb2a4a..cfac06c8d 100644 --- a/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java +++ b/hibernate/org.eclipse.emf.teneo.hibernate.mapper/src/org/eclipse/emf/teneo/hibernate/mapper/TypedEReferenceMapper.java @@ -17,19 +17,17 @@ import org.eclipse.emf.teneo.annotations.pannotation.JoinColumn; import org.eclipse.emf.teneo.annotations.pannotation.JoinTable; import org.eclipse.emf.teneo.annotations.pannotation.OneToMany; import org.eclipse.emf.teneo.extension.ExtensionPoint; -import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEAttribute; import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedEReference; import org.eclipse.emf.teneo.hibernate.hbmodel.HbAnnotatedETypeElement; import org.eclipse.emf.teneo.simpledom.Element; /** - * Maps an EReference with a type annotation. This type of ereference is mapped - * as an eattribute with a type parameter. + * Maps an EReference with a type annotation. This type of ereference is mapped as an eattribute + * with a type parameter. * * @author <a href="mailto:mtaal at elver.org">Martin Taal</a> */ -public class TypedEReferenceMapper extends AbstractAssociationMapper implements - ExtensionPoint { +public class TypedEReferenceMapper extends AbstractAssociationMapper implements ExtensionPoint { public void process(PAnnotatedEReference paReference) { if (paReference.getModelEReference().isMany()) { processMany(paReference); @@ -39,10 +37,9 @@ public class TypedEReferenceMapper extends AbstractAssociationMapper implements } private void processSingle(PAnnotatedEStructuralFeature paEFeature) { - final String name = getHbmContext().getPropertyName( - paEFeature.getModelEStructuralFeature()); - final Element propElement = getHbmContext().getCurrent() - .addElement("property").addAttribute("name", name); + final String name = getHbmContext().getPropertyName(paEFeature.getModelEStructuralFeature()); + final Element propElement = getHbmContext().getCurrent().addElement("property") + .addAttribute("name", name); addColumnsAndFormula(propElement, paEFeature, getColumns(paEFeature), true, true); setType(paEFeature, propElement); addAccessor(propElement); @@ -74,12 +71,10 @@ public class TypedEReferenceMapper extends AbstractAssociationMapper implements addCascadesForMany(collElement, getCascades(hbReference.getHbCascade(), otm.getCascade(), otm.isOrphanRemoval())); - addElementElement(collElement, paEFeature, getColumns(paEFeature), - otm.getTargetEntity()); + addElementElement(collElement, paEFeature, getColumns(paEFeature), otm.getTargetEntity()); addAccessor(collElement); - mapFilter(collElement, - ((HbAnnotatedETypeElement) paEFeature).getFilter()); + mapFilter(collElement, ((HbAnnotatedETypeElement) paEFeature).getFilter()); } } |