Author: epbernard
Date: 2009-08-15 12:31:51 -0400 (Sat, 15 Aug 2009)
New Revision: 17308
Modified:
core/trunk/annotations/pom.xml
core/trunk/commons-annotations/pom.xml
core/trunk/entitymanager/pom.xml
search/trunk/pom.xml
search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextEntityManagerImpl.java
search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java
Log:
Make commons annotation independent from core.
Modified: core/trunk/annotations/pom.xml
===================================================================
--- core/trunk/annotations/pom.xml 2009-08-15 16:24:27 UTC (rev 17307)
+++ core/trunk/annotations/pom.xml 2009-08-15 16:31:51 UTC (rev 17308)
@@ -42,7 +42,6 @@
<name>Hibernate Annotations</name>
<description>Annotations metadata for Hibernate</description>
- <!-- Annotations and Commons-Annotations both use the ANN JIRA key -->
<issueManagement>
<system>jira</system>
<
url>http://opensource.atlassian.com/projects/hibernate/browse/ANN</...
@@ -57,7 +56,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
- <version>${version}</version>
+ <version>3.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.hibernate.java-persistence</groupId>
Modified: core/trunk/commons-annotations/pom.xml
===================================================================
--- core/trunk/commons-annotations/pom.xml 2009-08-15 16:24:27 UTC (rev 17307)
+++ core/trunk/commons-annotations/pom.xml 2009-08-15 16:31:51 UTC (rev 17308)
@@ -28,43 +28,151 @@
<modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-parent</artifactId>
- <version>3.5.0-SNAPSHOT</version>
- <relativePath>../parent/pom.xml</relativePath>
- </parent>
-
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<packaging>jar</packaging>
+ <version>3.2.0-SNAPSHOT</version>
<name>Hibernate Commons Annotations</name>
<description>Common reflection code used in support of annotation
processing</description>
+ <url>http://hibernate.org</url>
+ <inceptionYear>2005</inceptionYear>
- <!-- Annotations and Commons-Annotations both use the ANN JIRA key -->
+ <organization>
+ <name>Hibernate.org</name>
+ <url>http://hibernate.org</url>
+ </organization>
+
+ <licenses>
+ <license>
+ <name>GNU LESSER GENERAL PUBLIC LICENSE</name>
+ <
url>http://www.gnu.org/licenses/lgpl.txt</url>
+ </license>
+ </licenses>
+
+ <developers>
+ <developer>
+ <id>epbernard</id>
+ <name>Emmanuel Bernard</name>
+ <email>emmanuel(a)hibernate.org</email>
+ <organization>JBoss, a division of Red Hat</organization>
+ <url>http://in.relation.to/Bloggers/Emmanuel</url>
+ </developer>
+ </developers>
+
+ <mailingLists>
+ <mailingList>
+ <name>Hibernate Announcements</name>
+ <post>hibernate-announce(a)lists.jboss.org</post>
+
<
subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announce&...
+
<
unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-announc...
+
<
archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
+ </mailingList>
+ <mailingList>
+ <name>Hibernate Commit Notificatons</name>
+ <post>hibernate-commits(a)lists.jboss.org</post>
+
<
subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits&l...
+
<
unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-commits...
+
<
archive>http://lists.jboss.org/pipermail/hibernate-commits/</archiv...
+ </mailingList>
+ <mailingList>
+ <name>Hibernate Developers</name>
+ <post>hibernate-dev(a)lists.jboss.org</post>
+
<
subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev</s...
+
<
unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-dev<...
+
<
archive>http://lists.jboss.org/pipermail/hibernate-dev/</archive>
+ <otherArchives>
+
<
otherArchive>http://www.mail-archive.com/hibernate-dev%40lists.jboss.o...
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Hibernate Issue Notifications</name>
+ <post>hibernate-issues(a)lists.jboss.org</post>
+
<
subscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues<...
+
<
unsubscribe>https://lists.jboss.org/mailman/listinfo/hibernate-issues&...
+
<
archive>http://lists.jboss.org/pipermail/hibernate-issues/</archive...
+ </mailingList>
+ </mailingLists>
+
<issueManagement>
<system>jira</system>
-
<
url>http://opensource.atlassian.com/projects/hibernate/browse/ANN</...
+
<
url>http://opensource.atlassian.com/projects/hibernate/browse/HCANN<...
</issueManagement>
+ <scm>
+
<
connection>scm:svn:https://svn.jboss.org/repos/hibernate/commons-annot...
+
<
developerConnection>scm:svn:https://svn.jboss.org/repos/hibernate/comm...
+
<
url>https://svn.jboss.org/repos/hibernate/commons-annotations/trunk<...
+ </scm>
+
<dependencies>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-core</artifactId>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
</dependency>
+ <!-- test-scoped dependencies for common testing dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4jVersion}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${slf4jVersion}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>99.0-does-not-exist</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ <version>99.0-does-not-exist</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- / test-scoped dependencies for common testing dependencies -->
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${version}</version>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4jVersion}</version>
</dependency>
</dependencies>
</dependencyManagement>
+ <distributionManagement>
+ <repository>
+ <!-- Copy the dist to the local checkout of the JBoss maven2 repo
${maven.repository.root} -->
+ <!-- It is anticipated that ${maven.repository.root} be set in user's
settings.xml -->
+ <!-- todo : replace this with direct svn access once the svnkit providers
are available -->
+ <id>repository.jboss.org</id>
+ <url>file://${maven.repository.root}</url>
+ </repository>
+ <snapshotRepository>
+ <id>snapshots.jboss.org</id>
+ <name>JBoss Snapshot Repository</name>
+ <
url>dav:https://snapshots.jboss.org/maven2</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <properties>
+ <slf4jVersion>1.5.8</slf4jVersion>
+ </properties>
+
<build>
<plugins>
<plugin>
Modified: core/trunk/entitymanager/pom.xml
===================================================================
--- core/trunk/entitymanager/pom.xml 2009-08-15 16:24:27 UTC (rev 17307)
+++ core/trunk/entitymanager/pom.xml 2009-08-15 16:31:51 UTC (rev 17308)
@@ -85,7 +85,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
- <version>${version}</version>
+ <version>3.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
Modified: search/trunk/pom.xml
===================================================================
--- search/trunk/pom.xml 2009-08-15 16:24:27 UTC (rev 17307)
+++ search/trunk/pom.xml 2009-08-15 16:31:51 UTC (rev 17308)
@@ -54,6 +54,7 @@
<slf4jVersion>1.5.6</slf4jVersion>
<luceneVersion>2.4.1</luceneVersion>
<hibernateVersion>3.5.0-SNAPSHOT</hibernateVersion>
+
<hibernateCommonsAnnotationVersion>3.2.0-SNAPSHOT</hibernateCommonsAnnotationVersion>
</properties>
<dependencies>
@@ -68,7 +69,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
- <version>${hibernateVersion}</version>
+ <version>${hibernateCommonsAnnotationVersion}</version>
</dependency>
<!-- dependency>
<groupId>org.hibernate</groupId>
Modified:
search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextEntityManagerImpl.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextEntityManagerImpl.java 2009-08-15
16:24:27 UTC (rev 17307)
+++
search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextEntityManagerImpl.java 2009-08-15
16:31:51 UTC (rev 17308)
@@ -10,6 +10,7 @@
import javax.persistence.Query;
import javax.persistence.EntityTransaction;
import javax.persistence.EntityManagerFactory;
+import javax.persistence.TypedQuery;
import javax.persistence.metamodel.Metamodel;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.QueryBuilder;
@@ -196,14 +197,22 @@
return em.createQuery( ejbqlString );
}
- public Query createQuery(CriteriaQuery criteriaQuery) {
- return null; //To change body of implemented methods use File | Settings | File
Templates.
+ public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery)
{
+ return em.createQuery( criteriaQuery );
}
+ public <T> TypedQuery<T> createQuery(String qlString, Class<T>
resultClass) {
+ return em.createQuery( qlString, resultClass );
+ }
+
public Query createNamedQuery(String name) {
return em.createNamedQuery( name );
}
+ public <T> TypedQuery<T> createNamedQuery(String name, Class<T>
resultClass) {
+ return em.createNamedQuery( name, resultClass );
+ }
+
public Query createNativeQuery(String sqlString) {
return em.createNativeQuery( sqlString );
}
Modified: search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java
===================================================================
---
search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java 2009-08-15
16:24:27 UTC (rev 17307)
+++
search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java 2009-08-15
16:31:51 UTC (rev 17308)
@@ -18,6 +18,7 @@
import javax.persistence.Query;
import javax.persistence.TemporalType;
import javax.persistence.LockModeType;
+import javax.persistence.Parameter;
import org.apache.lucene.search.Filter;
import org.apache.lucene.search.Sort;
@@ -282,14 +283,61 @@
throw new UnsupportedOperationException( "parameters not supported in fullText
queries");
}
+ //FIXME remove old JPA 2 contract
public Map<String, Object> getNamedParameters() {
return null; //To change body of implemented methods use File | Settings | File
Templates.
}
+ //FIXME remove old JPA 2 contract
public List getPositionalParameters() {
return null; //To change body of implemented methods use File | Settings | File
Templates.
}
+ //FIXME
+ public Set<Parameter<?>> getParameters() {
+ return null; //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ //FIXME
+ public Parameter<?> getParameter(String name) {
+ return null; //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ //FIXME
+ public Parameter<?> getParameter(int position) {
+ return null; //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ //FIXME
+ public <T> Parameter<T> getParameter(String name, Class<T> type) {
+ return null; //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ //FIXME
+ public <T> Parameter<T> getParameter(int position, Class<T> type) {
+ return null; //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ //FIXME
+ public boolean isBound(Parameter<?> param) {
+ return false; //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ //FIXME
+ public <T> T getParameterValue(Parameter<T> param) {
+ return null; //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ //FIXME
+ public Object getParameterValue(String name) {
+ return null; //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
+ //FIXME
+ public Object getParameterValue(int position) {
+ return null; //To change body of implemented methods use File | Settings | File
Templates.
+ }
+
public Query setFlushMode(FlushModeType flushMode) {
if ( flushMode == FlushModeType.AUTO ) {
query.setFlushMode( FlushMode.AUTO );