com.atlassian.bamboo.index.quicksearch
Class QuickSearchDocumentImpl

java.lang.Object
  extended by com.atlassian.bamboo.index.quicksearch.QuickSearchDocumentImpl
All Implemented Interfaces:
QuickSearchDocument

public class QuickSearchDocumentImpl
extends Object
implements QuickSearchDocument


Field Summary
static IndexedEntityIdField FIELD_ID
           
static IndexedEntityTextField FIELD_KEY
           
static IndexedEntityEnumField<QuickSearchDocumentFactory.Type> FIELD_TYPE
           
 
Fields inherited from interface com.atlassian.bamboo.index.quicksearch.QuickSearchDocument
SEARCH_FIELD
 
Constructor Summary
QuickSearchDocumentImpl(org.apache.lucene.document.Document doc)
           
QuickSearchDocumentImpl(long id, QuickSearchDocumentFactory.Type type, String key, Map<String,String> entity, List<String> searchTokens)
           
 
Method Summary
 org.apache.lucene.document.Document getDocument()
          Override this to provide customised data storage for better rendering.
 Map<String,String> getEntity()
           
 long getId()
           
 QuickSearchDocumentFactory.Type getType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_ID

public static final IndexedEntityIdField FIELD_ID

FIELD_KEY

public static final IndexedEntityTextField FIELD_KEY

FIELD_TYPE

public static final IndexedEntityEnumField<QuickSearchDocumentFactory.Type> FIELD_TYPE
Constructor Detail

QuickSearchDocumentImpl

public QuickSearchDocumentImpl(long id,
                               @NotNull
                               QuickSearchDocumentFactory.Type type,
                               @Nullable
                               String key,
                               @NotNull
                               Map<String,String> entity,
                               @NotNull
                               List<String> searchTokens)

QuickSearchDocumentImpl

public QuickSearchDocumentImpl(@NotNull
                               org.apache.lucene.document.Document doc)
Method Detail

getDocument

@NotNull
public org.apache.lucene.document.Document getDocument()
Override this to provide customised data storage for better rendering.

Specified by:
getDocument in interface QuickSearchDocument
Returns:
Lucene document for indexing.

getId

public long getId()
Specified by:
getId in interface QuickSearchDocument
Returns:
Id of the entity

getType

public QuickSearchDocumentFactory.Type getType()
Specified by:
getType in interface QuickSearchDocument
Returns:
string representation of the type of entity the document represents

getEntity

public Map<String,String> getEntity()
Specified by:
getEntity in interface QuickSearchDocument


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.