Author: hardy.ferentschik
Date: 2008-11-26 08:17:23 -0500 (Wed, 26 Nov 2008)
New Revision: 15621
Modified:
search/trunk/src/java/org/hibernate/search/impl/FullTextSessionImpl.java
Log:
HSEARCH-309
Removed the code added for HSEARCH-262 since it is obsolete after implementing
HSEARCH-160
Modified: search/trunk/src/java/org/hibernate/search/impl/FullTextSessionImpl.java
===================================================================
--- search/trunk/src/java/org/hibernate/search/impl/FullTextSessionImpl.java 2008-11-26
12:21:24 UTC (rev 15620)
+++ search/trunk/src/java/org/hibernate/search/impl/FullTextSessionImpl.java 2008-11-26
13:17:23 UTC (rev 15621)
@@ -48,7 +48,6 @@
import org.hibernate.search.backend.Work;
import org.hibernate.search.backend.WorkType;
import org.hibernate.search.backend.impl.EventSourceTransactionContext;
-import org.hibernate.search.engine.DocumentBuilderIndexedEntity;
import org.hibernate.search.engine.SearchFactoryImplementor;
import org.hibernate.search.query.FullTextQueryImpl;
import org.hibernate.search.util.ContextHelper;
@@ -102,6 +101,7 @@
/**
* {@inheritDoc}
*/
+ @SuppressWarnings( "unchecked" )
public <T> void purge(Class<T> entityType, Serializable id) {
if ( entityType == null ) {
return;
@@ -114,21 +114,11 @@
throw new IllegalArgumentException( msg );
}
+ Work<T> work;
for ( Class clazz : targetedClasses ) {
- DocumentBuilderIndexedEntity builder =
searchFactoryImplementor.getDocumentBuilderIndexedEntity( clazz );
- Work<T> work;
if ( id == null ) {
- // purge the main entity
work = new Work<T>( clazz, id, WorkType.PURGE_ALL );
searchFactoryImplementor.getWorker().performWork( work, transactionContext );
-
- // purge the subclasses
- Set<Class<?>> subClasses = builder.getMappedSubclasses();
- for ( Class subClazz : subClasses ) {
- @SuppressWarnings( "unchecked" )
- Work subClassWork = new Work( subClazz, id, WorkType.PURGE_ALL );
- searchFactoryImplementor.getWorker().performWork( subClassWork, transactionContext
);
- }
}
else {
work = new Work<T>( clazz, id, WorkType.PURGE );
Show replies by date