Class AbstractIndexTemplate

java.lang.Object
org.opensearch.data.core.AbstractIndexTemplate
All Implemented Interfaces:
org.springframework.data.elasticsearch.core.IndexOperations

public abstract class AbstractIndexTemplate extends Object implements org.springframework.data.elasticsearch.core.IndexOperations
Base implementation of IndexOperations common to Transport and Rest based Implementations of IndexOperations.
Since:
4.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Class<?>
     
    protected final org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractIndexTemplate(org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter, Class<?> boundClass)
     
    AbstractIndexTemplate(org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter, org.springframework.data.elasticsearch.core.mapping.IndexCoordinates boundIndex)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Class<?>
     
    boolean
     
    boolean
    create(Map<String,Object> settings)
     
    boolean
    create(Map<String,Object> settings, org.springframework.data.elasticsearch.core.document.Document mapping)
     
    org.springframework.data.elasticsearch.core.document.Document
     
    org.springframework.data.elasticsearch.core.document.Document
    createMapping(Class<?> clazz)
     
    org.springframework.data.elasticsearch.core.index.Settings
     
    org.springframework.data.elasticsearch.core.index.Settings
     
    boolean
     
    boolean
     
    protected abstract boolean
    doCreate(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index, Map<String,Object> settings, org.springframework.data.elasticsearch.core.document.Document mapping)
     
    protected abstract boolean
    doDelete(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index)
     
    protected abstract boolean
    doExists(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index)
     
    protected abstract Map<String,Set<org.springframework.data.elasticsearch.core.index.AliasData>>
    doGetAliases(String[] aliasNames, String[] indexNames)
     
    protected abstract Map<String,Object>
    doGetMapping(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index)
     
    protected abstract org.springframework.data.elasticsearch.core.index.Settings
    doGetSettings(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index, boolean includeDefaults)
     
    protected abstract boolean
    doPutMapping(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index, org.springframework.data.elasticsearch.core.document.Document mapping)
     
    protected abstract void
    doRefresh(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates indexCoordinates)
     
    boolean
     
    Map<String,Set<org.springframework.data.elasticsearch.core.index.AliasData>>
    getAliases(String... aliasNames)
     
    Map<String,Set<org.springframework.data.elasticsearch.core.index.AliasData>>
    getAliasesForIndex(String... indexNames)
     
    org.springframework.data.elasticsearch.core.mapping.IndexCoordinates
     
    org.springframework.data.elasticsearch.core.mapping.IndexCoordinates
     
     
    org.springframework.data.elasticsearch.core.index.Settings
     
    org.springframework.data.elasticsearch.core.index.Settings
    getSettings(boolean includeDefaults)
     
    boolean
    putMapping(org.springframework.data.elasticsearch.core.document.Document mapping)
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.data.elasticsearch.core.IndexOperations

    alias, deleteComponentTemplate, deleteIndexTemplate, deleteIndexTemplate, deleteTemplate, deleteTemplate, existsComponentTemplate, existsIndexTemplate, existsIndexTemplate, existsTemplate, existsTemplate, getComponentTemplate, getIndexTemplate, getIndexTemplate, getInformation, getInformation, getTemplate, getTemplate, putComponentTemplate, putIndexTemplate, putMapping, putMapping, putTemplate
  • Field Details

    • elasticsearchConverter

      protected final org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter
    • boundClass

      @Nullable protected final Class<?> boundClass
  • Constructor Details

    • AbstractIndexTemplate

      public AbstractIndexTemplate(org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter, Class<?> boundClass)
    • AbstractIndexTemplate

      public AbstractIndexTemplate(org.springframework.data.elasticsearch.core.convert.ElasticsearchConverter elasticsearchConverter, org.springframework.data.elasticsearch.core.mapping.IndexCoordinates boundIndex)
  • Method Details

    • checkForBoundClass

      protected Class<?> checkForBoundClass()
    • create

      public boolean create()
      Specified by:
      create in interface org.springframework.data.elasticsearch.core.IndexOperations
    • createSettings

      public org.springframework.data.elasticsearch.core.index.Settings createSettings(Class<?> clazz)
      Specified by:
      createSettings in interface org.springframework.data.elasticsearch.core.IndexOperations
    • createWithMapping

      public boolean createWithMapping()
      Specified by:
      createWithMapping in interface org.springframework.data.elasticsearch.core.IndexOperations
    • create

      public boolean create(Map<String,Object> settings)
      Specified by:
      create in interface org.springframework.data.elasticsearch.core.IndexOperations
    • create

      public boolean create(Map<String,Object> settings, org.springframework.data.elasticsearch.core.document.Document mapping)
      Specified by:
      create in interface org.springframework.data.elasticsearch.core.IndexOperations
    • doCreate

      protected abstract boolean doCreate(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index, Map<String,Object> settings, @Nullable org.springframework.data.elasticsearch.core.document.Document mapping)
    • delete

      public boolean delete()
      Specified by:
      delete in interface org.springframework.data.elasticsearch.core.IndexOperations
    • doDelete

      protected abstract boolean doDelete(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index)
    • exists

      public boolean exists()
      Specified by:
      exists in interface org.springframework.data.elasticsearch.core.IndexOperations
    • doExists

      protected abstract boolean doExists(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index)
    • putMapping

      public boolean putMapping(org.springframework.data.elasticsearch.core.document.Document mapping)
      Specified by:
      putMapping in interface org.springframework.data.elasticsearch.core.IndexOperations
    • doPutMapping

      protected abstract boolean doPutMapping(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index, org.springframework.data.elasticsearch.core.document.Document mapping)
    • getMapping

      public Map<String,Object> getMapping()
      Specified by:
      getMapping in interface org.springframework.data.elasticsearch.core.IndexOperations
    • doGetMapping

      protected abstract Map<String,Object> doGetMapping(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index)
    • getSettings

      public org.springframework.data.elasticsearch.core.index.Settings getSettings()
      Specified by:
      getSettings in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getSettings

      public org.springframework.data.elasticsearch.core.index.Settings getSettings(boolean includeDefaults)
      Specified by:
      getSettings in interface org.springframework.data.elasticsearch.core.IndexOperations
    • doGetSettings

      protected abstract org.springframework.data.elasticsearch.core.index.Settings doGetSettings(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates index, boolean includeDefaults)
    • refresh

      public void refresh()
      Specified by:
      refresh in interface org.springframework.data.elasticsearch.core.IndexOperations
    • doRefresh

      protected abstract void doRefresh(org.springframework.data.elasticsearch.core.mapping.IndexCoordinates indexCoordinates)
    • getAliases

      public Map<String,Set<org.springframework.data.elasticsearch.core.index.AliasData>> getAliases(String... aliasNames)
      Specified by:
      getAliases in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getAliasesForIndex

      public Map<String,Set<org.springframework.data.elasticsearch.core.index.AliasData>> getAliasesForIndex(String... indexNames)
      Specified by:
      getAliasesForIndex in interface org.springframework.data.elasticsearch.core.IndexOperations
    • doGetAliases

      protected abstract Map<String,Set<org.springframework.data.elasticsearch.core.index.AliasData>> doGetAliases(@Nullable String[] aliasNames, @Nullable String[] indexNames)
    • createMapping

      public org.springframework.data.elasticsearch.core.document.Document createMapping()
      Specified by:
      createMapping in interface org.springframework.data.elasticsearch.core.IndexOperations
    • createMapping

      public org.springframework.data.elasticsearch.core.document.Document createMapping(Class<?> clazz)
      Specified by:
      createMapping in interface org.springframework.data.elasticsearch.core.IndexOperations
    • createSettings

      public org.springframework.data.elasticsearch.core.index.Settings createSettings()
      Specified by:
      createSettings in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getIndexCoordinates

      public org.springframework.data.elasticsearch.core.mapping.IndexCoordinates getIndexCoordinates()
      Specified by:
      getIndexCoordinates in interface org.springframework.data.elasticsearch.core.IndexOperations
    • getIndexCoordinatesFor

      public org.springframework.data.elasticsearch.core.mapping.IndexCoordinates getIndexCoordinatesFor(Class<?> clazz)