get
All
User
Collections
@Query(value = "SELECT c.* FROM " + COLLECTIONS_KEY + " AS c " + _WHERE_ + " c."
+ OWNER_KEY + "=:" + USER_IDENTIFIER_KEY +
" AND ( " +
" MATCH(c." + TITLE_KEY + ", c." + DESCRIPTION_KEY + ") AGAINST (:" + KEYWORDS_KEY + _IN_BOOLEAN_MODE + ") " +
" OR :" + KEYWORDS_KEY + " = '' " +
") UNION " +
"SELECT c.* FROM " + COLLECTIONS_KEY + " AS c INNER JOIN " + COLLECTIONS_TEAMS_TABLE + " ON c." +
IDENTIFIER_KEY + " = " + COLLECTIONS_TEAMS_TABLE + "." + COLLECTION_IDENTIFIER_KEY + " INNER JOIN " +
MEMBERS_KEY + " ON " + MEMBERS_KEY + "." + TEAM_IDENTIFIER_KEY + "=" + COLLECTIONS_TEAMS_TABLE + "." +
TEAM_IDENTIFIER_KEY + _WHERE_ + MEMBERS_KEY + "." + OWNER_KEY + "=:" + USER_IDENTIFIER_KEY +
" AND ( " +
" MATCH(c." + TITLE_KEY + ", c." + DESCRIPTION_KEY + ") AGAINST (:" + KEYWORDS_KEY + _IN_BOOLEAN_MODE + ") " +
" OR :" + KEYWORDS_KEY + " = '' " +
")" +
" ORDER BY " + DATE_KEY + " DESC",
nativeQuery = true
)
Method to execute the query to get all the user's collections, included the collections shared in the teams
Return
the user collections as List of LinksCollection
Parameters
userId
The identifier of the user
keywords
The keywords used to filter the query to retrieve the items
pageable
The parameters to paginate the query