diff options
author | Martin Taal | 2010-02-09 21:00:22 +0000 |
---|---|---|
committer | Martin Taal | 2010-02-09 21:00:22 +0000 |
commit | d6c91bb8d121b31b93b3277d3bd8c5b58556522d (patch) | |
tree | 0ecde8a94a2256391202d6984e9889c3cf7cffe5 /plugins/org.eclipse.emf.cdo.examples.hibernate.server | |
parent | bc0a329c7da224ac76e012636c5969edb928d6d7 (diff) | |
download | cdo-d6c91bb8d121b31b93b3277d3bd8c5b58556522d.tar.gz cdo-d6c91bb8d121b31b93b3277d3bd8c5b58556522d.tar.xz cdo-d6c91bb8d121b31b93b3277d3bd8c5b58556522d.zip |
[300645] Implemented example of using Teneo extension mechanism
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.examples.hibernate.server')
3 files changed, 42 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.cdo.examples.hibernate.server/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.examples.hibernate.server/META-INF/MANIFEST.MF index e5d461106b..68770835da 100644 --- a/plugins/org.eclipse.emf.cdo.examples.hibernate.server/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo.examples.hibernate.server/META-INF/MANIFEST.MF @@ -5,9 +5,15 @@ Bundle-SymbolicName: org.eclipse.emf.cdo.examples.hibernate.server Bundle-Version: 1.0.0.qualifier Bundle-Vendor: %pluginProvider Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Eclipse-RegisterBuddy: org.eclipse.emf.cdo.server.hibernate -Require-Bundle: org.eclipse.emf.cdo.server.hibernate.teneo;bundle-version="3.0.0" -Import-Package: org.hibernate.engine;version="[3.3.2,4.0.0)", +Eclipse-RegisterBuddy: org.eclipse.emf.cdo.server.hibernate, org.eclipse.emf.cdo.server.hibernate.teneo +Require-Bundle: org.eclipse.emf.cdo.server.hibernate.teneo;bundle-version="3.0.0", + org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)", + org.eclipse.emf.ecore;bundle-version="[2.5.0,3.0.0)" +Import-Package: org.eclipse.emf.teneo.annotations.mapper;version="[1.1.2,2.0.0)", + org.eclipse.emf.teneo.annotations.pamodel;version="[1.1.2,2.0.0)", + org.eclipse.emf.teneo.annotations.pannotation;version="[1.1.2,2.0.0)", + org.eclipse.emf.cdo.server.hibernate.internal.teneo;version="[3.0.0,4.0.0)", + org.hibernate.engine;version="[3.3.2,4.0.0)", org.hibernate.id;version="[3.3.2,4.0.0)", org.hibernate.persister.entity;version="[3.3.2,4.0.0)" Export-Package: org.eclipse.emf.cdo.examples.hibernate.server diff --git a/plugins/org.eclipse.emf.cdo.examples.hibernate.server/config/cdo-server.xml b/plugins/org.eclipse.emf.cdo.examples.hibernate.server/config/cdo-server.xml index af11e2d0d4..21b7a8118c 100755 --- a/plugins/org.eclipse.emf.cdo.examples.hibernate.server/config/cdo-server.xml +++ b/plugins/org.eclipse.emf.cdo.examples.hibernate.server/config/cdo-server.xml @@ -81,6 +81,8 @@ --> <store type="hibernate"> <mappingProvider type="teneo"> + <extension name="org.eclipse.emf.teneo.annotations.mapper.EFeatureAnnotator" + value="org.eclipse.emf.cdo.examples.hibernate.server.CDOExampleEFeatureAnnotator"/> </mappingProvider> <!-- <mappingProvider type="file"> diff --git a/plugins/org.eclipse.emf.cdo.examples.hibernate.server/src/org/eclipse/emf/cdo/examples/hibernate/server/CDOExampleEFeatureAnnotator.java b/plugins/org.eclipse.emf.cdo.examples.hibernate.server/src/org/eclipse/emf/cdo/examples/hibernate/server/CDOExampleEFeatureAnnotator.java new file mode 100644 index 0000000000..9e034c48da --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.examples.hibernate.server/src/org/eclipse/emf/cdo/examples/hibernate/server/CDOExampleEFeatureAnnotator.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2010 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Martin Taal - initial API and implementation + * Eike Stepper - maintenance + */ +package org.eclipse.emf.cdo.examples.hibernate.server; + +import org.eclipse.emf.cdo.server.hibernate.teneo.CDOEFeatureAnnotator; +import org.eclipse.emf.teneo.annotations.pamodel.PAnnotatedEStructuralFeature; + +/** + * An example of providing an extension for Teneo Mapping. See <a + * href="http://wiki.eclipse.org/Teneo/Hibernate/Extensions">here</a> for more information on Teneo extensions. + * + * @author Martin Taal + */ +public class CDOExampleEFeatureAnnotator extends CDOEFeatureAnnotator +{ + @Override + public void annotate(PAnnotatedEStructuralFeature aStructuralFeature) + { + System.err.println("This method should be called"); //$NON-NLS-1$ + super.annotate(aStructuralFeature); + } +} |