JoiningQRCodeRepository
The JoiningQRCodeRepository
interface is useful to manage the queries for the joining qrcodes
Author
N7ghtm4r3 - Tecknobit
See also
JpaRepository
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Modifying(clearAutomatically = true)
@Query(value = ""DELETE FROM " + JOINING_QRCODES_TABLE + " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true)
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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Query(value = ""SELECT * FROM " + JOINING_QRCODES_TABLE + " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY", nativeQuery = true)
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)
Method to execute the query to select a JoiningQRCode by its textual join code
Link copied to clipboard
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)
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)
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
Link copied to clipboard
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)
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