org.compass.core.lucene.engine.transaction.support
Class WriterHelper

java.lang.Object
  extended by org.compass.core.lucene.engine.transaction.support.WriterHelper

public abstract class WriterHelper
extends Object

Provides helper method to process create/update/delete opeations from a Resource to an IndexWriter.

Author:
kimchy

Constructor Summary
WriterHelper()
           
 
Method Summary
static void processCreate(IndexWriter writer, InternalResource resource)
          Adds the given resource to the writer.
static void processDelete(IndexWriter writer, Query query)
          Deletes all the resources that match the given query.
static void processDelete(IndexWriter writer, ResourceKey resourceKey)
          Deletes the give resoruce key from the writer.
static void processUpdate(IndexWriter writer, InternalResource resource)
          Updates the given resoruce to the writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriterHelper

public WriterHelper()
Method Detail

processCreate

public static void processCreate(IndexWriter writer,
                                 InternalResource resource)
                          throws IOException
Adds the given resource to the writer.

Throws:
IOException

processUpdate

public static void processUpdate(IndexWriter writer,
                                 InternalResource resource)
                          throws IOException
Updates the given resoruce to the writer.

Throws:
IOException

processDelete

public static void processDelete(IndexWriter writer,
                                 ResourceKey resourceKey)
                          throws IOException
Deletes the give resoruce key from the writer.

Throws:
IOException

processDelete

public static void processDelete(IndexWriter writer,
                                 Query query)
                          throws IOException
Deletes all the resources that match the given query.

Throws:
IOException


Copyright (c) 2004-2009 The Compass Project.