Interface NosqlOperations

All Known Implementing Classes:
NosqlTemplate

public interface NosqlOperations
  • Method Details

    • createTableIfNotExists

      boolean createTableIfNotExists(NosqlEntityInformation<?,?> entityInformation)
      Creates a table for the given entity type if it doesn't exist.
    • dropTableIfExists

      boolean dropTableIfExists(String tableName)
      Drops the given table, information about all saved entities is removed. Returns true if result indicates table state changed to DROPPED or DROPPING. Uses NosqlDbFactory.getTableReqTimeout() and NosqlDbFactory.getTableReqPollInterval() to check the result.
    • getConverter

      MappingNosqlConverter getConverter()
      Returns the assigned mapping converter.
    • getTableName

      String getTableName(Class<?> entityClass)
      Returns the tableName for the given entity class.
    • insert

      <T> T insert(T entity)
      Inserts the entity into the table, if id generated is used the id field must be null or 0.
    • insert

      <T, ID> T insert(NosqlEntityInformation<T,ID> entityInformation, T entity)
      Inserts the entity into the given table, if id generated is used the id field must be null or 0.
    • update

      <T> void update(T entity)
      Updates the entity into the table. Entity must contain a valid id value.
    • update

      <T, ID> void update(NosqlEntityInformation<T,ID> entityInformation, T entity)
      Updates the entity into the given table. Entity must contain a valid id value.
    • findAll

      <T> Iterable<T> findAll(Class<T> entityClass)
      Returns a result of all the entities in the table. Not recommended, unless table is known to contain a small amount of rows. Instead use the method with Pageable parameter.
    • findAll

      <T> Iterable<T> findAll(NosqlEntityInformation<T,?> entityInformation)
      Returns a result of all the entities in the given table. Not recommended, unless table is known to contain a small amount of rows. Instead use the method with Pageable parameter.
    • findAllById

      <T, ID> Iterable<T> findAllById(NosqlEntityInformation<T,ID> entityInformation, Iterable<ID> ids)
      Returns all the entities in the table for the given ids.
    • findById

      <T, ID> T findById(NosqlEntityInformation<T,ID> entityInformation, ID id)
      Returns the entity for the given id in the given table.
    • findById

      <T, ID> T findById(ID id, Class<T> entityClass)
      Returns the entity for the given table.
    • deleteById

      <T, ID> void deleteById(NosqlEntityInformation<T,ID> entityInformation, ID id)
      Deletes the entity with the id from the given table.
    • deleteAll

      void deleteAll(NosqlEntityInformation<?,?> entityInformation)
      Deletes all entries from the given table.
    • deleteAll

      <T, ID> void deleteAll(NosqlEntityInformation<T,ID> entityInformation, Iterable<? extends ID> ids)
      Deletes all the entries with the ids from the given table.
    • count

      long count(NosqlEntityInformation<?,?> entityInformation)
      Returns a count of all the entries in the given table.
    • findAll

      <T> Iterable<T> findAll(NosqlEntityInformation<T,?> entityInformation, org.springframework.data.domain.Sort sort)
      Returns all entities in the given table sorted accordingly.
    • findAll

      <T> org.springframework.data.domain.Page<T> findAll(NosqlEntityInformation<T,?> entityInformation, org.springframework.data.domain.Pageable pageable)
      Returns all entities in the given table sorted accordingly grouped in pages.
    • find

      <S, T> Iterable<T> find(NosqlEntityInformation<S,?> entityInformation, Class<T> targetType, NosqlQuery query)
      Executes a NosqlQuery (this can be a CriteriaQuery for queries derived from repository method names or a StringQuery for native queries).
    • count

      <T> Iterable<MapValue> count(NosqlEntityInformation<T,?> entityInformation, NosqlQuery query)
    • delete

      <T, ID> Iterable<T> delete(NosqlEntityInformation<T,ID> entityInformation, NosqlQuery query)