Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormtaal2010-04-22 11:33:16 -0400
committermtaal2010-04-22 11:33:16 -0400
commitd704527e99a33fb840911344d6df6a413585a691 (patch)
tree7b6743320b912d59d94c6879929bf80f386aa580
parentad76f67e7afa2c2c19c887db4098651175c79341 (diff)
downloadorg.eclipse.emf.teneo-d704527e99a33fb840911344d6df6a413585a691.tar.gz
org.eclipse.emf.teneo-d704527e99a33fb840911344d6df6a413585a691.tar.xz
org.eclipse.emf.teneo-d704527e99a33fb840911344d6df6a413585a691.zip
[305023]
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/META-INF/MANIFEST.MF4
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/library.ecore11
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/library.genmodel4
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/orm.xml242
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/orm.xml_old264
-rwxr-xr-xexamples/org.eclipse.emf.teneo.eclipselink.examples.library/model/test_suppressinterfaces.ecore10
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/test_suppressinterfaces.genmodel15
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/BirthPlace.java53
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/LibraryFactory.java11
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/LibraryPackage.java121
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/Writer.java29
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/BirthPlaceImpl.java166
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/BookImpl.java375
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/LibraryFactoryImpl.java13
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/LibraryPackageImpl.java62
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/WriterImpl.java63
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/util/LibraryAdapterFactory.java20
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/util/LibrarySwitch.java24
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/SuppressinterfacesFactory.java107
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/SuppressinterfacesPackage.java289
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/test.java180
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/util/SuppressinterfacesAdapterFactory.java124
-rw-r--r--examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/util/SuppressinterfacesSwitch.java130
23 files changed, 1597 insertions, 720 deletions
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/META-INF/MANIFEST.MF b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/META-INF/MANIFEST.MF
index 6cc60edc0..9921aec0c 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/META-INF/MANIFEST.MF
@@ -14,7 +14,9 @@ Export-Package: META-INF,
org.eclipse.emf.teneo.eclipselink.examples.library.forum.impl,
org.eclipse.emf.teneo.eclipselink.examples.library.forum.util,
org.eclipse.emf.teneo.eclipselink.examples.library.impl,
- org.eclipse.emf.teneo.eclipselink.examples.library.util
+ org.eclipse.emf.teneo.eclipselink.examples.library.util,
+ org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces,
+ org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.util
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.5.0,3.0.0)",
org.eclipse.emf.teneo.eclipselink;bundle-version="[1.0.0,2.0.0)",
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/library.ecore b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/library.ecore
index 743e5970c..cf8e0b24d 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/library.ecore
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/library.ecore
@@ -37,6 +37,11 @@
eType="#//Publisher" eOpposite="#//Publisher/writers"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="typewriters" upperBound="-1"
eType="#//TypeWriter"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="birthPlace" eType="#//BirthPlace">
+ <eAnnotations source="teneo.jpa">
+ <details key="value" value=" @Embedded"/>
+ </eAnnotations>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="BookCategory">
<eLiterals name="Mystery"/>
@@ -116,4 +121,10 @@
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AbstractTest" abstract="true"/>
+ <eClassifiers xsi:type="ecore:EClass" name="BirthPlace" eSuperTypes="#//Identifiable">
+ <eAnnotations source="teneo.jpa">
+ <details key="value" value=" @Embeddable"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/library.genmodel b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/library.genmodel
index 6f53ff8c6..9bff36fc2 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/library.genmodel
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/library.genmodel
@@ -44,6 +44,7 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference library.ecore#//Writer/address"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference library.ecore#//Writer/publishers"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference library.ecore#//Writer/typewriters"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference library.ecore#//Writer/birthPlace"/>
</genClasses>
<genClasses ecoreClass="library.ecore#//StringToBookMapEntry">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//StringToBookMapEntry/key"/>
@@ -80,5 +81,8 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//Identifiable/version"/>
</genClasses>
<genClasses image="false" ecoreClass="library.ecore#//AbstractTest"/>
+ <genClasses ecoreClass="library.ecore#//BirthPlace">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute library.ecore#//BirthPlace/name"/>
+ </genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/orm.xml b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/orm.xml
index f6de441dd..aaa614e58 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/orm.xml
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/orm.xml
@@ -1,251 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<entity-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
+<entity-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" version="1.0">
<persistence-unit-metadata>
<xml-mapping-metadata-complete/>
<persistence-unit-defaults>
<access>FIELD</access>
</persistence-unit-defaults>
</persistence-unit-metadata>
- <mapped-superclass class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.IdentifiableImpl">
- <attributes>
- <id name="id">
- <generated-value strategy="AUTO"/>
- </id>
- <basic name="eContainerFeatureID">
- <column name="ECONT_FEAT_ID"/>
- </basic>
- <version name="version"/>
- </attributes>
- </mapped-superclass>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl" name="Book">
- <table name="BOOK"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="title" optional="true"/>
- <basic fetch="EAGER" name="pages" optional="true"/>
- <basic fetch="EAGER" name="category" optional="true">
- <enumerated>STRING</enumerated>
- </basic>
- <many-to-one fetch="EAGER" name="author" optional="true" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl">
- <cascade>
- <cascade-persist/>
- <cascade-merge/>
- <cascade-refresh/>
- </cascade>
- </many-to-one>
- <many-to-one fetch="EAGER" name="translator" optional="true" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.TranslatorImpl">
- <join-column insertable="true" name="TRANSLATOR_TRANSLATOR_ID" nullable="true" unique="false" updatable="true"/>
- <cascade>
- <cascade-persist/>
- <cascade-merge/>
- <cascade-refresh/>
- </cascade>
- </many-to-one>
- <one-to-many fetch="LAZY" mapped-by="eContainer" name="styles" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookStylesMapEntryImpl">
- <cascade>
- <cascade-all/>
- </cascade>
- </one-to-many>
- <one-to-one fetch="EAGER" name="cover" optional="true" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.CoverImpl">
- <join-column insertable="true" name="COVER_COVER_ID" nullable="true" unique="false" updatable="true"/>
- <cascade>
- <cascade-all/>
- </cascade>
- </one-to-one>
- <one-to-one mapped-by="value" name="eContainer" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.StringToBookMapEntryImpl">
- <cascade>
- <cascade-all/>
- </cascade>
- </one-to-one>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.LibraryImpl" name="Library">
- <table name="LIBRARY"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="name" optional="true"/>
- <one-to-many fetch="LAZY" mapped-by="eContainer" name="writers" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl">
- <cascade>
- <cascade-all/>
- </cascade>
- </one-to-many>
- <one-to-many fetch="LAZY" mapped-by="eContainer" name="books" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.StringToBookMapEntryImpl">
- <cascade>
- <cascade-all/>
- </cascade>
- </one-to-many>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl" name="Writer">
- <table name="WRITER"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="name" optional="true"/>
- <many-to-one name="eContainer" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.LibraryImpl">
- <join-column name="LIBRARY_WRITERS_ID"/>
- <cascade>
- <cascade-all/>
- </cascade>
- </many-to-one>
- <one-to-many fetch="LAZY" name="books" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl">
- <join-table name="WRITER_BOOKS">
- <join-column insertable="true" name="WRITER_ID" nullable="false" unique="false" updatable="true"/>
- <inverse-join-column insertable="true" name="BOOK_ID" nullable="false" unique="false" updatable="true"/>
- </join-table>
- <cascade>
- <cascade-persist/>
- <cascade-merge/>
- <cascade-refresh/>
- </cascade>
- </one-to-many>
- <one-to-many fetch="LAZY" name="typewriters" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.TypeWriterImpl">
- <join-table name="WRITER_TYPEWRITERS">
- <join-column insertable="true" name="WRITER_ID" nullable="false" unique="false" updatable="true"/>
- <inverse-join-column insertable="true" name="TYPEWRITER_ID" nullable="false" unique="false" updatable="true"/>
- </join-table>
- <cascade>
- <cascade-persist/>
- <cascade-merge/>
- <cascade-refresh/>
- </cascade>
- </one-to-many>
- <one-to-one fetch="EAGER" name="address" optional="true" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.AddressImpl">
- <join-column insertable="true" name="ADDRESS_ADDRESS_ID" nullable="true" unique="false" updatable="true"/>
- <cascade>
- <cascade-all/>
- </cascade>
- </one-to-one>
- <many-to-many fetch="LAZY" name="publishers" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.PublisherImpl">
- <join-table name="WRITER_PUBLISHERS">
- <join-column insertable="true" name="WRITER_ID" nullable="false" unique="false" updatable="true"/>
- <inverse-join-column insertable="true" name="PUBLISHER_ID" nullable="false" unique="false" updatable="true"/>
- </join-table>
- <cascade>
- <cascade-persist/>
- <cascade-merge/>
- <cascade-refresh/>
- </cascade>
- </many-to-many>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.StringToBookMapEntryImpl" name="StringToBookMapEntry">
- <table name="EMFLIB_LIBRARY_BOOK_MAP"/>
- <inheritance strategy="JOINED"/>
- <attribute-override name="id">
- <column insertable="false" name="LIBRARY_BOOKS_ID" updatable="false"/>
- </attribute-override>
- <attributes>
- <id name="key">
- <column name="e_key"/>
- </id>
- <many-to-one name="eContainer" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.LibraryImpl">
- <join-column name="LIBRARY_BOOKS_ID"/>
- <cascade>
- <cascade-all/>
- </cascade>
- </many-to-one>
- <one-to-one fetch="EAGER" name="value" optional="true" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl">
- <join-column insertable="true" name="BOOK_VALUE_ID" nullable="true" unique="false" updatable="true"/>
- <cascade>
- <cascade-all/>
- </cascade>
- </one-to-one>
- <transient name="hash"/>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.AddressImpl" name="Address">
- <table name="ADDRESS"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="town" optional="true"/>
- <one-to-one mapped-by="address" name="eContainer" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl">
- <cascade>
- <cascade-all/>
- </cascade>
- </one-to-one>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.PublisherImpl" name="Publisher">
- <table name="PUBLISHER"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="name" optional="true"/>
- <many-to-many fetch="LAZY" mapped-by="publishers" name="writers" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl">
- <join-table name="EMFLIB_PUBLISHER_WRITERS">
- <join-column insertable="true" name="PUBLISHER_ID" nullable="false" unique="false" updatable="true"/>
- <inverse-join-column insertable="true" name="WRITER_ID" nullable="false" unique="false" updatable="true"/>
- </join-table>
- <cascade>
- <cascade-persist/>
- <cascade-merge/>
- <cascade-refresh/>
- </cascade>
- </many-to-many>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.StyleImpl" name="Style">
- <table name="STYLE"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="name" optional="true"/>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookStylesMapEntryImpl" name="BookStylesMapEntry">
- <table name="EMFLIB_BOOK_STYLE_MAP"/>
- <inheritance strategy="JOINED"/>
- <attribute-override name="id">
- <column insertable="false" name="BOOK_STYLES_ID" updatable="false"/>
- </attribute-override>
- <attributes>
- <id name="key">
- <column name="e_key"/>
- </id>
- <many-to-one fetch="EAGER" name="value" optional="true" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.StyleImpl">
- <join-column insertable="true" name="STYLE_VALUE_ID" nullable="true" unique="false" updatable="true"/>
- <cascade>
- <cascade-persist/>
- <cascade-merge/>
- <cascade-refresh/>
- </cascade>
- </many-to-one>
- <many-to-one name="eContainer" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl">
- <join-column name="BOOK_STYLES_ID"/>
- <cascade>
- <cascade-all/>
- </cascade>
- </many-to-one>
- <transient name="hash"/>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.TranslatorImpl" name="Translator">
- <table name="TRANSLATOR"/>
+ <entity class="org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test" name="test">
+ <table name="TEST"/>
<inheritance strategy="JOINED"/>
<attributes>
<basic fetch="EAGER" name="name" optional="true"/>
- <basic fetch="EAGER" name="location" optional="true"/>
- <transient name="address"/>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.TypeWriterImpl" name="TypeWriter">
- <table name="TYPEWRITER"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="maker" optional="true"/>
- <basic fetch="EAGER" name="type" optional="true">
- <enumerated>STRING</enumerated>
+ <basic name="eContainerFeatureID">
+ <column name="ECONT_FEAT_ID"/>
</basic>
</attributes>
</entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.CoverImpl" name="Cover">
- <table name="COVER"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="colored" optional="true"/>
- <one-to-one mapped-by="cover" name="eContainer" target-entity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl">
- <cascade>
- <cascade-all/>
- </cascade>
- </one-to-one>
- </attributes>
- </entity>
</entity-mappings> \ No newline at end of file
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/orm.xml_old b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/orm.xml_old
index a6676465f..aaa614e58 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/orm.xml_old
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/orm.xml_old
@@ -1,247 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<orm:DocumentRoot xmlns:orm="http://java.sun.com/xml/ns/persistence/orm">
- <entityMappings version="1.0">
- <persistenceUnitMetadata>
- <xmlMappingMetadataComplete/>
- <persistenceUnitDefaults access="FIELD"/>
- </persistenceUnitMetadata>
- <mappedSuperclass class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.IdentifiableImpl">
- <attributes>
- <id name="id">
- <generatedValue strategy="AUTO"/>
- </id>
- <basic name="eContainerFeatureID">
- <column name="ECONT_FEAT_ID"/>
- </basic>
- <version name="version"/>
- </attributes>
- </mappedSuperclass>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl" name="Book">
- <table name="BOOK"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="title" optional="true"/>
- <basic fetch="EAGER" name="pages" optional="true"/>
- <basic enumerated="STRING" fetch="EAGER" name="category" optional="true"/>
- <manyToOne fetch="EAGER" name="author" optional="true" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl">
- <cascade>
- <cascadePersist/>
- <cascadeMerge/>
- <cascadeRefresh/>
- </cascade>
- </manyToOne>
- <manyToOne fetch="EAGER" name="translator" optional="true" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.TranslatorImpl">
- <joinColumn insertable="true" name="TRANSLATOR_TRANSLATOR_ID" nullable="true" unique="false" updatable="true"/>
- <cascade>
- <cascadePersist/>
- <cascadeMerge/>
- <cascadeRefresh/>
- </cascade>
- </manyToOne>
- <oneToMany fetch="LAZY" mappedBy="eContainer" name="styles" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookStylesMapEntryImpl">
- <cascade>
- <cascadeAll/>
- </cascade>
- </oneToMany>
- <oneToOne fetch="EAGER" name="cover" optional="true" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.CoverImpl">
- <joinColumn insertable="true" name="COVER_COVER_ID" nullable="true" unique="false" updatable="true"/>
- <cascade>
- <cascadeAll/>
- </cascade>
- </oneToOne>
- <oneToOne mappedBy="value" name="eContainer" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.StringToBookMapEntryImpl">
- <cascade>
- <cascadeAll/>
- </cascade>
- </oneToOne>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.LibraryImpl" name="Library">
- <table name="LIBRARY"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="name" optional="true"/>
- <oneToMany fetch="LAZY" mappedBy="eContainer" name="writers" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl">
- <cascade>
- <cascadeAll/>
- </cascade>
- </oneToMany>
- <oneToMany fetch="LAZY" mappedBy="eContainer" name="books" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.StringToBookMapEntryImpl">
- <cascade>
- <cascadeAll/>
- </cascade>
- </oneToMany>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl" name="Writer">
- <table name="WRITER"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="name" optional="true"/>
- <manyToOne name="eContainer" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.LibraryImpl">
- <joinColumn name="LIBRARY_WRITERS_ID"/>
- <cascade>
- <cascadeAll/>
- </cascade>
- </manyToOne>
- <oneToMany fetch="LAZY" name="books" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl">
- <joinTable name="WRITER_BOOKS">
- <joinColumn insertable="true" name="WRITER_ID" nullable="false" unique="false" updatable="true"/>
- <inverseJoinColumn insertable="true" name="BOOK_ID" nullable="false" unique="false" updatable="true"/>
- </joinTable>
- <cascade>
- <cascadePersist/>
- <cascadeMerge/>
- <cascadeRefresh/>
- </cascade>
- </oneToMany>
- <oneToMany fetch="LAZY" name="typewriters" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.TypeWriterImpl">
- <joinTable name="WRITER_TYPEWRITERS">
- <joinColumn insertable="true" name="WRITER_ID" nullable="false" unique="false" updatable="true"/>
- <inverseJoinColumn insertable="true" name="TYPEWRITER_ID" nullable="false" unique="false" updatable="true"/>
- </joinTable>
- <cascade>
- <cascadePersist/>
- <cascadeMerge/>
- <cascadeRefresh/>
- </cascade>
- </oneToMany>
- <oneToOne fetch="EAGER" name="address" optional="true" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.AddressImpl">
- <joinColumn insertable="true" name="ADDRESS_ADDRESS_ID" nullable="true" unique="false" updatable="true"/>
- <cascade>
- <cascadeAll/>
- </cascade>
- </oneToOne>
- <manyToMany fetch="LAZY" name="publishers" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.PublisherImpl">
- <joinTable name="WRITER_PUBLISHERS">
- <joinColumn insertable="true" name="WRITER_ID" nullable="false" unique="false" updatable="true"/>
- <inverseJoinColumn insertable="true" name="PUBLISHER_ID" nullable="false" unique="false" updatable="true"/>
- </joinTable>
- <cascade>
- <cascadePersist/>
- <cascadeMerge/>
- <cascadeRefresh/>
- </cascade>
- </manyToMany>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.StringToBookMapEntryImpl" name="StringToBookMapEntry">
- <table name="EMFLIB_LIBRARY_BOOK_MAP"/>
- <inheritance strategy="JOINED"/>
- <attributeOverride name="id">
- <column insertable="false" name="LIBRARY_BOOKS_ID" updatable="false"/>
- </attributeOverride>
- <attributes>
- <id name="key">
- <column name="e_key"/>
- </id>
- <manyToOne name="eContainer" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.LibraryImpl">
- <joinColumn name="LIBRARY_BOOKS_ID"/>
- <cascade>
- <cascadeAll/>
- </cascade>
- </manyToOne>
- <oneToOne fetch="EAGER" name="value" optional="true" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl">
- <joinColumn insertable="true" name="BOOK_VALUE_ID" nullable="true" unique="false" updatable="true"/>
- <cascade>
- <cascadeAll/>
- </cascade>
- </oneToOne>
- <transient name="hash"/>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.AddressImpl" name="Address">
- <table name="ADDRESS"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="town" optional="true"/>
- <oneToOne mappedBy="address" name="eContainer" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl">
- <cascade>
- <cascadeAll/>
- </cascade>
- </oneToOne>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.PublisherImpl" name="Publisher">
- <table name="PUBLISHER"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="name" optional="true"/>
- <manyToMany fetch="LAZY" mappedBy="publishers" name="writers" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl">
- <joinTable name="EMFLIB_PUBLISHER_WRITERS">
- <joinColumn insertable="true" name="PUBLISHER_ID" nullable="false" unique="false" updatable="true"/>
- <inverseJoinColumn insertable="true" name="WRITER_ID" nullable="false" unique="false" updatable="true"/>
- </joinTable>
- <cascade>
- <cascadePersist/>
- <cascadeMerge/>
- <cascadeRefresh/>
- </cascade>
- </manyToMany>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.StyleImpl" name="Style">
- <table name="STYLE"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="name" optional="true"/>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookStylesMapEntryImpl" name="BookStylesMapEntry">
- <table name="EMFLIB_BOOK_STYLE_MAP"/>
- <inheritance strategy="JOINED"/>
- <attributeOverride name="id">
- <column insertable="false" name="BOOK_STYLES_ID" updatable="false"/>
- </attributeOverride>
- <attributes>
- <id name="key">
- <column name="e_key"/>
- </id>
- <manyToOne fetch="EAGER" name="value" optional="true" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.StyleImpl">
- <joinColumn insertable="true" name="STYLE_VALUE_ID" nullable="true" unique="false" updatable="true"/>
- <cascade>
- <cascadePersist/>
- <cascadeMerge/>
- <cascadeRefresh/>
- </cascade>
- </manyToOne>
- <manyToOne name="eContainer" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl">
- <joinColumn name="BOOK_STYLES_ID"/>
- <cascade>
- <cascadeAll/>
- </cascade>
- </manyToOne>
- <transient name="hash"/>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.TranslatorImpl" name="Translator">
- <table name="TRANSLATOR"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="name" optional="true"/>
- <basic fetch="EAGER" name="location" optional="true"/>
- <transient name="address"/>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.TypeWriterImpl" name="TypeWriter">
- <table name="TYPEWRITER"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="maker" optional="true"/>
- <basic enumerated="STRING" fetch="EAGER" name="type" optional="true"/>
- </attributes>
- </entity>
- <entity class="org.eclipse.emf.teneo.eclipselink.examples.library.impl.CoverImpl" name="Cover">
- <table name="COVER"/>
- <inheritance strategy="JOINED"/>
- <attributes>
- <basic fetch="EAGER" name="colored" optional="true"/>
- <oneToOne mappedBy="cover" name="eContainer" targetEntity="org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl">
- <cascade>
- <cascadeAll/>
- </cascade>
- </oneToOne>
- </attributes>
- </entity>
- </entityMappings>
-</orm:DocumentRoot>
+<entity-mappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" version="1.0">
+ <persistence-unit-metadata>
+ <xml-mapping-metadata-complete/>
+ <persistence-unit-defaults>
+ <access>FIELD</access>
+ </persistence-unit-defaults>
+ </persistence-unit-metadata>
+ <entity class="org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test" name="test">
+ <table name="TEST"/>
+ <inheritance strategy="JOINED"/>
+ <attributes>
+ <basic fetch="EAGER" name="name" optional="true"/>
+ <basic name="eContainerFeatureID">
+ <column name="ECONT_FEAT_ID"/>
+ </basic>
+ </attributes>
+ </entity>
+</entity-mappings> \ No newline at end of file
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/test_suppressinterfaces.ecore b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/test_suppressinterfaces.ecore
new file mode 100755
index 000000000..2ce4822d3
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/test_suppressinterfaces.ecore
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="suppressinterfaces"
+ nsURI="http:///org/eclipse/emf/teneo/eclipselink/examples/test_suppressinterfaces.ecore"
+ nsPrefix="suppressinterfaces">
+ <eClassifiers xsi:type="ecore:EClass" name="test">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/test_suppressinterfaces.genmodel b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/test_suppressinterfaces.genmodel
new file mode 100644
index 000000000..6e99968c2
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/model/test_suppressinterfaces.genmodel
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.emf.teneo.eclipselink.examples.library/src"
+ modelPluginID="org.eclipse.emf.teneo.eclipselink.examples.library" modelName="Test_suppressinterfaces"
+ suppressInterfaces="true" importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0"
+ copyrightFields="false">
+ <foreignModel>test_suppressinterfaces.ecore</foreignModel>
+ <genPackages prefix="Suppressinterfaces" basePackage="org.eclipse.emf.teneo.eclipselink.examples"
+ disposableProviderFactory="true" ecorePackage="test_suppressinterfaces.ecore#/">
+ <genClasses ecoreClass="test_suppressinterfaces.ecore#//test">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute test_suppressinterfaces.ecore#//test/name"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/BirthPlace.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/BirthPlace.java
new file mode 100644
index 000000000..b4a1e2ec2
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/BirthPlace.java
@@ -0,0 +1,53 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: BirthPlace.java,v 1.1 2010/04/22 15:33:16 mtaal Exp $
+ */
+package org.eclipse.emf.teneo.eclipselink.examples.library;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Birth Place</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.BirthPlace#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.teneo.eclipselink.examples.library.LibraryPackage#getBirthPlace()
+ * @model annotation="teneo.jpa value=' @Embeddable'"
+ * @generated
+ */
+public interface BirthPlace extends Identifiable {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.teneo.eclipselink.examples.library.LibraryPackage#getBirthPlace_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.teneo.eclipselink.examples.library.BirthPlace#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+} // BirthPlace
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/LibraryFactory.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/LibraryFactory.java
index 153f9eb21..ca4cf0fb4 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/LibraryFactory.java
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/LibraryFactory.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: LibraryFactory.java,v 1.2 2009/01/21 21:34:20 seberle Exp $
+ * $Id: LibraryFactory.java,v 1.3 2010/04/22 15:33:16 mtaal Exp $
*/
package org.eclipse.emf.teneo.eclipselink.examples.library;
@@ -107,6 +107,15 @@ public interface LibraryFactory extends EFactory {
Cover createCover();
/**
+ * Returns a new object of class '<em>Birth Place</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Birth Place</em>'.
+ * @generated
+ */
+ BirthPlace createBirthPlace();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/LibraryPackage.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/LibraryPackage.java
index 9fc1c5624..6ba312213 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/LibraryPackage.java
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/LibraryPackage.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: LibraryPackage.java,v 1.7 2010/03/02 21:50:32 mtaal Exp $
+ * $Id: LibraryPackage.java,v 1.8 2010/04/22 15:33:16 mtaal Exp $
*/
package org.eclipse.emf.teneo.eclipselink.examples.library;
@@ -344,13 +344,22 @@ public interface LibraryPackage extends EPackage {
int WRITER__TYPEWRITERS = IDENTIFIABLE_FEATURE_COUNT + 4;
/**
+ * The feature id for the '<em><b>Birth Place</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WRITER__BIRTH_PLACE = IDENTIFIABLE_FEATURE_COUNT + 5;
+
+ /**
* The number of structural features of the '<em>Writer</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int WRITER_FEATURE_COUNT = IDENTIFIABLE_FEATURE_COUNT + 5;
+ int WRITER_FEATURE_COUNT = IDENTIFIABLE_FEATURE_COUNT + 6;
/**
* The meta object id for the '{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.StringToBookMapEntryImpl <em>String To Book Map Entry</em>}' class.
@@ -794,6 +803,52 @@ public interface LibraryPackage extends EPackage {
int ABSTRACT_TEST_FEATURE_COUNT = 0;
/**
+ * The meta object id for the '{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BirthPlaceImpl <em>Birth Place</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.eclipselink.examples.library.impl.BirthPlaceImpl
+ * @see org.eclipse.emf.teneo.eclipselink.examples.library.impl.LibraryPackageImpl#getBirthPlace()
+ * @generated
+ */
+ int BIRTH_PLACE = 13;
+
+ /**
+ * The feature id for the '<em><b>Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BIRTH_PLACE__ID = IDENTIFIABLE__ID;
+
+ /**
+ * The feature id for the '<em><b>Version</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BIRTH_PLACE__VERSION = IDENTIFIABLE__VERSION;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BIRTH_PLACE__NAME = IDENTIFIABLE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Birth Place</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BIRTH_PLACE_FEATURE_COUNT = IDENTIFIABLE_FEATURE_COUNT + 1;
+
+ /**
* The meta object id for the '{@link org.eclipse.emf.teneo.eclipselink.examples.library.BookCategory <em>Book Category</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -801,7 +856,7 @@ public interface LibraryPackage extends EPackage {
* @see org.eclipse.emf.teneo.eclipselink.examples.library.impl.LibraryPackageImpl#getBookCategory()
* @generated
*/
- int BOOK_CATEGORY = 13;
+ int BOOK_CATEGORY = 14;
/**
* The meta object id for the '{@link org.eclipse.emf.teneo.eclipselink.examples.library.TWriterType <em>TWriter Type</em>}' enum.
@@ -811,7 +866,7 @@ public interface LibraryPackage extends EPackage {
* @see org.eclipse.emf.teneo.eclipselink.examples.library.impl.LibraryPackageImpl#getTWriterType()
* @generated
*/
- int TWRITER_TYPE = 14;
+ int TWRITER_TYPE = 15;
/**
@@ -1021,6 +1076,17 @@ public interface LibraryPackage extends EPackage {
EReference getWriter_Typewriters();
/**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.teneo.eclipselink.examples.library.Writer#getBirthPlace <em>Birth Place</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Birth Place</em>'.
+ * @see org.eclipse.emf.teneo.eclipselink.examples.library.Writer#getBirthPlace()
+ * @see #getWriter()
+ * @generated
+ */
+ EReference getWriter_BirthPlace();
+
+ /**
* Returns the meta object for class '{@link java.util.Map.Entry <em>String To Book Map Entry</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1303,6 +1369,27 @@ public interface LibraryPackage extends EPackage {
EClass getAbstractTest();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.teneo.eclipselink.examples.library.BirthPlace <em>Birth Place</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Birth Place</em>'.
+ * @see org.eclipse.emf.teneo.eclipselink.examples.library.BirthPlace
+ * @generated
+ */
+ EClass getBirthPlace();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.teneo.eclipselink.examples.library.BirthPlace#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.teneo.eclipselink.examples.library.BirthPlace#getName()
+ * @see #getBirthPlace()
+ * @generated
+ */
+ EAttribute getBirthPlace_Name();
+
+ /**
* Returns the meta object for enum '{@link org.eclipse.emf.teneo.eclipselink.examples.library.BookCategory <em>Book Category</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1503,6 +1590,14 @@ public interface LibraryPackage extends EPackage {
EReference WRITER__TYPEWRITERS = eINSTANCE.getWriter_Typewriters();
/**
+ * The meta object literal for the '<em><b>Birth Place</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference WRITER__BIRTH_PLACE = eINSTANCE.getWriter_BirthPlace();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.StringToBookMapEntryImpl <em>String To Book Map Entry</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1731,6 +1826,24 @@ public interface LibraryPackage extends EPackage {
EClass ABSTRACT_TEST = eINSTANCE.getAbstractTest();
/**
+ * The meta object literal for the '{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BirthPlaceImpl <em>Birth Place</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.eclipselink.examples.library.impl.BirthPlaceImpl
+ * @see org.eclipse.emf.teneo.eclipselink.examples.library.impl.LibraryPackageImpl#getBirthPlace()
+ * @generated
+ */
+ EClass BIRTH_PLACE = eINSTANCE.getBirthPlace();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute BIRTH_PLACE__NAME = eINSTANCE.getBirthPlace_Name();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.teneo.eclipselink.examples.library.BookCategory <em>Book Category</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/Writer.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/Writer.java
index 5f7189f61..0e7c0fef6 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/Writer.java
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/Writer.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: Writer.java,v 1.2 2009/01/21 21:34:20 seberle Exp $
+ * $Id: Writer.java,v 1.3 2010/04/22 15:33:16 mtaal Exp $
*/
package org.eclipse.emf.teneo.eclipselink.examples.library;
@@ -21,6 +21,7 @@ import org.eclipse.emf.common.util.EList;
* <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.Writer#getAddress <em>Address</em>}</li>
* <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.Writer#getPublishers <em>Publishers</em>}</li>
* <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.Writer#getTypewriters <em>Typewriters</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.Writer#getBirthPlace <em>Birth Place</em>}</li>
* </ul>
* </p>
*
@@ -133,4 +134,30 @@ public interface Writer extends Identifiable {
*/
EList<TypeWriter> getTypewriters();
+ /**
+ * Returns the value of the '<em><b>Birth Place</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Birth Place</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Birth Place</em>' reference.
+ * @see #setBirthPlace(BirthPlace)
+ * @see org.eclipse.emf.teneo.eclipselink.examples.library.LibraryPackage#getWriter_BirthPlace()
+ * @model annotation="teneo.jpa value=' @Embedded'"
+ * @generated
+ */
+ BirthPlace getBirthPlace();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.teneo.eclipselink.examples.library.Writer#getBirthPlace <em>Birth Place</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Birth Place</em>' reference.
+ * @see #getBirthPlace()
+ * @generated
+ */
+ void setBirthPlace(BirthPlace value);
+
} // Writer
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/BirthPlaceImpl.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/BirthPlaceImpl.java
new file mode 100644
index 000000000..00cc7584d
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/BirthPlaceImpl.java
@@ -0,0 +1,166 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: BirthPlaceImpl.java,v 1.1 2010/04/22 15:33:16 mtaal Exp $
+ */
+package org.eclipse.emf.teneo.eclipselink.examples.library.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.teneo.eclipselink.examples.library.BirthPlace;
+import org.eclipse.emf.teneo.eclipselink.examples.library.LibraryPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Birth Place</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BirthPlaceImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BirthPlaceImpl extends IdentifiableImpl implements BirthPlace {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BirthPlaceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return LibraryPackage.Literals.BIRTH_PLACE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BIRTH_PLACE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case LibraryPackage.BIRTH_PLACE__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case LibraryPackage.BIRTH_PLACE__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case LibraryPackage.BIRTH_PLACE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case LibraryPackage.BIRTH_PLACE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: "); //$NON-NLS-1$
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //BirthPlaceImpl
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/BookImpl.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/BookImpl.java
index 9ded073cc..283b426bd 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/BookImpl.java
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/BookImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: BookImpl.java,v 1.5 2010/03/03 07:58:34 mtaal Exp $
+ * $Id: BookImpl.java,v 1.6 2010/04/22 15:33:16 mtaal Exp $
*/
package org.eclipse.emf.teneo.eclipselink.examples.library.impl;
@@ -28,25 +28,24 @@ import org.eclipse.emf.teneo.eclipselink.examples.library.Writer;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getTitle <em>Title</em>}</li>
- * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getPages <em>Pages</em>}</li>
- * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getCategory <em>Category</em>}</li>
- * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getAuthor <em>Author</em>}</li>
- * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getStyles <em>Styles</em>}</li>
- * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getTranslator <em>Translator</em>}</li>
- * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getCover <em>Cover</em>}</li>
- * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getDerivedAttribute <em>Derived Attribute
- * </em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getTitle <em>Title</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getPages <em>Pages</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getCategory <em>Category</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getAuthor <em>Author</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getStyles <em>Styles</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getTranslator <em>Translator</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getCover <em>Cover</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.BookImpl#getDerivedAttribute <em>Derived Attribute</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class BookImpl extends IdentifiableImpl implements Book {
/**
- * The default value of the '{@link #getTitle() <em>Title</em>}' attribute. <!-- begin-user-doc --> <!--
+ * The default value of the '{@link #getTitle() <em>Title</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @see #getTitle()
* @generated
* @ordered
@@ -64,9 +63,9 @@ public class BookImpl extends IdentifiableImpl implements Book {
protected String title = TITLE_EDEFAULT;
/**
- * The default value of the '{@link #getPages() <em>Pages</em>}' attribute. <!-- begin-user-doc --> <!--
+ * The default value of the '{@link #getPages() <em>Pages</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @see #getPages()
* @generated
* @ordered
@@ -84,9 +83,9 @@ public class BookImpl extends IdentifiableImpl implements Book {
protected int pages = PAGES_EDEFAULT;
/**
- * The default value of the '{@link #getCategory() <em>Category</em>}' attribute. <!-- begin-user-doc --> <!--
+ * The default value of the '{@link #getCategory() <em>Category</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @see #getCategory()
* @generated
* @ordered
@@ -94,9 +93,9 @@ public class BookImpl extends IdentifiableImpl implements Book {
protected static final BookCategory CATEGORY_EDEFAULT = BookCategory.MYSTERY;
/**
- * The cached value of the '{@link #getCategory() <em>Category</em>}' attribute. <!-- begin-user-doc --> <!--
+ * The cached value of the '{@link #getCategory() <em>Category</em>}' attribute.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @see #getCategory()
* @generated
* @ordered
@@ -104,9 +103,9 @@ public class BookImpl extends IdentifiableImpl implements Book {
protected BookCategory category = CATEGORY_EDEFAULT;
/**
- * The cached value of the '{@link #getAuthor() <em>Author</em>}' reference. <!-- begin-user-doc --> <!--
+ * The cached value of the '{@link #getAuthor() <em>Author</em>}' reference.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @see #getAuthor()
* @generated
* @ordered
@@ -114,8 +113,8 @@ public class BookImpl extends IdentifiableImpl implements Book {
protected Writer author;
/**
- * The cached value of the '{@link #getStyles() <em>Styles</em>}' map. <!-- begin-user-doc --> <!-- end-user-doc -->
- *
+ * The cached value of the '{@link #getStyles() <em>Styles</em>}' map.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #getStyles()
* @generated
* @ordered
@@ -123,9 +122,9 @@ public class BookImpl extends IdentifiableImpl implements Book {
protected EMap<String, Style> styles;
/**
- * The cached value of the '{@link #getTranslator() <em>Translator</em>}' reference. <!-- begin-user-doc --> <!--
+ * The cached value of the '{@link #getTranslator() <em>Translator</em>}' reference.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @see #getTranslator()
* @generated
* @ordered
@@ -133,9 +132,9 @@ public class BookImpl extends IdentifiableImpl implements Book {
protected Translator translator;
/**
- * The cached value of the '{@link #getCover() <em>Cover</em>}' containment reference. <!-- begin-user-doc --> <!--
+ * The cached value of the '{@link #getCover() <em>Cover</em>}' containment reference.
+ * <!-- begin-user-doc --> <!--
* end-user-doc -->
- *
* @see #getCover()
* @generated
* @ordered
@@ -154,7 +153,6 @@ public class BookImpl extends IdentifiableImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
protected BookImpl() {
@@ -163,7 +161,6 @@ public class BookImpl extends IdentifiableImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -173,7 +170,6 @@ public class BookImpl extends IdentifiableImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public String getTitle() {
@@ -182,20 +178,17 @@ public class BookImpl extends IdentifiableImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setTitle(String newTitle) {
String oldTitle = title;
title = newTitle;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__TITLE, oldTitle, title));
- }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public int getPages() {
@@ -204,20 +197,17 @@ public class BookImpl extends IdentifiableImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setPages(int newPages) {
int oldPages = pages;
pages = newPages;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__PAGES, oldPages, pages));
- }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public BookCategory getCategory() {
@@ -226,31 +216,26 @@ public class BookImpl extends IdentifiableImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setCategory(BookCategory newCategory) {
BookCategory oldCategory = category;
category = newCategory == null ? CATEGORY_EDEFAULT : newCategory;
- if (eNotificationRequired()) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__CATEGORY, oldCategory, category));
- }
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Writer getAuthor() {
if (author != null && author.eIsProxy()) {
- InternalEObject oldAuthor = (InternalEObject) author;
- author = (Writer) eResolveProxy(oldAuthor);
+ InternalEObject oldAuthor = (InternalEObject)author;
+ author = (Writer)eResolveProxy(oldAuthor);
if (author != oldAuthor) {
- if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, LibraryPackage.BOOK__AUTHOR, oldAuthor,
- author));
- }
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, LibraryPackage.BOOK__AUTHOR, oldAuthor, author));
}
}
return author;
@@ -258,7 +243,6 @@ public class BookImpl extends IdentifiableImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Writer basicGetAuthor() {
@@ -267,76 +251,58 @@ public class BookImpl extends IdentifiableImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public NotificationChain basicSetAuthor(Writer newAuthor, NotificationChain msgs) {
Writer oldAuthor = author;
author = newAuthor;
if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__AUTHOR,
- oldAuthor, newAuthor);
- if (msgs == null) {
- msgs = notification;
- } else {
- msgs.add(notification);
- }
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__AUTHOR, oldAuthor, newAuthor);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setAuthor(Writer newAuthor) {
if (newAuthor != author) {
NotificationChain msgs = null;
- if (author != null) {
- msgs = ((InternalEObject) author)
- .eInverseRemove(this, LibraryPackage.WRITER__BOOKS, Writer.class, msgs);
- }
- if (newAuthor != null) {
- msgs = ((InternalEObject) newAuthor)
- .eInverseAdd(this, LibraryPackage.WRITER__BOOKS, Writer.class, msgs);
- }
+ if (author != null)
+ msgs = ((InternalEObject)author).eInverseRemove(this, LibraryPackage.WRITER__BOOKS, Writer.class, msgs);
+ if (newAuthor != null)
+ msgs = ((InternalEObject)newAuthor).eInverseAdd(this, LibraryPackage.WRITER__BOOKS, Writer.class, msgs);
msgs = basicSetAuthor(newAuthor, msgs);
- if (msgs != null) {
- msgs.dispatch();
- }
- } else if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__AUTHOR, newAuthor, newAuthor));
+ if (msgs != null) msgs.dispatch();
}
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__AUTHOR, newAuthor, newAuthor));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public EMap<String, Style> getStyles() {
if (styles == null) {
- styles = new EcoreEMap<String, Style>(LibraryPackage.Literals.BOOK_STYLES_MAP_ENTRY,
- BookStylesMapEntryImpl.class, this, LibraryPackage.BOOK__STYLES);
+ styles = new EcoreEMap<String,Style>(LibraryPackage.Literals.BOOK_STYLES_MAP_ENTRY, BookStylesMapEntryImpl.class, this, LibraryPackage.BOOK__STYLES);
}
return styles;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Translator getTranslator() {
if (translator != null && translator.eIsProxy()) {
- InternalEObject oldTranslator = (InternalEObject) translator;
- translator = (Translator) eResolveProxy(oldTranslator);
+ InternalEObject oldTranslator = (InternalEObject)translator;
+ translator = (Translator)eResolveProxy(oldTranslator);
if (translator != oldTranslator) {
- if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, LibraryPackage.BOOK__TRANSLATOR,
- oldTranslator, translator));
- }
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, LibraryPackage.BOOK__TRANSLATOR, oldTranslator, translator));
}
}
return translator;
@@ -344,7 +310,6 @@ public class BookImpl extends IdentifiableImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Translator basicGetTranslator() {
@@ -353,21 +318,17 @@ public class BookImpl extends IdentifiableImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setTranslator(Translator newTranslator) {
Translator oldTranslator = translator;
translator = newTranslator;
- if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__TRANSLATOR, oldTranslator,
- translator));
- }
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__TRANSLATOR, oldTranslator, translator));
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public Cover getCover() {
@@ -376,47 +337,34 @@ public class BookImpl extends IdentifiableImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public NotificationChain basicSetCover(Cover newCover, NotificationChain msgs) {
Cover oldCover = cover;
cover = newCover;
if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__COVER,
- oldCover, newCover);
- if (msgs == null) {
- msgs = notification;
- } else {
- msgs.add(notification);
- }
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__COVER, oldCover, newCover);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
public void setCover(Cover newCover) {
if (newCover != cover) {
NotificationChain msgs = null;
- if (cover != null) {
- msgs = ((InternalEObject) cover).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- - LibraryPackage.BOOK__COVER, null, msgs);
- }
- if (newCover != null) {
- msgs = ((InternalEObject) newCover).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- - LibraryPackage.BOOK__COVER, null, msgs);
- }
+ if (cover != null)
+ msgs = ((InternalEObject)cover).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LibraryPackage.BOOK__COVER, null, msgs);
+ if (newCover != null)
+ msgs = ((InternalEObject)newCover).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LibraryPackage.BOOK__COVER, null, msgs);
msgs = basicSetCover(newCover, msgs);
- if (msgs != null) {
- msgs.dispatch();
- }
- } else if (eNotificationRequired()) {
- eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__COVER, newCover, newCover));
+ if (msgs != null) msgs.dispatch();
}
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.BOOK__COVER, newCover, newCover));
}
/**
@@ -439,189 +387,170 @@ public class BookImpl extends IdentifiableImpl implements Book {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case LibraryPackage.BOOK__AUTHOR:
- if (author != null) {
- msgs = ((InternalEObject) author)
- .eInverseRemove(this, LibraryPackage.WRITER__BOOKS, Writer.class, msgs);
- }
- return basicSetAuthor((Writer) otherEnd, msgs);
+ case LibraryPackage.BOOK__AUTHOR:
+ if (author != null)
+ msgs = ((InternalEObject)author).eInverseRemove(this, LibraryPackage.WRITER__BOOKS, Writer.class, msgs);
+ return basicSetAuthor((Writer)otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case LibraryPackage.BOOK__AUTHOR:
- return basicSetAuthor(null, msgs);
- case LibraryPackage.BOOK__STYLES:
- return ((InternalEList<?>) getStyles()).basicRemove(otherEnd, msgs);
- case LibraryPackage.BOOK__COVER:
- return basicSetCover(null, msgs);
+ case LibraryPackage.BOOK__AUTHOR:
+ return basicSetAuthor(null, msgs);
+ case LibraryPackage.BOOK__STYLES:
+ return ((InternalEList<?>)getStyles()).basicRemove(otherEnd, msgs);
+ case LibraryPackage.BOOK__COVER:
+ return basicSetCover(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- return getTitle();
- case LibraryPackage.BOOK__PAGES:
- return getPages();
- case LibraryPackage.BOOK__CATEGORY:
- return getCategory();
- case LibraryPackage.BOOK__AUTHOR:
- if (resolve) {
- return getAuthor();
- }
- return basicGetAuthor();
- case LibraryPackage.BOOK__STYLES:
- if (coreType) {
- return getStyles();
- } else {
- return getStyles().map();
- }
- case LibraryPackage.BOOK__TRANSLATOR:
- if (resolve) {
- return getTranslator();
- }
- return basicGetTranslator();
- case LibraryPackage.BOOK__COVER:
- return getCover();
- case LibraryPackage.BOOK__DERIVED_ATTRIBUTE:
- return getDerivedAttribute();
+ case LibraryPackage.BOOK__TITLE:
+ return getTitle();
+ case LibraryPackage.BOOK__PAGES:
+ return getPages();
+ case LibraryPackage.BOOK__CATEGORY:
+ return getCategory();
+ case LibraryPackage.BOOK__AUTHOR:
+ if (resolve) return getAuthor();
+ return basicGetAuthor();
+ case LibraryPackage.BOOK__STYLES:
+ if (coreType) return getStyles();
+ else return getStyles().map();
+ case LibraryPackage.BOOK__TRANSLATOR:
+ if (resolve) return getTranslator();
+ return basicGetTranslator();
+ case LibraryPackage.BOOK__COVER:
+ return getCover();
+ case LibraryPackage.BOOK__DERIVED_ATTRIBUTE:
+ return getDerivedAttribute();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- setTitle((String) newValue);
- return;
- case LibraryPackage.BOOK__PAGES:
- setPages((Integer) newValue);
- return;
- case LibraryPackage.BOOK__CATEGORY:
- setCategory((BookCategory) newValue);
- return;
- case LibraryPackage.BOOK__AUTHOR:
- setAuthor((Writer) newValue);
- return;
- case LibraryPackage.BOOK__STYLES:
- ((EStructuralFeature.Setting) getStyles()).set(newValue);
- return;
- case LibraryPackage.BOOK__TRANSLATOR:
- setTranslator((Translator) newValue);
- return;
- case LibraryPackage.BOOK__COVER:
- setCover((Cover) newValue);
- return;
- case LibraryPackage.BOOK__DERIVED_ATTRIBUTE:
- setDerivedAttribute((String) newValue);
- return;
+ case LibraryPackage.BOOK__TITLE:
+ setTitle((String)newValue);
+ return;
+ case LibraryPackage.BOOK__PAGES:
+ setPages((Integer)newValue);
+ return;
+ case LibraryPackage.BOOK__CATEGORY:
+ setCategory((BookCategory)newValue);
+ return;
+ case LibraryPackage.BOOK__AUTHOR:
+ setAuthor((Writer)newValue);
+ return;
+ case LibraryPackage.BOOK__STYLES:
+ ((EStructuralFeature.Setting)getStyles()).set(newValue);
+ return;
+ case LibraryPackage.BOOK__TRANSLATOR:
+ setTranslator((Translator)newValue);
+ return;
+ case LibraryPackage.BOOK__COVER:
+ setCover((Cover)newValue);
+ return;
+ case LibraryPackage.BOOK__DERIVED_ATTRIBUTE:
+ setDerivedAttribute((String)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- setTitle(TITLE_EDEFAULT);
- return;
- case LibraryPackage.BOOK__PAGES:
- setPages(PAGES_EDEFAULT);
- return;
- case LibraryPackage.BOOK__CATEGORY:
- setCategory(CATEGORY_EDEFAULT);
- return;
- case LibraryPackage.BOOK__AUTHOR:
- setAuthor((Writer) null);
- return;
- case LibraryPackage.BOOK__STYLES:
- getStyles().clear();
- return;
- case LibraryPackage.BOOK__TRANSLATOR:
- setTranslator((Translator) null);
- return;
- case LibraryPackage.BOOK__COVER:
- setCover((Cover) null);
- return;
- case LibraryPackage.BOOK__DERIVED_ATTRIBUTE:
- setDerivedAttribute(DERIVED_ATTRIBUTE_EDEFAULT);
- return;
+ case LibraryPackage.BOOK__TITLE:
+ setTitle(TITLE_EDEFAULT);
+ return;
+ case LibraryPackage.BOOK__PAGES:
+ setPages(PAGES_EDEFAULT);
+ return;
+ case LibraryPackage.BOOK__CATEGORY:
+ setCategory(CATEGORY_EDEFAULT);
+ return;
+ case LibraryPackage.BOOK__AUTHOR:
+ setAuthor((Writer)null);
+ return;
+ case LibraryPackage.BOOK__STYLES:
+ getStyles().clear();
+ return;
+ case LibraryPackage.BOOK__TRANSLATOR:
+ setTranslator((Translator)null);
+ return;
+ case LibraryPackage.BOOK__COVER:
+ setCover((Cover)null);
+ return;
+ case LibraryPackage.BOOK__DERIVED_ATTRIBUTE:
+ setDerivedAttribute(DERIVED_ATTRIBUTE_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case LibraryPackage.BOOK__TITLE:
- return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
- case LibraryPackage.BOOK__PAGES:
- return pages != PAGES_EDEFAULT;
- case LibraryPackage.BOOK__CATEGORY:
- return category != CATEGORY_EDEFAULT;
- case LibraryPackage.BOOK__AUTHOR:
- return author != null;
- case LibraryPackage.BOOK__STYLES:
- return styles != null && !styles.isEmpty();
- case LibraryPackage.BOOK__TRANSLATOR:
- return translator != null;
- case LibraryPackage.BOOK__COVER:
- return cover != null;
- case LibraryPackage.BOOK__DERIVED_ATTRIBUTE:
- return DERIVED_ATTRIBUTE_EDEFAULT == null ? getDerivedAttribute() != null : !DERIVED_ATTRIBUTE_EDEFAULT
- .equals(getDerivedAttribute());
+ case LibraryPackage.BOOK__TITLE:
+ return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
+ case LibraryPackage.BOOK__PAGES:
+ return pages != PAGES_EDEFAULT;
+ case LibraryPackage.BOOK__CATEGORY:
+ return category != CATEGORY_EDEFAULT;
+ case LibraryPackage.BOOK__AUTHOR:
+ return author != null;
+ case LibraryPackage.BOOK__STYLES:
+ return styles != null && !styles.isEmpty();
+ case LibraryPackage.BOOK__TRANSLATOR:
+ return translator != null;
+ case LibraryPackage.BOOK__COVER:
+ return cover != null;
+ case LibraryPackage.BOOK__DERIVED_ATTRIBUTE:
+ return DERIVED_ATTRIBUTE_EDEFAULT == null ? getDerivedAttribute() != null : !DERIVED_ATTRIBUTE_EDEFAULT.equals(getDerivedAttribute());
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy()) {
- return super.toString();
- }
+ if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (title: "); //$NON-NLS-1$
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/LibraryFactoryImpl.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/LibraryFactoryImpl.java
index 081316bfc..c39a12ea0 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/LibraryFactoryImpl.java
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/LibraryFactoryImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: LibraryFactoryImpl.java,v 1.3 2009/06/14 21:00:29 seberle Exp $
+ * $Id: LibraryFactoryImpl.java,v 1.4 2010/04/22 15:33:16 mtaal Exp $
*/
package org.eclipse.emf.teneo.eclipselink.examples.library.impl;
@@ -74,6 +74,7 @@ public class LibraryFactoryImpl extends EFactoryImpl implements LibraryFactory {
case LibraryPackage.TRANSLATOR: return createTranslator();
case LibraryPackage.TYPE_WRITER: return createTypeWriter();
case LibraryPackage.COVER: return createCover();
+ case LibraryPackage.BIRTH_PLACE: return createBirthPlace();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -228,6 +229,16 @@ public class LibraryFactoryImpl extends EFactoryImpl implements LibraryFactory {
* <!-- end-user-doc -->
* @generated
*/
+ public BirthPlace createBirthPlace() {
+ BirthPlaceImpl birthPlace = new BirthPlaceImpl();
+ return birthPlace;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public BookCategory createBookCategoryFromString(EDataType eDataType, String initialValue) {
BookCategory result = BookCategory.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/LibraryPackageImpl.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/LibraryPackageImpl.java
index 370e9bf4f..34e3de121 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/LibraryPackageImpl.java
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/LibraryPackageImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: LibraryPackageImpl.java,v 1.7 2010/03/02 21:50:32 mtaal Exp $
+ * $Id: LibraryPackageImpl.java,v 1.8 2010/04/22 15:33:16 mtaal Exp $
*/
package org.eclipse.emf.teneo.eclipselink.examples.library.impl;
@@ -16,6 +16,7 @@ import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.eclipse.emf.teneo.eclipselink.examples.library.AbstractTest;
import org.eclipse.emf.teneo.eclipselink.examples.library.Address;
+import org.eclipse.emf.teneo.eclipselink.examples.library.BirthPlace;
import org.eclipse.emf.teneo.eclipselink.examples.library.Book;
import org.eclipse.emf.teneo.eclipselink.examples.library.BookCategory;
import org.eclipse.emf.teneo.eclipselink.examples.library.Cover;
@@ -115,6 +116,13 @@ public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
private EClass abstractTestEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass birthPlaceEClass = null;
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -338,6 +346,15 @@ public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getWriter_BirthPlace() {
+ return (EReference)writerEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -547,6 +564,24 @@ public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getBirthPlace() {
+ return birthPlaceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getBirthPlace_Name() {
+ return (EAttribute)birthPlaceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -608,6 +643,7 @@ public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
createEReference(writerEClass, WRITER__ADDRESS);
createEReference(writerEClass, WRITER__PUBLISHERS);
createEReference(writerEClass, WRITER__TYPEWRITERS);
+ createEReference(writerEClass, WRITER__BIRTH_PLACE);
stringToBookMapEntryEClass = createEClass(STRING_TO_BOOK_MAP_ENTRY);
createEAttribute(stringToBookMapEntryEClass, STRING_TO_BOOK_MAP_ENTRY__KEY);
@@ -645,6 +681,9 @@ public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
abstractTestEClass = createEClass(ABSTRACT_TEST);
+ birthPlaceEClass = createEClass(BIRTH_PLACE);
+ createEAttribute(birthPlaceEClass, BIRTH_PLACE__NAME);
+
// Create enums
bookCategoryEEnum = createEEnum(BOOK_CATEGORY);
tWriterTypeEEnum = createEEnum(TWRITER_TYPE);
@@ -687,6 +726,7 @@ public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
translatorEClass.getESuperTypes().add(this.getIdentifiable());
typeWriterEClass.getESuperTypes().add(this.getIdentifiable());
coverEClass.getESuperTypes().add(this.getIdentifiable());
+ birthPlaceEClass.getESuperTypes().add(this.getIdentifiable());
// Initialize classes and features; add operations and parameters
initEClass(bookEClass, Book.class, "Book", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
@@ -710,6 +750,7 @@ public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
initEReference(getWriter_Address(), this.getAddress(), null, "address", null, 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(getWriter_Publishers(), this.getPublisher(), this.getPublisher_Writers(), "publishers", null, 0, -1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(getWriter_Typewriters(), this.getTypeWriter(), null, "typewriters", null, 0, -1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getWriter_BirthPlace(), this.getBirthPlace(), null, "birthPlace", null, 0, 1, Writer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEClass(stringToBookMapEntryEClass, Map.Entry.class, "StringToBookMapEntry", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEAttribute(getStringToBookMapEntry_Key(), ecorePackage.getEString(), "key", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
@@ -747,6 +788,9 @@ public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
initEClass(abstractTestEClass, AbstractTest.class, "AbstractTest", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEClass(birthPlaceEClass, BirthPlace.class, "BirthPlace", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getBirthPlace_Name(), ecorePackage.getEString(), "name", null, 0, 1, BirthPlace.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
// Initialize enums and add enum literals
initEEnum(bookCategoryEEnum, BookCategory.class, "BookCategory"); //$NON-NLS-1$
addEEnumLiteral(bookCategoryEEnum, BookCategory.MYSTERY);
@@ -775,6 +819,12 @@ public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
protected void createTeneoAnnotations() {
String source = "teneo.jpa"; //$NON-NLS-1$
addAnnotation
+ (getWriter_BirthPlace(),
+ source,
+ new String[] {
+ "value", " @Embedded" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation
(stringToBookMapEntryEClass,
source,
new String[] {
@@ -815,6 +865,12 @@ public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
source,
new String[] {
"value", "@Version" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation
+ (birthPlaceEClass,
+ source,
+ new String[] {
+ "value", " @Embeddable" //$NON-NLS-1$ //$NON-NLS-2$
});
}
@@ -825,14 +881,14 @@ public class LibraryPackageImpl extends EPackageImpl implements LibraryPackage {
* @generated
*/
protected void createContainerMappingAnnotations() {
- String source = "http://www.oracle.com/toplink/emf/2006/ContainerMapping"; //$NON-NLS-1$
+ String source = "http://www.oracle.com/toplink/emf/2006/ContainerMapping"; //$NON-NLS-1$
addAnnotation
(addressEClass,
source,
new String[] {
"eContainingClassName", "Writer", //$NON-NLS-1$ //$NON-NLS-2$
"eContainingClassPackageName", "library" //$NON-NLS-1$ //$NON-NLS-2$
- });
+ });
}
} // LibraryPackageImpl
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/WriterImpl.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/WriterImpl.java
index 10ccf5d36..480c87afe 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/WriterImpl.java
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/impl/WriterImpl.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: WriterImpl.java,v 1.3 2009/06/14 21:00:29 seberle Exp $
+ * $Id: WriterImpl.java,v 1.4 2010/04/22 15:33:16 mtaal Exp $
*/
package org.eclipse.emf.teneo.eclipselink.examples.library.impl;
@@ -23,6 +23,7 @@ import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.emf.teneo.eclipselink.examples.library.Address;
+import org.eclipse.emf.teneo.eclipselink.examples.library.BirthPlace;
import org.eclipse.emf.teneo.eclipselink.examples.library.Book;
import org.eclipse.emf.teneo.eclipselink.examples.library.LibraryPackage;
import org.eclipse.emf.teneo.eclipselink.examples.library.Publisher;
@@ -41,6 +42,7 @@ import org.eclipse.emf.teneo.eclipselink.examples.library.Writer;
* <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl#getAddress <em>Address</em>}</li>
* <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl#getPublishers <em>Publishers</em>}</li>
* <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl#getTypewriters <em>Typewriters</em>}</li>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.library.impl.WriterImpl#getBirthPlace <em>Birth Place</em>}</li>
* </ul>
* </p>
*
@@ -108,6 +110,16 @@ public class WriterImpl extends IdentifiableImpl implements Writer {
protected EList<TypeWriter> typewriters;
/**
+ * The cached value of the '{@link #getBirthPlace() <em>Birth Place</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBirthPlace()
+ * @generated
+ * @ordered
+ */
+ protected BirthPlace birthPlace;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -231,6 +243,44 @@ public class WriterImpl extends IdentifiableImpl implements Writer {
* <!-- end-user-doc -->
* @generated
*/
+ public BirthPlace getBirthPlace() {
+ if (birthPlace != null && birthPlace.eIsProxy()) {
+ InternalEObject oldBirthPlace = (InternalEObject)birthPlace;
+ birthPlace = (BirthPlace)eResolveProxy(oldBirthPlace);
+ if (birthPlace != oldBirthPlace) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, LibraryPackage.WRITER__BIRTH_PLACE, oldBirthPlace, birthPlace));
+ }
+ }
+ return birthPlace;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BirthPlace basicGetBirthPlace() {
+ return birthPlace;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setBirthPlace(BirthPlace newBirthPlace) {
+ BirthPlace oldBirthPlace = birthPlace;
+ birthPlace = newBirthPlace;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, LibraryPackage.WRITER__BIRTH_PLACE, oldBirthPlace, birthPlace));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@SuppressWarnings("unchecked")
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
@@ -279,6 +329,9 @@ public class WriterImpl extends IdentifiableImpl implements Writer {
return getPublishers();
case LibraryPackage.WRITER__TYPEWRITERS:
return getTypewriters();
+ case LibraryPackage.WRITER__BIRTH_PLACE:
+ if (resolve) return getBirthPlace();
+ return basicGetBirthPlace();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -310,6 +363,9 @@ public class WriterImpl extends IdentifiableImpl implements Writer {
getTypewriters().clear();
getTypewriters().addAll((Collection<? extends TypeWriter>)newValue);
return;
+ case LibraryPackage.WRITER__BIRTH_PLACE:
+ setBirthPlace((BirthPlace)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -337,6 +393,9 @@ public class WriterImpl extends IdentifiableImpl implements Writer {
case LibraryPackage.WRITER__TYPEWRITERS:
getTypewriters().clear();
return;
+ case LibraryPackage.WRITER__BIRTH_PLACE:
+ setBirthPlace((BirthPlace)null);
+ return;
}
super.eUnset(featureID);
}
@@ -359,6 +418,8 @@ public class WriterImpl extends IdentifiableImpl implements Writer {
return publishers != null && !publishers.isEmpty();
case LibraryPackage.WRITER__TYPEWRITERS:
return typewriters != null && !typewriters.isEmpty();
+ case LibraryPackage.WRITER__BIRTH_PLACE:
+ return birthPlace != null;
}
return super.eIsSet(featureID);
}
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/util/LibraryAdapterFactory.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/util/LibraryAdapterFactory.java
index f8b8d9796..073919ba3 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/util/LibraryAdapterFactory.java
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/util/LibraryAdapterFactory.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: LibraryAdapterFactory.java,v 1.3 2010/03/02 20:36:09 mtaal Exp $
+ * $Id: LibraryAdapterFactory.java,v 1.4 2010/04/22 15:33:16 mtaal Exp $
*/
package org.eclipse.emf.teneo.eclipselink.examples.library.util;
@@ -126,6 +126,10 @@ public class LibraryAdapterFactory extends AdapterFactoryImpl {
return createAbstractTestAdapter();
}
@Override
+ public Adapter caseBirthPlace(BirthPlace object) {
+ return createBirthPlaceAdapter();
+ }
+ @Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
@@ -328,6 +332,20 @@ public class LibraryAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.teneo.eclipselink.examples.library.BirthPlace <em>Birth Place</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.teneo.eclipselink.examples.library.BirthPlace
+ * @generated
+ */
+ public Adapter createBirthPlaceAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/util/LibrarySwitch.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/util/LibrarySwitch.java
index 510f9f380..d7de32fce 100644
--- a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/util/LibrarySwitch.java
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/library/util/LibrarySwitch.java
@@ -2,7 +2,7 @@
* <copyright>
* </copyright>
*
- * $Id: LibrarySwitch.java,v 1.3 2010/03/02 20:36:09 mtaal Exp $
+ * $Id: LibrarySwitch.java,v 1.4 2010/04/22 15:33:16 mtaal Exp $
*/
package org.eclipse.emf.teneo.eclipselink.examples.library.util;
@@ -177,6 +177,13 @@ public class LibrarySwitch<T> {
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case LibraryPackage.BIRTH_PLACE: {
+ BirthPlace birthPlace = (BirthPlace)theEObject;
+ T result = caseBirthPlace(birthPlace);
+ if (result == null) result = caseIdentifiable(birthPlace);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -377,6 +384,21 @@ public class LibrarySwitch<T> {
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Birth Place</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Birth Place</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBirthPlace(BirthPlace object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/SuppressinterfacesFactory.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/SuppressinterfacesFactory.java
new file mode 100644
index 000000000..30d46e00f
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/SuppressinterfacesFactory.java
@@ -0,0 +1,107 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: SuppressinterfacesFactory.java,v 1.1 2010/04/22 15:33:16 mtaal Exp $
+ */
+package org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesPackage
+ * @generated
+ */
+public class SuppressinterfacesFactory extends EFactoryImpl {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final SuppressinterfacesFactory eINSTANCE = init();
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SuppressinterfacesFactory init() {
+ try {
+ SuppressinterfacesFactory theSuppressinterfacesFactory = (SuppressinterfacesFactory)EPackage.Registry.INSTANCE.getEFactory("http:///org/eclipse/emf/teneo/eclipselink/examples/test_suppressinterfaces.ecore");
+ if (theSuppressinterfacesFactory != null) {
+ return theSuppressinterfacesFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new SuppressinterfacesFactory();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SuppressinterfacesFactory() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case SuppressinterfacesPackage.TEST: return createtest();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public test createtest() {
+ test test = new test();
+ return test;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SuppressinterfacesPackage getSuppressinterfacesPackage() {
+ return (SuppressinterfacesPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static SuppressinterfacesPackage getPackage() {
+ return SuppressinterfacesPackage.eINSTANCE;
+ }
+
+} //SuppressinterfacesFactory
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/SuppressinterfacesPackage.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/SuppressinterfacesPackage.java
new file mode 100644
index 000000000..ee58efeeb
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/SuppressinterfacesPackage.java
@@ -0,0 +1,289 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: SuppressinterfacesPackage.java,v 1.1 2010/04/22 15:33:16 mtaal Exp $
+ */
+package org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesFactory
+ * @model kind="package"
+ * @generated
+ */
+public class SuppressinterfacesPackage extends EPackageImpl {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String eNAME = "suppressinterfaces";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String eNS_URI = "http:///org/eclipse/emf/teneo/eclipselink/examples/test_suppressinterfaces.ecore";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String eNS_PREFIX = "suppressinterfaces";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final SuppressinterfacesPackage eINSTANCE = org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesPackage.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test <em>test</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesPackage#gettest()
+ * @generated
+ */
+ public static final int TEST = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int TEST__NAME = 0;
+
+ /**
+ * The number of structural features of the '<em>test</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ public static final int TEST_FEATURE_COUNT = 1;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass testEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private SuppressinterfacesPackage() {
+ super(eNS_URI, SuppressinterfacesFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link SuppressinterfacesPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static SuppressinterfacesPackage init() {
+ if (isInited) return (SuppressinterfacesPackage)EPackage.Registry.INSTANCE.getEPackage(SuppressinterfacesPackage.eNS_URI);
+
+ // Obtain or create and register package
+ SuppressinterfacesPackage theSuppressinterfacesPackage = (SuppressinterfacesPackage)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SuppressinterfacesPackage ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SuppressinterfacesPackage());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theSuppressinterfacesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theSuppressinterfacesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theSuppressinterfacesPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(SuppressinterfacesPackage.eNS_URI, theSuppressinterfacesPackage);
+ return theSuppressinterfacesPackage;
+ }
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test <em>test</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>test</em>'.
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test
+ * @generated
+ */
+ public EClass gettest() {
+ return testEClass;
+ }
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test#getName()
+ * @see #gettest()
+ * @generated
+ */
+ public EAttribute gettest_Name() {
+ return (EAttribute)testEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ public SuppressinterfacesFactory getSuppressinterfacesFactory() {
+ return (SuppressinterfacesFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ testEClass = createEClass(TEST);
+ createEAttribute(testEClass, TEST__NAME);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(testEClass, test.class, "test", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(gettest_Name(), ecorePackage.getEString(), "name", null, 0, 1, test.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test <em>test</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesPackage#gettest()
+ * @generated
+ */
+ public static final EClass TEST = eINSTANCE.gettest();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final EAttribute TEST__NAME = eINSTANCE.gettest_Name();
+
+ }
+
+} //SuppressinterfacesPackage
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/test.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/test.java
new file mode 100644
index 000000000..f6921b5e8
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/test.java
@@ -0,0 +1,180 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: test.java,v 1.1 2010/04/22 15:33:16 mtaal Exp $
+ */
+package org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>test</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesPackage#gettest()
+ * @model kind="class"
+ * @generated
+ */
+public class test extends EObjectImpl implements EObject {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected test() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return SuppressinterfacesPackage.Literals.TEST;
+ }
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesPackage#gettest_Name()
+ * @model
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, SuppressinterfacesPackage.TEST__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case SuppressinterfacesPackage.TEST__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case SuppressinterfacesPackage.TEST__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case SuppressinterfacesPackage.TEST__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case SuppressinterfacesPackage.TEST__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} // test
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/util/SuppressinterfacesAdapterFactory.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/util/SuppressinterfacesAdapterFactory.java
new file mode 100644
index 000000000..c08c7a91b
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/util/SuppressinterfacesAdapterFactory.java
@@ -0,0 +1,124 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: SuppressinterfacesAdapterFactory.java,v 1.1 2010/04/22 15:33:16 mtaal Exp $
+ */
+package org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesPackage
+ * @generated
+ */
+public class SuppressinterfacesAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static SuppressinterfacesPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SuppressinterfacesAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = SuppressinterfacesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SuppressinterfacesSwitch<Adapter> modelSwitch =
+ new SuppressinterfacesSwitch<Adapter>() {
+ @Override
+ public Adapter casetest(test object) {
+ return createtestAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test <em>test</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.test
+ * @generated
+ */
+ public Adapter createtestAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //SuppressinterfacesAdapterFactory
diff --git a/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/util/SuppressinterfacesSwitch.java b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/util/SuppressinterfacesSwitch.java
new file mode 100644
index 000000000..f78aa5b8e
--- /dev/null
+++ b/examples/org.eclipse.emf.teneo.eclipselink.examples.library/src/org/eclipse/emf/teneo/eclipselink/examples/suppressinterfaces/util/SuppressinterfacesSwitch.java
@@ -0,0 +1,130 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id: SuppressinterfacesSwitch.java,v 1.1 2010/04/22 15:33:16 mtaal Exp $
+ */
+package org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.teneo.eclipselink.examples.suppressinterfaces.SuppressinterfacesPackage
+ * @generated
+ */
+public class SuppressinterfacesSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static SuppressinterfacesPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SuppressinterfacesSwitch() {
+ if (modelPackage == null) {
+ modelPackage = SuppressinterfacesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case SuppressinterfacesPackage.TEST: {
+ test test = (test)theEObject;
+ T result = casetest(test);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>test</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>test</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casetest(test object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //SuppressinterfacesSwitch

Back to the top