|
|
@ -140,12 +140,17 @@ public class GenericApplicationDAOImpl extends AbstractDAOImpl implements Applic
|
|
|
|
+ "APP.APPLICATION_CATEGORY_ID = CAT.ID INNER JOIN APPM_LIFECYCLE_STATE AS "
|
|
|
|
+ "APP.APPLICATION_CATEGORY_ID = CAT.ID INNER JOIN APPM_LIFECYCLE_STATE AS "
|
|
|
|
+ "LS ON APP.LIFECYCLE_STATE_ID = LS.ID WHERE APP.TENANT_ID = ? ";
|
|
|
|
+ "LS ON APP.LIFECYCLE_STATE_ID = LS.ID WHERE APP.TENANT_ID = ? ";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String userName = filter.getUserName();
|
|
|
|
|
|
|
|
if (!userName.equals("ALL")) {
|
|
|
|
|
|
|
|
sql += " AND APP.CREATED_BY = ? ";
|
|
|
|
|
|
|
|
}
|
|
|
|
if (filter.getSearchQuery() != null && !filter.getSearchQuery().isEmpty()) {
|
|
|
|
if (filter.getSearchQuery() != null && !filter.getSearchQuery().isEmpty()) {
|
|
|
|
sql += "AND APP.NAME LIKE ? ";
|
|
|
|
sql += "AND APP.NAME LIKE ? ";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sql += "LIMIT ?,?;";
|
|
|
|
sql += "LIMIT ?,?;";
|
|
|
|
|
|
|
|
|
|
|
|
stmt = conn.prepareStatement(sql);
|
|
|
|
stmt = conn.prepareStatement(sql);
|
|
|
|
|
|
|
|
stmt.setString(++index, userName);
|
|
|
|
stmt.setInt(++index, tenantId);
|
|
|
|
stmt.setInt(++index, tenantId);
|
|
|
|
if (filter.getSearchQuery() != null && !filter.getSearchQuery().isEmpty()) {
|
|
|
|
if (filter.getSearchQuery() != null && !filter.getSearchQuery().isEmpty()) {
|
|
|
|
stmt.setString(++index, "%" + filter.getSearchQuery() + "%");
|
|
|
|
stmt.setString(++index, "%" + filter.getSearchQuery() + "%");
|
|
|
@ -244,7 +249,8 @@ public class GenericApplicationDAOImpl extends AbstractDAOImpl implements Applic
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Application getApplication(String uuid, int tenantId) throws ApplicationManagementDAOException {
|
|
|
|
public Application getApplication(String uuid, int tenantId, String userName) throws
|
|
|
|
|
|
|
|
ApplicationManagementDAOException {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
log.debug("Getting application with the UUID(" + uuid + ") from the database");
|
|
|
|
log.debug("Getting application with the UUID(" + uuid + ") from the database");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -263,9 +269,15 @@ public class GenericApplicationDAOImpl extends AbstractDAOImpl implements Applic
|
|
|
|
+ "APP.APPLICATION_CATEGORY_ID = CAT.ID INNER JOIN APPM_LIFECYCLE_STATE AS "
|
|
|
|
+ "APP.APPLICATION_CATEGORY_ID = CAT.ID INNER JOIN APPM_LIFECYCLE_STATE AS "
|
|
|
|
+ "LS ON APP.LIFECYCLE_STATE_ID = LS.ID WHERE UUID = ? AND APP.TENANT_ID = ? ";
|
|
|
|
+ "LS ON APP.LIFECYCLE_STATE_ID = LS.ID WHERE UUID = ? AND APP.TENANT_ID = ? ";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stmt = conn.prepareStatement(sql);
|
|
|
|
stmt = conn.prepareStatement(sql);
|
|
|
|
stmt.setString(1, uuid);
|
|
|
|
stmt.setString(1, uuid);
|
|
|
|
stmt.setInt(2, tenantId);
|
|
|
|
stmt.setInt(2, tenantId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!userName.equals("ALL")) {
|
|
|
|
|
|
|
|
sql += "AND APP.CREATED_BY = ?";
|
|
|
|
|
|
|
|
stmt.setString(3, userName);
|
|
|
|
|
|
|
|
}
|
|
|
|
rs = stmt.executeQuery();
|
|
|
|
rs = stmt.executeQuery();
|
|
|
|
|
|
|
|
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|
if (log.isDebugEnabled()) {
|
|
|
|