From 3ca5ca5a6e96f6d25a396e8f2a9def4c5496b560 Mon Sep 17 00:00:00 2001 From: amanda <74random.amanda@gmail.com> Date: Thu, 16 Apr 2020 15:23:48 +0530 Subject: [PATCH] Change getApplications --- .../application/mgt/common/dto/ApplicationDTO.java | 12 ++++++++++++ .../impl/application/GenericApplicationDAOImpl.java | 1 + .../impl/application/OracleApplicationDAOImpl.java | 1 + .../application/SQLServerApplicationDAOImpl.java | 1 + .../device/application/mgt/core/util/DAOUtil.java | 1 + 5 files changed, 16 insertions(+) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationDTO.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationDTO.java index 57ec6991f9..f924e2774f 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationDTO.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/dto/ApplicationDTO.java @@ -96,6 +96,18 @@ public class ApplicationDTO { value = "package name of the application") private String packageName; + @ApiModelProperty(name = "adamId", + value = "adamID is the asset ID given by iTunes") + private String adamId; + + public String getAdamId() { + return adamId; + } + + public void setAdamId(String adamId) { + this.adamId = adamId; + } + public String getPackageName() { return packageName; } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java index 8ad0152096..04604d6ccf 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/GenericApplicationDAOImpl.java @@ -115,6 +115,7 @@ public class GenericApplicationDAOImpl extends AbstractDAOImpl implements Applic + "AP_APP.CURRENCY AS APP_CURRENCY, " + "AP_APP.RATING AS APP_RATING, " + "AP_APP.DEVICE_TYPE_ID AS APP_DEVICE_TYPE_ID, " + + "AP_APP.ADAM_ID AS APP_ADAM_ID, " + "AP_APP_RELEASE.ID AS RELEASE_ID, " + "AP_APP_RELEASE.DESCRIPTION AS RELEASE_DESCRIPTION, " + "AP_APP_RELEASE.VERSION AS RELEASE_VERSION, " diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/OracleApplicationDAOImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/OracleApplicationDAOImpl.java index d39469eedf..59129b2cb7 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/OracleApplicationDAOImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/OracleApplicationDAOImpl.java @@ -62,6 +62,7 @@ public class OracleApplicationDAOImpl extends GenericApplicationDAOImpl { + "AP_APP.CURRENCY AS APP_CURRENCY, " + "AP_APP.RATING AS APP_RATING, " + "AP_APP.DEVICE_TYPE_ID AS APP_DEVICE_TYPE_ID, " + + "AP_APP.ADAM_ID AS APP_ADAM_ID, " + "AP_APP_RELEASE.ID AS RELEASE_ID, " + "AP_APP_RELEASE.DESCRIPTION AS RELEASE_DESCRIPTION, " + "AP_APP_RELEASE.VERSION AS RELEASE_VERSION, " diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java index 9e07d8ccea..f34b18a566 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/application/SQLServerApplicationDAOImpl.java @@ -61,6 +61,7 @@ public class SQLServerApplicationDAOImpl extends GenericApplicationDAOImpl { + "AP_APP.CURRENCY AS APP_CURRENCY, " + "AP_APP.RATING AS APP_RATING, " + "AP_APP.DEVICE_TYPE_ID AS APP_DEVICE_TYPE_ID, " + + "AP_APP.ADAM_ID AS APP_ADAM_ID, " + "AP_APP_RELEASE.ID AS RELEASE_ID, " + "AP_APP_RELEASE.DESCRIPTION AS RELEASE_DESCRIPTION, " + "AP_APP_RELEASE.VERSION AS RELEASE_VERSION, " diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/DAOUtil.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/DAOUtil.java index c56df53109..1e4a66eb66 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/DAOUtil.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/util/DAOUtil.java @@ -80,6 +80,7 @@ public class DAOUtil { application.setStatus(rs.getString("APP_STATUS")); application.setAppRating(rs.getDouble("APP_RATING")); application.setDeviceTypeId(rs.getInt("APP_DEVICE_TYPE_ID")); + application.setAdamId(rs.getString("APP_ADAM_ID")); application.setPackageName(rs.getString("PACKAGE_NAME")); application.getApplicationReleaseDTOs().add(constructAppReleaseDTO(rs)); } else {