Interface NosqlOperations
- All Known Implementing Classes:
NosqlTemplate
public interface NosqlOperations
-
Method Summary
Modifier and TypeMethodDescriptionlong
count
(NosqlEntityInformation<?, ?> entityInformation) Returns a count of all the entries in the given table.<T> Iterable<oracle.nosql.driver.values.MapValue>
count
(NosqlEntityInformation<T, ?> entityInformation, NosqlQuery query) boolean
createTableIfNotExists
(NosqlEntityInformation<?, ?> entityInformation) Creates a table for the given entity type if it doesn't exist.<T,
ID> Iterable<T> delete
(NosqlEntityInformation<T, ID> entityInformation, NosqlQuery query) void
deleteAll
(NosqlEntityInformation<?, ?> entityInformation) Deletes all entries from the given table.<T,
ID> void deleteAll
(NosqlEntityInformation<T, ID> entityInformation, Iterable<? extends ID> ids) Deletes all the entries with the ids from the given table.<T,
ID> void deleteById
(NosqlEntityInformation<T, ID> entityInformation, ID id) Deletes the entity with the id from the given table.boolean
dropTableIfExists
(String tableName) Drops the given table, information about all saved entities is removed.<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).<T> Iterable<T>
findAll
(NosqlEntityInformation<T, ?> entityInformation) Returns a result of all the entities in the given table.<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.<T> Iterable<T>
findAll
(NosqlEntityInformation<T, ?> entityInformation, org.springframework.data.domain.Sort sort) Returns all entities in the given table sorted accordingly.<T> Iterable<T>
Returns a result of all the entities in the table.<T,
ID> Iterable<T> findAllById
(NosqlEntityInformation<T, ID> entityInformation, Iterable<ID> ids) Returns all the entities in the table for the given ids.<T,
ID> T findById
(NosqlEntityInformation<T, ID> entityInformation, ID id) Returns the entity for the given id in the given table.<T,
ID> T Returns the entity for the given table.Returns the assigned mapping converter.getTableName
(Class<?> entityClass) Returns the tableName for the given entity class.<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.<T> T
insert
(T entity) Inserts the entity into the table, if id generated is used the id field must be null or 0.<T,
ID> void update
(NosqlEntityInformation<T, ID> entityInformation, T entity) Updates the entity into the given table.<T> void
update
(T entity) Updates the entity into the table.
-
Method Details
-
createTableIfNotExists
Creates a table for the given entity type if it doesn't exist. -
dropTableIfExists
Drops the given table, information about all saved entities is removed. Returns true if result indicates table state changed to DROPPED or DROPPING. UsesNosqlDbFactory.getTableReqTimeout()
andNosqlDbFactory.getTableReqPollInterval()
to check the result. -
getConverter
MappingNosqlConverter getConverter()Returns the assigned mapping converter. -
getTableName
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
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
Updates the entity into the given table. Entity must contain a valid id value. -
findAll
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
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
Returns all the entities in the table for the given ids. -
findById
Returns the entity for the given id in the given table. -
findById
Returns the entity for the given table. -
deleteById
Deletes the entity with the id from the given table. -
deleteAll
Deletes all entries from the given table. -
deleteAll
Deletes all the entries with the ids from the given table. -
count
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<oracle.nosql.driver.values.MapValue> count(NosqlEntityInformation<T, ?> entityInformation, NosqlQuery query) -
delete
-