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, 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) -
save
-
update
-
save
Description copied from interface:CrudRepositorySaves the given valid entity, returning a possibly new entity representing the saved state. Note that certain implementations may not be able to detect whether a save or update should be performed and may always perform an insert. TheCrudRepository.update(Object)method can be used in this case to explicitly request an update.- Specified by:
savein interfaceCrudRepository<JsonEntity, Long>- Parameters:
entity- The entity to save. Must not be null.- Returns:
- The saved entity will never be null.
-