diff options
author | 2020-05-05 12:20:30 -0400 | |
---|---|---|
committer | 2020-05-16 01:50:52 +0530 | |
commit | 759e9e75fc0b5978f98f901744c87c0c8d5ef4fd (patch) | |
tree | 4b61ca0a05ec79d45f88b81142264e0407d2ddb3 /ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java | |
parent | 03abc05e6217274f557ec4987aa8e8bd34b2f4a4 (diff) |
Raptor backend java API Code(Analytics), UI Code(Overlay) and pages
component in os project
Issue-ID: PORTAL-902
Change-Id: Id297d9493a77e6816ed0f2a82c15b2eaa1e57a72
Signed-off-by: Sudarshan Kumar <sudarshan.kumar@att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java index 3091fa96..e9414163 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/base/IdNameSql.java @@ -62,13 +62,25 @@ import org.onap.portalsdk.analytics.system.ConnectionUtils; import org.onap.portalsdk.analytics.system.Globals; import org.onap.portalsdk.analytics.util.AppConstants; import org.onap.portalsdk.analytics.util.DataSet; +import org.onap.portalsdk.analytics.util.RemDbInfo; import org.onap.portalsdk.analytics.util.Utils; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +@Component public class IdNameSql extends IdNameList { private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(IdNameSql.class); + private static RemDbInfo remDbInfo; + + @SuppressWarnings("static-access") + @Autowired + public void setRemDbInfo(RemDbInfo remDbInfo) { + this.remDbInfo = remDbInfo; + } + protected int dataSize = -1; protected int dataSizeUsedInPopup = -1; @@ -215,7 +227,6 @@ public class IdNameSql extends IdNameList { String dbType = Globals.getDBType(); if (!isNull(dbInfo) && (!dbInfo.equals(AppConstants.DB_LOCAL))) { try { - org.onap.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.onap.portalsdk.analytics.util.RemDbInfo(); dbType = remDbInfo.getDBType(dbInfo); } catch (Exception ex) { throw new RaptorException(ex); @@ -255,9 +266,7 @@ public class IdNameSql extends IdNameList { } if(searchString!=null && searchString.length()>0 && !searchString.equals("%")) { - if(pageNo == -2){ - query.append(" WHERE "); - } + if(pageNo == -2) query.append(" WHERE "); else query.append(" and "); query.append("name like '"+ searchString +"'"); } |