Change queries to skip IDP resident IDP when listing
@@ -93,17 +93,17 @@ public class IdPManagementConstants {
public static final String GET_IDP_BY_TENANT_MYSQL =
"SELECT ID, NAME, DESCRIPTION, IS_ENABLED, IMAGE_URL, UUID ";
- public static final String GET_IDP_BY_TENANT_MYSQL_TAIL = "TENANT_ID = ? ORDER BY %s LIMIT ?, ?";
+ public static final String GET_IDP_BY_TENANT_MYSQL_TAIL = "TENANT_ID = ? AND NAME != '" + RESIDENT_IDP + "' ORDER BY %s LIMIT ?, ?";
public static final String GET_IDP_BY_TENANT_DB2SQL =
"SELECT ID, NAME, DESCRIPTION, IS_ENABLED, IMAGE_URL, UUID ";
- public static final String GET_IDP_BY_TENANT_DB2SQL_TAIL = "TENANT_ID = ? ORDER BY %s LIMIT ? OFFSET ?";
+ public static final String GET_IDP_BY_TENANT_DB2SQL_TAIL = "TENANT_ID = ? AND NAME != '" + RESIDENT_IDP + "' ORDER BY %s LIMIT ? OFFSET ?";
public static final String GET_IDP_BY_TENANT_MSSQL =
"SELECT ID, NAME, DESCRIPTION, IS_ENABLED, IMAGE_URL, UUID ";
- public static final String GET_IDP_BY_TENANT_MSSQL_TAIL = "TENANT_ID =? ORDER BY %s OFFSET ? ROWS FETCH NEXT ?" +
+ public static final String GET_IDP_BY_TENANT_MSSQL_TAIL = "TENANT_ID =? AND NAME != '" + RESIDENT_IDP + "' ORDER BY %s OFFSET ? ROWS FETCH NEXT ?" +
" ROWS ONLY";
public static final String GET_IDP_BY_TENANT_ORACLE = "SELECT ID, NAME, DESCRIPTION, IS_ENABLED, IMAGE_URL, " +
@@ -115,17 +115,17 @@ public class IdPManagementConstants {
public static final String FROM = " FROM ( ";
- public static final String GET_IDP_BY_TENANT_ORACLE_TAIL = "TENANT_ID = ? AND ROWNUM <= ?) WHERE rnum > ?";
+ public static final String GET_IDP_BY_TENANT_ORACLE_TAIL = "TENANT_ID = ? AND NAME != '" + RESIDENT_IDP + "' AND ROWNUM <= ?) WHERE rnum > ?";
public static final String GET_IDP_BY_TENANT_POSTGRESQL =
"SELECT ID, NAME, DESCRIPTION, IS_ENABLED, IMAGE_URL, UUID ";
- public static final String GET_IDP_BY_TENANT_POSTGRESQL_TAIL = "TENANT_ID = ? ORDER BY %s LIMIT ? OFFSET ?";
+ public static final String GET_IDP_BY_TENANT_POSTGRESQL_TAIL = "TENANT_ID = ? AND NAME != '" + RESIDENT_IDP + "' ORDER BY %s LIMIT ? OFFSET ?";
public static final String GET_IDP_BY_TENANT_INFORMIX =
"SELECT SKIP ? FIRST ? ID, NAME, DESCRIPTION, IS_ENABLED, IMAGE_URL, UUID ";
- public static final String GET_IDP_BY_TENANT_INFORMIX_TAIL = "TENANT_ID = ? ORDER BY %s";
+ public static final String GET_IDP_BY_TENANT_INFORMIX_TAIL = "TENANT_ID = ? AND NAME != '" + RESIDENT_IDP + "' ORDER BY %s";
public static final String GET_IDP_COUNT_SQL = "SELECT COUNT(*) FROM IDP WHERE ";
