Author: dgeraskov
Date: 2011-04-12 07:52:43 -0400 (Tue, 12 Apr 2011)
New Revision: 30516
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/jpa2/HibernateJpaFactory2_0.java
Log:
https://issues.jboss.org/browse/JBIDE-8681
Implement JpaFactory2_0 interface
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/jpa2/HibernateJpaFactory2_0.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/jpa2/HibernateJpaFactory2_0.java 2011-04-12
05:04:25 UTC (rev 30515)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/jpa2/HibernateJpaFactory2_0.java 2011-04-12
11:52:43 UTC (rev 30516)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.core.internal.jpa2;
+
import org.eclipse.jpt.jpa.core.JpaDataSource;
import org.eclipse.jpt.jpa.core.JpaProject;
import org.eclipse.jpt.jpa.core.context.PersistentType;
@@ -44,6 +45,7 @@
import
org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaPersistentAttribute2_0;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaPersistentType2_0;
import
org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaSequenceGenerator2_0;
+import org.eclipse.jpt.jpa.core.jpa2.JpaFactory2_0;
import org.eclipse.jpt.jpa.core.jpa2.JpaProject2_0;
import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelSourceType;
import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0;
@@ -72,21 +74,13 @@
import
org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaOneToOneMapping;
+
/**
* @author Dmitry Geraskov
*
*/
-public class HibernateJpaFactory2_0 extends HibernateAbstractJpaFactory {
+public class HibernateJpaFactory2_0 extends HibernateAbstractJpaFactory implements
JpaFactory2_0 {
- // ********** Core Model **********
- @Override
- public JpaProject buildJpaProject(JpaProject.Config config){
- if ( ! (config instanceof JpaProject2_0.Config)) {
- throw new IllegalArgumentException("config must be 2.0-compatible: " +
config); //$NON-NLS-1$
- }
- return super.buildJpaProject(config);
- }
-
// ********** Hibernate Specific **********
@Override
public JavaManyToOneMapping buildJavaManyToOneMapping(JavaPersistentAttribute parent) {
@@ -106,6 +100,16 @@
}
// ********** From GenericJpa2_0 Model **********
+ // ********** Core Model **********
+
+ @Override
+ public JpaProject buildJpaProject(JpaProject.Config config) {
+ if ( ! (config instanceof JpaProject2_0.Config)) {
+ throw new IllegalArgumentException("config must be 2.0-compatible: " +
config); //$NON-NLS-1$
+ }
+ return super.buildJpaProject(config);
+ }
+
public MetamodelSourceType.Synchronizer buildMetamodelSynchronizer(MetamodelSourceType
sourceType) {
return new GenericMetamodelSynchronizer(sourceType);
}