[hibernate-commits] Hibernate SVN: r16779 - in search/trunk: src/main/java/org/hibernate/search/jpa/impl and 1 other directory.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Jun 12 21:47:28 EDT 2009


Author: epbernard
Date: 2009-06-12 21:47:28 -0400 (Fri, 12 Jun 2009)
New Revision: 16779

Modified:
   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:
HSEARCH-379 migrate to JPA 2 but no method has been implemented

Modified: search/trunk/pom.xml
===================================================================
--- search/trunk/pom.xml	2009-06-12 21:22:09 UTC (rev 16778)
+++ search/trunk/pom.xml	2009-06-13 01:47:28 UTC (rev 16779)
@@ -64,10 +64,15 @@
             <artifactId>hibernate-commons-annotations</artifactId>
             <version>${hibernateVersion}</version>
         </dependency>
-        <dependency>
+        <!-- dependency>
             <groupId>org.hibernate</groupId>
             <artifactId>ejb3-persistence</artifactId>
             <version>1.0.2.GA</version>
+        </dependency -->
+        <dependency>
+            <groupId>org.hibernate.java-persistence</groupId>
+            <artifactId>jpa-api</artifactId>
+            <version>2.0.Beta2</version>
         </dependency>
         <dependency>
             <groupId>org.apache.lucene</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-06-12 21:22:09 UTC (rev 16778)
+++ search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextEntityManagerImpl.java	2009-06-13 01:47:28 UTC (rev 16779)
@@ -2,11 +2,17 @@
 package org.hibernate.search.jpa.impl;
 
 import java.io.Serializable;
+import java.util.Map;
+import java.util.Set;
 import javax.persistence.EntityManager;
 import javax.persistence.FlushModeType;
 import javax.persistence.LockModeType;
 import javax.persistence.Query;
 import javax.persistence.EntityTransaction;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.metamodel.Metamodel;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.QueryBuilder;
 
 import org.hibernate.search.jpa.FullTextEntityManager;
 import org.hibernate.search.jpa.FullTextQuery;
@@ -65,7 +71,7 @@
 		return ftSession;
 	}
 
-	public FullTextQuery createFullTextQuery(org.apache.lucene.search.Query luceneQuery, Class... entities) {
+	public FullTextQuery createFullTextQuery(org.apache.lucene.search.Query luceneQuery, Class<?>... entities) {
 		FullTextSession ftSession = getFullTextSession();
 		return new FullTextQueryImpl( ftSession.createFullTextQuery( luceneQuery, entities ), ftSession );
 	}
@@ -106,6 +112,18 @@
 		return em.find( entityClass, primaryKey );
 	}
 
+	public <T> T find(Class<T> tClass, Object o, Map<String, Object> stringObjectMap) {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public <T> T find(Class<T> tClass, Object o, LockModeType lockModeType) {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public <T> T find(Class<T> tClass, Object o, LockModeType lockModeType, Map<String, Object> stringObjectMap) {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
 	public <T> T getReference(Class<T> entityClass, Object primaryKey) {
 		return em.getReference( entityClass, primaryKey );
 	}
@@ -126,22 +144,62 @@
 		em.lock( entity, lockMode );
 	}
 
+	public void lock(Object o, LockModeType lockModeType, Map<String, Object> stringObjectMap) {
+		//To change body of implemented methods use File | Settings | File Templates.
+	}
+
 	public void refresh(Object entity) {
 		em.refresh( entity );
 	}
 
+	public void refresh(Object o, Map<String, Object> stringObjectMap) {
+		//To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public void refresh(Object o, LockModeType lockModeType) {
+		//To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public void refresh(Object o, LockModeType lockModeType, Map<String, Object> stringObjectMap) {
+		//To change body of implemented methods use File | Settings | File Templates.
+	}
+
 	public void clear() {
 		em.clear();
 	}
 
+	public void detach(Object o) {
+		//To change body of implemented methods use File | Settings | File Templates.
+	}
+
 	public boolean contains(Object entity) {
 		return em.contains( entity );
 	}
 
+	public LockModeType getLockMode(Object o) {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public void setProperty(String s, Object o) {
+		//To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public Map<String, Object> getProperties() {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public Set<String> getSupportedProperties() {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
 	public Query createQuery(String ejbqlString) {
 		return em.createQuery( ejbqlString );
 	}
 
+	public Query createQuery(CriteriaQuery criteriaQuery) {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
 	public Query createNamedQuery(String name) {
 		return em.createNamedQuery( name );
 	}
@@ -162,6 +220,10 @@
 		em.joinTransaction();
 	}
 
+	public <T> T unwrap(Class<T> tClass) {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
 	public Object getDelegate() {
 		return em.getDelegate();
 	}
@@ -177,7 +239,19 @@
 	public EntityTransaction getTransaction() {
 		return em.getTransaction();
 	}
-	
+
+	public EntityManagerFactory getEntityManagerFactory() {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public QueryBuilder getQueryBuilder() {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public Metamodel getMetamodel() {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
 	public Indexer createIndexer(Class<?>... types) {
 		return getFullTextSession().createIndexer( types );
 	}

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-06-12 21:22:09 UTC (rev 16778)
+++ search/trunk/src/main/java/org/hibernate/search/jpa/impl/FullTextQueryImpl.java	2009-06-13 01:47:28 UTC (rev 16779)
@@ -7,6 +7,7 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.Map;
 import javax.persistence.EntityExistsException;
 import javax.persistence.EntityNotFoundException;
 import javax.persistence.FlushModeType;
@@ -16,6 +17,7 @@
 import javax.persistence.PersistenceException;
 import javax.persistence.Query;
 import javax.persistence.TemporalType;
+import javax.persistence.LockModeType;
 
 import org.apache.lucene.search.Filter;
 import org.apache.lucene.search.Sort;
@@ -216,6 +218,10 @@
 		return this;
 	}
 
+	public int getMaxResults() {
+		return 0;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
 	public Query setFirstResult(int firstResult) {
 		if ( firstResult < 0 ) {
 			throw new IllegalArgumentException(
@@ -228,6 +234,10 @@
 		return this;
 	}
 
+	public int getFirstResult() {
+		return 0;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
 	public Explanation explain(int documentId) {
 		return query.explain( documentId );
 	}
@@ -240,6 +250,14 @@
 		return this;
 	}
 
+	public Map<String, Object> getHints() {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public Set<String> getSupportedHints() {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
 	public Query setParameter(String name, Object value) {
 		throw new UnsupportedOperationException( "parameters not supported in fullText queries");
 	}
@@ -264,6 +282,14 @@
 		throw new UnsupportedOperationException( "parameters not supported in fullText queries");
 	}
 
+	public Map<String, Object> getNamedParameters() {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public List getPositionalParameters() {
+		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 );
@@ -273,4 +299,20 @@
 		}
 		return this;
 	}
+
+	public FlushModeType getFlushMode() {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public Query setLockMode(LockModeType lockModeType) {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public LockModeType getLockMode() {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
+
+	public <T> T unwrap(Class<T> tClass) {
+		return null;  //To change body of implemented methods use File | Settings | File Templates.
+	}
 }




More information about the hibernate-commits mailing list