Author: dgeraskov
Date: 2011-06-01 03:35:51 -0400 (Wed, 01 Jun 2011)
New Revision: 31726
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/AbstractHibernateNamedQueryImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaQueryContainerImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateNamedNativeQueryImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateNamedQueryImpl.java
Log:
https://issues.jboss.org/browse/JBIDE-9046
Fix compilation error due to api change
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2011-06-01
07:28:46 UTC (rev 31725)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2011-06-01
07:35:51 UTC (rev 31726)
@@ -19,7 +19,8 @@
org.eclipse.jpt.jpa.db,
org.eclipse.jpt.jpa.core;bundle-version="3.0.0",
org.eclipse.text;bundle-version="3.5.100",
- org.eclipse.jst.j2ee;bundle-version="1.1.500"
+ org.eclipse.jst.j2ee;bundle-version="1.1.500",
+ org.eclipse.persistence.jpa.jpql;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.hibernate.jpt.core.internal,
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/AbstractHibernateNamedQueryImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/AbstractHibernateNamedQueryImpl.java 2011-06-01
07:28:46 UTC (rev 31725)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/AbstractHibernateNamedQueryImpl.java 2011-06-01
07:35:51 UTC (rev 31726)
@@ -22,7 +22,7 @@
*
*/
@SuppressWarnings("restriction")
-public class AbstractHibernateNamedQueryImpl<T extends HibernateQueryAnnotation>
extends AbstractJavaQuery<T>
+public abstract class AbstractHibernateNamedQueryImpl<T extends
HibernateQueryAnnotation> extends AbstractJavaQuery<T>
implements HibernateJavaQuery {
private FlushModeType specifiedFlushMode;
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaQueryContainerImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaQueryContainerImpl.java 2011-06-01
07:28:46 UTC (rev 31725)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaQueryContainerImpl.java 2011-06-01
07:35:51 UTC (rev 31726)
@@ -304,10 +304,4 @@
}
}
- @Override
- @SuppressWarnings("unchecked")
- public Iterator<JavaQuery> queries() {
- return new CompositeIterator<JavaQuery>(queries(),
this.hibernateNamedNativeQueries(), this.hibernateNamedQueries());
- }
-
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateNamedNativeQueryImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateNamedNativeQueryImpl.java 2011-06-01
07:28:46 UTC (rev 31725)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateNamedNativeQueryImpl.java 2011-06-01
07:35:51 UTC (rev 31726)
@@ -10,7 +10,12 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.core.internal.context.java;
+import java.util.List;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernateNamedNativeQuery;
import
org.jboss.tools.hibernate.jpt.core.internal.resource.java.HibernateNamedNativeQueryAnnotation;
@@ -110,6 +115,12 @@
public boolean isDefaultCallable(){
return HibernateNamedNativeQuery.DEFAULT_CALLABLE;
}
+
+ // ********** validation **********
+ @Override
+ protected void validateQuery_(List<IMessage> messages, IReporter reporter,
CompilationUnit astRoot) {
+ // nothing yet
+ }
}
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateNamedQueryImpl.java
===================================================================
---
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateNamedQueryImpl.java 2011-06-01
07:28:46 UTC (rev 31725)
+++
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateNamedQueryImpl.java 2011-06-01
07:35:51 UTC (rev 31726)
@@ -10,7 +10,13 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.core.internal.context.java;
+import java.util.List;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.jpa.core.internal.jpql.JpaJpqlQueryHelper;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import
org.jboss.tools.hibernate.jpt.core.internal.resource.java.HibernateNamedQueryAnnotation;
/**
@@ -23,5 +29,13 @@
HibernateNamedQueryAnnotation queryAnnotation) {
super(parent, queryAnnotation);
}
+
+ // ********** validation **********
+ @Override
+ protected void validateQuery_(List<IMessage> messages, IReporter reporter,
CompilationUnit astRoot) {
+ JpaJpqlQueryHelper helper = new JpaJpqlQueryHelper();
+ helper.validate(this, this.query, this.getQueryAnnotation().getQueryTextRange(astRoot),
1, messages);
+ }
+
}