JoiningQRCodeRepository

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

The JoiningQRCodeRepository interface is useful to manage the queries for the joining qrcodes

Author

N7ghtm4r3 - Tecknobit

See also

JpaRepository

Functions

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 " + JOINING_QRCODES_TABLE + " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true)
abstract fun deleteJoiningQRCode(@Param(value = "id") joiningQRCodeId: String)
Method to execute the query to delete an existing JoiningQRCode after that all the member joined in the project or when the qrcode is expired
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
@Query(value = ""SELECT * FROM " + JOINING_QRCODES_TABLE + " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true)
abstract fun getJoiningQRCode(@Param(value = "id") joiningQRCodeId: String): JoiningQRCode
Method to execute the query to select a JoiningQRCode by its identifier
Link copied to clipboard
@Query(value = ""SELECT * FROM " + JOINING_QRCODES_TABLE + " WHERE " + JOIN_CODE_KEY + "=:" + JOIN_CODE_KEY", nativeQuery = true)
abstract fun getJoiningQRCodeByJoinCode(@Param(value = "join_code") joinCode: String): JoiningQRCode
Method to execute the query to select a JoiningQRCode by its textual join code
Link copied to clipboard
abstract fun getOne(id: ID): T
Link copied to clipboard
abstract fun getReferenceById(id: ID): T
Link copied to clipboard
@Modifying(clearAutomatically = true)
@Query(value = "INSERT INTO " + JOINING_QRCODES_TABLE + " (" + IDENTIFIER_KEY + "," + CREATION_DATE_KEY + "," + JOIN_CODE_KEY + "," + PROJECT_IDENTIFIER_KEY + ")" + " VALUES (" + ":" + IDENTIFIER_KEY + "," + ":" + CREATION_DATE_KEY + "," + ":" + JOIN_CODE_KEY + "," + ":" + PROJECT_IDENTIFIER_KEY + ")", nativeQuery = true)
abstract fun insertJoiningQRCode(@Param(value = "id") joiningQRCodeId: String, @Param(value = "creation_date") creationDate: Long, @Param(value = "join_code") joinCode: String, @Param(value = "project_id") projectId: String)
Method to execute the query to add a new JoiningQRCode
Link copied to clipboard
@Modifying(clearAutomatically = true)
@Query(value = ""DELETE FROM " + JOINING_QRCODES_MEMBERS_KEY + " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY + " AND " + EMAIL_KEY + "=:" + EMAIL_KEY", nativeQuery = true)
abstract fun removeMemberFromMailingList(@Param(value = "id") joiningQRCodeId: String, @Param(value = "email") email: String)
Method to execute the query to delete from an existing JoiningQRCode an email of a member invited with that joining qrcode
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 " + JOINING_QRCODES_TABLE + " SET " + PROJECT_MEMBERS_TABLE + "=:" + PROJECT_MEMBERS_TABLE + " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true)
abstract fun updateJoiningQRCode(@Param(value = "id") joiningQRCodeId: String, @Param(value = "project_members") projectMembers: String)
Method to execute the query to update an existing JoiningQRCode after a user join in a project and the allowed mailing list must remove the joined member