get
In
Development
Projects
@Query(value = "SELECT " + PROJECTS_KEY + ".*" + " FROM " + PROJECTS_KEY + " AS " + PROJECTS_KEY +
" INNER JOIN " + UPDATES_KEY + " as " + UPDATE_KEY + " ON " +
PROJECTS_KEY + "." + IDENTIFIER_KEY + "=" + UPDATE_KEY + "." + PROJECT_KEY +
" AND " + UPDATE_KEY + "." + UPDATE_STATUS_KEY + " = 'IN_DEVELOPMENT'" +
" WHERE " + PROJECTS_KEY + "." + AUTHOR_KEY + "=:" + AUTHOR_KEY +
" AND " + PROJECTS_KEY + "." + NAME_KEY + " LIKE %:" + NAME_KEY + "%" +
" AND COALESCE(:" + FILTERS_KEY + ") IS NULL" +
" OR " + PROJECTS_KEY + "." + PROJECT_VERSION_KEY + " IN (:" + FILTERS_KEY + ")" +
" UNION SELECT " + PROJECTS_KEY + ".* FROM " + PROJECTS_KEY + " AS " + PROJECTS_KEY + " LEFT JOIN " +
PROJECTS_GROUPS_TABLE + " ON " + PROJECTS_KEY + "." + IDENTIFIER_KEY + " = " +
PROJECTS_GROUPS_TABLE + "." + PROJECT_IDENTIFIER_KEY + " LEFT JOIN " +
GROUPS_KEY + " ON " + PROJECTS_GROUPS_TABLE + "." + GROUP_IDENTIFIER_KEY + " = " + GROUPS_KEY + "." +
IDENTIFIER_KEY + " LEFT JOIN " + GROUP_MEMBERS_TABLE + " ON " + GROUPS_KEY + "." + IDENTIFIER_KEY +
" = " + GROUP_MEMBERS_TABLE + "." + GROUP_MEMBER_KEY +
" INNER JOIN " + UPDATES_KEY + " as " + UPDATE_KEY + " ON " +
PROJECTS_KEY + "." + IDENTIFIER_KEY + "=" + UPDATE_KEY + "." + PROJECT_KEY +
" AND " + UPDATE_KEY + "." + UPDATE_STATUS_KEY + " = 'IN_DEVELOPMENT'" +
" WHERE " + GROUP_MEMBERS_TABLE + "." +
IDENTIFIER_KEY + " =:" + AUTHOR_KEY +
" AND " + GROUP_MEMBERS_TABLE + "." + INVITATION_STATUS_KEY + " = 'JOINED'" +
" AND " + GROUPS_KEY + "." + AUTHOR_KEY + " !=:" + AUTHOR_KEY +
" AND " + PROJECTS_KEY + "." + NAME_KEY + " LIKE %:" + NAME_KEY + "%" +
" AND COALESCE(:" + FILTERS_KEY + ") IS NULL" +
" OR " + PROJECTS_KEY + "." + PROJECT_VERSION_KEY + " IN (:" + FILTERS_KEY + ")" +
" ORDER BY " + CREATION_DATE_KEY + " DESC ",
nativeQuery = true
)
Method to execute the query to select the list of a Project currently IN_DEVELOPMENT
Return
Parameters
userId
The user identifier
name
The project name to use as filter
versions
The version to use as filters
pageable
The parameters to paginate the query