Interface JsonEntityRepository
- All Superinterfaces:
CrudRepository<JsonEntity, Long>, GenericRepository<JsonEntity, Long>
-
Method Summary
Modifier and TypeMethodDescriptionfindJsonBlobById(Long id) @NonNull JsonEntitysave(@Valid @NotNull @NonNull JsonEntity entity) Saves the given valid entity, returning a possibly new entity representing the saved state.voidvoidupdateJsonBlobById(Long id, SampleData jsonBlob) voidupdateJsonStringById(Long id, SampleData jsonString) Methods inherited from interface CrudRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findById, insert, insertAll, saveAll, update, updateAll
-
Method Details
-
findJsonDefaultById
@QueryResult(type=JSON, jsonDataType=DEFAULT, column="json_default") Optional<SampleData> findJsonDefaultById(Long id) -
findJsonBlobById
@QueryResult(type=JSON, jsonDataType=BLOB, column="json_blob") Optional<SampleData> findJsonBlobById(Long id) -
findJsonStringById
@QueryResult(type=JSON, jsonDataType=STRING, column="json_string") Optional<SampleData> findJsonStringById(Long id) -
updateJsonStringById
-
updateJsonBlobById
@Query("UPDATE json_entity SET json_blob = :jsonBlob WHERE id = :id") void updateJsonBlobById(Long id, SampleData jsonBlob) -
insert
-
update
-
save
Description copied from interface:CrudRepositorySaves the given valid entity, returning a possibly new entity representing the saved state.If the entity has no identity value, an insert is performed. If the entity has a generated or always auto-populated identity value already present, an update is attempted. Entities with non-generated assigned identities are inserted by default. To require a specific operation, use
CrudRepository.insert(Object)orCrudRepository.update(Object). This is the default repository save behavior and can be overridden by Micronaut Data configuration.- Specified by:
savein interfaceCrudRepository<JsonEntity, Long>- Parameters:
entity- The entity to save. Must not be null.- Returns:
- The saved entity will never be null.
-