org.compass.core.lucene.engine.transaction.support.job
Class DeleteByQueryTransactionJob

java.lang.Object
  extended by org.compass.core.lucene.engine.transaction.support.job.DeleteByQueryTransactionJob
All Implemented Interfaces:
Serializable, TransactionJob

public class DeleteByQueryTransactionJob
extends Object
implements TransactionJob

A transaction job that deletes all matching Query hits from the sub index.

Author:
kimchy
See Also:
Serialized Form

Constructor Summary
DeleteByQueryTransactionJob(Query query, String subIndex)
           
 
Method Summary
 boolean equals(Object o)
           
 void execute(IndexWriter writer, LuceneSearchEngineFactory sessionFactory)
          Executes the job against Lucene IndexWriter.
 Query getQuery()
           
 String getResourceUID()
          Retruns the resource UID (if available) that transaction job will work on.
 String getSubIndex()
          Returns the sub index the transaction job will work against.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeleteByQueryTransactionJob

public DeleteByQueryTransactionJob(Query query,
                                   String subIndex)
Method Detail

getSubIndex

public String getSubIndex()
Description copied from interface: TransactionJob
Returns the sub index the transaction job will work against.

Specified by:
getSubIndex in interface TransactionJob

getResourceUID

public String getResourceUID()
Description copied from interface: TransactionJob
Retruns the resource UID (if available) that transaction job will work on.

Specified by:
getResourceUID in interface TransactionJob

getQuery

public Query getQuery()

execute

public void execute(IndexWriter writer,
                    LuceneSearchEngineFactory sessionFactory)
             throws Exception
Description copied from interface: TransactionJob
Executes the job against Lucene IndexWriter.

Specified by:
execute in interface TransactionJob
Throws:
Exception

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright (c) 2004-2009 The Compass Project.