org.apache.ignite.springdata22.repository.support

## Class IgniteRepositoryImpl<V,K extends Serializable>

- java.lang.Object
- - org.apache.ignite.springdata22.repository.support.IgniteRepositoryImpl<V,K>

- Type Parameters:
    `V` - the cache value type
    `K` - the cache key type
  All Implemented Interfaces:
    IgniteRepository<V,K>, org.springframework.data.repository.CrudRepository<V,K>, org.springframework.data.repository.Repository<V,K>

      @Conditional(value=ConditionFalse.class)
      public class IgniteRepositoryImpl<V,K extends Serializable>
      extends Object
      implements IgniteRepository<V,K>

  General Apache Ignite repository implementation. This bean should've never been loaded by context directly, only via `IgniteRepositoryFactory`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IgniteRepositoryImpl(Ignite ignite, IgniteCache<K,V> cache)` Repository constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IgniteCache<K,V>` | `cache()` Returns the Ignite Cache bound to the repository
    `long` | `count()`
    `void` | `delete(V entity)`
    `void` | `deleteAll()`
    `void` | `deleteAll(Iterable<? extends V> entities)`
    `void` | `deleteAllById(Iterable<K> ids)` Deletes all the entities for the provided ids.
    `void` | `deleteById(K id)`
    `boolean` | `existsById(K id)`
    `Iterable<V>` | `findAll()`
    `Iterable<V>` | `findAllById(Iterable<K> ids)`
    `Optional<V>` | `findById(K id)`
    `Ignite` | `ignite()` Returns the Ignite instance bound to the repository
    `<S extends V> S` | `save(K key, S entity)` Saves a given entity using provided key.
    `<S extends V> S` | `save(K key, S entity, @Nullable javax.cache.expiry.ExpiryPolicy expiryPlc)` Saves a given entity using provided key with expiry policy It's suggested to use this method instead of default `CrudRepository.save(Object)` that generates IDs (keys) that are not unique cluster wide.
    `<S extends V> Iterable<S>` | `save(Map<K,S> entities)` Saves all given keys and entities combinations.
    `<S extends V> Iterable<S>` | `save(Map<K,S> entities, @Nullable javax.cache.expiry.ExpiryPolicy expiryPlc)` Saves all given keys and entities combinations with expiry policy It's suggested to use this method instead of default `CrudRepository.save(Object)` that generates IDs (keys) that are not unique cluster wide.
    `<S extends V> S` | `save(S entity)` Not implemented.
    `<S extends V> Iterable<S>` | `saveAll(Iterable<S> entities)` Not implemented.

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### IgniteRepositoryImpl

          public IgniteRepositoryImpl(Ignite ignite,
                                      IgniteCache<K,V> cache)

      Repository constructor.
      Parameters:
        `ignite` - the ignite
        `cache` - Initialized cache instance.

  - ### Method Detail

    - #### cache

          public IgniteCache<K,V> cache()

      Returns the Ignite Cache bound to the repository
      Specified by:
        `cache` in interface `IgniteRepository<V,K extends Serializable>`
      Returns:
        the Ignite Cache bound to the repository

    - #### ignite

          public Ignite ignite()

      Returns the Ignite instance bound to the repository
      Specified by:
        `ignite` in interface `IgniteRepository<V,K extends Serializable>`
      Returns:
        the Ignite instance bound to the repository

    - #### save

          public <S extends V> S save(K key,
                                      S entity)

      Saves a given entity using provided key. It's suggested to use this method instead of default `CrudRepository.save(Object)` that generates IDs (keys) that are not unique cluster wide.
      Specified by:
        `save` in interface `IgniteRepository<V,K extends Serializable>`
      Type Parameters:
        `S` - Entity type.
      Parameters:
        `key` - Entity's key.
        `entity` - Entity to save.
      Returns:
        Saved entity.

    - #### save

          public <S extends V> Iterable<S> save(Map<K,S> entities)

      Saves all given keys and entities combinations. It's suggested to use this method instead of default `CrudRepository.save(Object)` that generates IDs (keys) that are not unique cluster wide.
      Specified by:
        `save` in interface `IgniteRepository<V,K extends Serializable>`
      Type Parameters:
        `S` - Type of entities.
      Parameters:
        `entities` - Map of key-entities pairs to save.
      Returns:
        Saved entities.

    - #### save

          public <S extends V> S save(K key,
                                      S entity,
                                      @Nullable
                                      @Nullable javax.cache.expiry.ExpiryPolicy expiryPlc)

      Saves a given entity using provided key with expiry policy It's suggested to use this method instead of default `CrudRepository.save(Object)` that generates IDs (keys) that are not unique cluster wide.
      Specified by:
        `save` in interface `IgniteRepository<V,K extends Serializable>`
      Type Parameters:
        `S` - Entity type.
      Parameters:
        `key` - Entity's key.
        `entity` - Entity to save.
        `expiryPlc` - ExpiryPolicy to apply, if not null.
      Returns:
        Saved entity.

    - #### save

          public <S extends V> Iterable<S> save(Map<K,S> entities,
                                                @Nullable
                                                @Nullable javax.cache.expiry.ExpiryPolicy expiryPlc)

      Saves all given keys and entities combinations with expiry policy It's suggested to use this method instead of default `CrudRepository.save(Object)` that generates IDs (keys) that are not unique cluster wide.
      Specified by:
        `save` in interface `IgniteRepository<V,K extends Serializable>`
      Type Parameters:
        `S` - Type of entities.
      Parameters:
        `entities` - Map of key-entities pairs to save.
        `expiryPlc` - ExpiryPolicy to apply, if not null.
      Returns:
        Saved entities.

    - #### save

          public <S extends V> S save(S entity)

      Not implemented.
      Specified by:
        `save` in interface `org.springframework.data.repository.CrudRepository<V,K extends Serializable>`

    - #### saveAll

          public <S extends V> Iterable<S> saveAll(Iterable<S> entities)

      Not implemented.
      Specified by:
        `saveAll` in interface `org.springframework.data.repository.CrudRepository<V,K extends Serializable>`

    - #### findById

          public Optional<V> findById(K id)

      Specified by:
        `findById` in interface `org.springframework.data.repository.CrudRepository<V,K extends Serializable>`

    - #### existsById

          public boolean existsById(K id)

      Specified by:
        `existsById` in interface `org.springframework.data.repository.CrudRepository<V,K extends Serializable>`

    - #### findAll

          public Iterable<V> findAll()

      Specified by:
        `findAll` in interface `org.springframework.data.repository.CrudRepository<V,K extends Serializable>`

    - #### findAllById

          public Iterable<V> findAllById(Iterable<K> ids)

      Specified by:
        `findAllById` in interface `org.springframework.data.repository.CrudRepository<V,K extends Serializable>`

    - #### count

          public long count()

      Specified by:
        `count` in interface `org.springframework.data.repository.CrudRepository<V,K extends Serializable>`

    - #### deleteById

          public void deleteById(K id)

      Specified by:
        `deleteById` in interface `org.springframework.data.repository.CrudRepository<V,K extends Serializable>`

    - #### delete

          public void delete(V entity)

      Specified by:
        `delete` in interface `org.springframework.data.repository.CrudRepository<V,K extends Serializable>`

    - #### deleteAll

          public void deleteAll(Iterable<? extends V> entities)

      Specified by:
        `deleteAll` in interface `org.springframework.data.repository.CrudRepository<V,K extends Serializable>`

    - #### deleteAllById

          public void deleteAllById(Iterable<K> ids)

      Deletes all the entities for the provided ids.
      Specified by:
        `deleteAllById` in interface `IgniteRepository<V,K extends Serializable>`
      Parameters:
        `ids` - List of ids to delete.

    - #### deleteAll

          public void deleteAll()

      Specified by:
        `deleteAll` in interface `org.springframework.data.repository.CrudRepository<V,K extends Serializable>`

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020