ReleasesRepository

@Service
@Repository
interface ReleasesRepository : JpaRepository<T, ID>

The ReleasesRepository interface is useful to manage the queries for the releases

Author

N7ghtm4r3 - Tecknobit

See also

JpaRepository

Functions

Link copied to clipboard
@Modifying(clearAutomatically = true)
@Query(value = "INSERT INTO " + RELEASES_KEY + " (" + IDENTIFIER_KEY + "," + CREATION_DATE_KEY + "," + RELEASE_VERSION_KEY + "," + PROJECT_KEY + "," + RELEASE_NOTES_KEY + " )" + " VALUES (" + ":" + IDENTIFIER_KEY + "," + ":" + CREATION_DATE_KEY + "," + ":" + RELEASE_VERSION_KEY + "," + ":" + PROJECT_KEY + "," + ":" + RELEASE_NOTES_KEY + ")", nativeQuery = true)
abstract fun addRelease(@Param(value = "id") releaseId: String, @Param(value = "creation_date") creationDate: Long, @Param(value = "release_version") releaseVersion: String, @Param(value = "project") projectId: String, @Param(value = "release_notes") releaseNotes: String)
Method to execute the query to add a new Release
Link copied to clipboard
@Modifying(clearAutomatically = true)
@Query(value = ""UPDATE " + RELEASES_KEY + " SET " + APPROBATION_DATE_KEY + "=:" + APPROBATION_DATE_KEY + " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true)
abstract fun approveAsset(@Param(value = "id") releaseId: String, @Param(value = "approbation_date") approbationDate: Long)
Method to execute the query to approve an existing Release
Link copied to clipboard
abstract fun <S : T?> count(example: Example<S>): Long
Link copied to clipboard
abstract fun delete(entity: T)
Link copied to clipboard
abstract fun deleteAll(entities: Iterable<out T>)
Link copied to clipboard
abstract fun deleteAllById(ids: Iterable<out ID>)
Link copied to clipboard
abstract fun deleteAllByIdInBatch(ids: Iterable<ID>)
Link copied to clipboard
abstract fun deleteAllInBatch(entities: Iterable<T>)
Link copied to clipboard
abstract fun deleteById(id: ID)
Link copied to clipboard
open fun deleteInBatch(entities: Iterable<T>)
Link copied to clipboard
@Modifying(clearAutomatically = true)
@Query(value = ""DELETE FROM " + RELEASES_KEY + " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true)
abstract fun deleteRelease(@Param(value = "id") releaseId: String)
Method to execute the query to delete an existing Release
Link copied to clipboard
@Modifying(clearAutomatically = true)
@Query(value = ""UPDATE " + RELEASES_KEY + " SET " + RELEASE_NOTES_KEY + "=:" + RELEASE_NOTES_KEY + " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true)
abstract fun editRelease(@Param(value = "id") releaseId: String, @Param(value = "release_notes") releaseNotes: String)
@Modifying(clearAutomatically = true)
@Query(value = ""UPDATE " + RELEASES_KEY + " SET " + RELEASE_VERSION_KEY + "=:" + RELEASE_VERSION_KEY + "," + RELEASE_NOTES_KEY + "=:" + RELEASE_NOTES_KEY + " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true)
abstract fun editRelease(@Param(value = "id") releaseId: String, @Param(value = "release_version") releaseVersion: String, @Param(value = "release_notes") releaseNotes: String)
Method to execute the query to edit an existing Release
Link copied to clipboard
abstract fun <S : T?> exists(example: Example<S>): Boolean
Link copied to clipboard
abstract fun existsById(id: ID): Boolean
Link copied to clipboard
abstract fun <S : T?> findAll(example: Example<S>): List<S>
abstract fun findAll(): Iterable<T>
abstract fun findAll(): List<T>
abstract fun findAll(pageable: Pageable): Page<T>
abstract fun <S : T?> findAll(example: Example<S>): Iterable<S>
abstract fun <S : T?> findAll(example: Example<S>, pageable: Pageable): Page<S>
Link copied to clipboard
abstract fun findAllById(ids: Iterable<ID>): Iterable<T>
abstract fun findAllById(ids: Iterable<ID>): List<T>
Link copied to clipboard
abstract fun <S : T?, R> findBy(example: Example<S>, queryFunction: (FluentQuery.FetchableFluentQuery<S>) -> R): R
Link copied to clipboard
abstract fun findById(id: ID): Optional<T>
Link copied to clipboard
abstract fun <S : T?> findOne(example: Example<S>): Optional<S>
Link copied to clipboard
abstract fun flush()
Link copied to clipboard
abstract fun getById(id: ID): T
Link copied to clipboard
abstract fun getOne(id: ID): T
Link copied to clipboard
abstract fun getReferenceById(id: ID): T
Link copied to clipboard
abstract fun <S : T?> save(entity: S): S
Link copied to clipboard
abstract fun <S : T?> saveAll(entities: Iterable<S>): Iterable<S>
abstract fun <S : T?> saveAll(entities: Iterable<S>): List<S>
Link copied to clipboard
abstract fun <S : T?> saveAllAndFlush(entities: Iterable<S>): List<S>
Link copied to clipboard
abstract fun <S : T?> saveAndFlush(entity: S): S
Link copied to clipboard
@Modifying(clearAutomatically = true)
@Query(value = ""UPDATE " + RELEASES_KEY + " SET " + RELEASE_STATUS_KEY + "='Finished'" + " WHERE " + RELEASE_STATUS_KEY + "='Latest' AND " + PROJECT_KEY + "=:" + PROJECT_KEY", nativeQuery = true)
abstract fun setAsFinished(@Param(value = "project") projectId: String)
Method to execute the query to set as finished the existing latest releases in a project
Link copied to clipboard
@Modifying(clearAutomatically = true)
@Query(value = ""UPDATE " + RELEASES_KEY + " SET " + RELEASE_STATUS_KEY + "=:" + RELEASE_STATUS_KEY + " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true)
abstract fun updateReleaseStatus(@Param(value = "id") releaseId: String, @Param(value = "release_status") status: String)
Method to execute the query to update the status of an existing Release