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 {