FileDocCategorySizeDatePackage
IndexDocumentStub.javaAPI DocApache Lucene 2.1.03924Wed Feb 14 10:46:02 GMT 2007org.apache.lucene.gdata.search.index

IndexDocumentStub

public class IndexDocumentStub extends Object implements IndexDocument
author
Simon Willnauer

Fields Summary
Document
document
Term
deleteTerm
IndexAction
action
CountDownLatch
latch
boolean
commitAfter
boolean
optimizeAfter
Constructors Summary
public IndexDocumentStub(Document doc, Term deleteTerm, IndexAction action, CountDownLatch latch)

        this.document = doc;
        this.deleteTerm = deleteTerm;
        this.action = action;
        this.latch = latch;
    
public IndexDocumentStub(Document doc, Term deleteTerm, IndexAction action)

        this(doc,deleteTerm,action,null);
    
Methods Summary
public booleancommitAfter()

        
        return this.commitAfter;
    
public final booleanequals(java.lang.Object obj)

see
java.lang.Object#equals(java.lang.Object)

        if(obj == null)
            return false;
        if(obj instanceof IndexDocumentStub){
            IndexDocumentStub other = (IndexDocumentStub)obj;
            return this.document.getField(IndexDocument.FIELD_ENTRY_ID).stringValue().equals(other.document.getField(IndexDocument.FIELD_ENTRY_ID).stringValue());
              
        }
        return false; 
    
public org.apache.lucene.index.TermgetDeletealbe()

see
org.apache.lucene.gdata.search.index.IndexDocument#getDeletealbe()

        if(latch != null)
            latch.countDown();
        return this.deleteTerm;
    
public org.apache.lucene.document.DocumentgetWriteable()

see
org.apache.lucene.gdata.search.index.IndexDocument#getWriteable()

        if(latch != null)
        latch.countDown();        
        return this.document;
    
public final inthashCode()

see
java.lang.Object#hashCode()

        return this.document.getField(IndexDocument.FIELD_ENTRY_ID).stringValue().hashCode();
    
private booleanisAction(IndexAction currentAction)

        return this.action == currentAction;
    
public booleanisDelete()

see
org.apache.lucene.gdata.search.index.IndexDocument#isDelete()


        return isAction(IndexAction.DELETE);
    
public booleanisInsert()

see
org.apache.lucene.gdata.search.index.IndexDocument#isInsert()


     return isAction(IndexAction.INSERT);
    
public booleanisUpdate()

see
org.apache.lucene.gdata.search.index.IndexDocument#isUpdate()


        return isAction(IndexAction.UPDATE);
    
public booleanoptimizeAfter()

        
        return this.optimizeAfter;
    
public voidsetCommitAfter(boolean commitAfter)

param
commitAfter The commitAfter to set.

        this.commitAfter = commitAfter;
    
public voidsetOptimizeAfter(boolean optimizeAfter)

param
optimizeAfter The optimizeAfter to set.

        this.optimizeAfter = optimizeAfter;