Class LuceneIndexRepository

java.lang.Object
com.googlecode.luceneappengine.firestore.BaseFirestoreRepository<LuceneIndex>
com.googlecode.luceneappengine.model.repository.LuceneIndexRepository

public class LuceneIndexRepository extends BaseFirestoreRepository<LuceneIndex>
A repository to manage CRUD on LuceneIndex.
  • Constructor Details

    • LuceneIndexRepository

      public LuceneIndexRepository(com.google.cloud.firestore.Firestore firestore, FirestoreCollectionMapper datastoreEntityMapper)
      Create a Repository for LuceneIndex
      Parameters:
      firestore - the firestore
      datastoreEntityMapper - the datastore entity mapper
  • Method Details

    • findRefById

      public com.google.cloud.firestore.DocumentReference findRefById(String id)
      Return the firestore document reference.
      Parameters:
      id - the id of the codument in the current index
      Returns:
      The firestore document reference
    • findAll

      public List<LuceneIndex> findAll()
      Returns the available indexs.
      Returns:
      The indexes available
    • saveIndex

      public com.google.cloud.firestore.DocumentReference saveIndex(LuceneIndex entity)
      Save the index in the datastore.
      Parameters:
      entity - The index to be saved
      Returns:
      The document reference in firestore
    • getOrCreate

      public LuceneIndex getOrCreate(String indexName)
      Return and index of a name.
      Parameters:
      indexName - The name of the index
      Returns:
      a specific index