From b9be51d50d89d49fd8fcb808e4c99848b4169db6 Mon Sep 17 00:00:00 2001 From: dilanua Date: Thu, 28 Apr 2016 12:18:43 +0530 Subject: [PATCH 1/2] Adding temporary development code bits for dashboard analytics feature --- .../dashboard/GadgetDataService.java | 7 ++ .../dashboard/dao/GadgetDataServiceDAO.java | 8 +- .../dao/GadgetDataServiceDAOImpl.java | 76 +++++++++++++++---- .../internal/GadgetDataServiceImpl.java | 11 +++ 4 files changed, 84 insertions(+), 18 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java index eebdbd314f..204c9ec218 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java @@ -69,4 +69,11 @@ public interface GadgetDataService { Map getFeatureNonCompliantDeviceCountsByOwnershipTypes(String nonCompliantFeatureCode, Map filters); + @SuppressWarnings("unused") + PaginationResult getDevicesWithDetails(Map filters, PaginationRequest paginationRequest); + + @SuppressWarnings("unused") + PaginationResult getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, + Map filters, PaginationRequest paginationRequest); + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAO.java index b7c6809067..f920aacd3d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAO.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAO.java @@ -21,7 +21,6 @@ package org.wso2.carbon.device.mgt.analytics.dashboard.dao; import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.PaginationResult; -import java.util.List; import java.util.Map; public interface GadgetDataServiceDAO { @@ -81,10 +80,11 @@ public interface GadgetDataServiceDAO { Map filters) throws GadgetDataServiceDAOException; @SuppressWarnings("unused") - List> getDevicesWithDetails(Map filters) throws GadgetDataServiceDAOException; + PaginationResult getDevicesWithDetails(Map filters, + PaginationRequest paginationRequest) throws GadgetDataServiceDAOException; @SuppressWarnings("unused") - List> getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, - Map filters) throws GadgetDataServiceDAOException; + PaginationResult getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, + Map filters, PaginationRequest paginationRequest) throws GadgetDataServiceDAOException; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAOImpl.java index a76c8d9c50..b18270b059 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAOImpl.java @@ -357,7 +357,8 @@ class GadgetDataServiceDAOImpl implements GadgetDataServiceDAO { return filteredDeviceCountsByOwnershipTypes; } - public Map getFeatureNonCompliantDeviceCountsByOwnershipTypes(String nonCompliantFeatureCode, Map filters) throws GadgetDataServiceDAOException { + public Map getFeatureNonCompliantDeviceCountsByOwnershipTypes(String nonCompliantFeatureCode, + Map filters) throws GadgetDataServiceDAOException { Connection con; PreparedStatement stmt = null; ResultSet rs = null; @@ -404,24 +405,27 @@ class GadgetDataServiceDAOImpl implements GadgetDataServiceDAO { return filteredDeviceCountsByOwnershipTypes; } - public List> getDevicesWithDetails(Map filters) throws GadgetDataServiceDAOException { + public PaginationResult getDevicesWithDetails(Map filters, + PaginationRequest paginationRequest) throws GadgetDataServiceDAOException { Connection con; PreparedStatement stmt = null; ResultSet rs = null; int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); Map filteredDeviceWithDetails = new HashMap<>(); List> filteredDevicesWithDetails = new ArrayList<>(); + int totalRecordsCount = 0; try { con = this.getConnection(); - String sql; - sql = "SELECT DEVICE_ID, PLATFORM, OWNERSHIP, CONNECTIVITY_STATUS FROM DEVICES_VIEW_1 WHERE TENANT_ID = ?"; - // appending filters to support advanced filtering options + String sql, advancedSqlFiltering = ""; + // appending filters if exist, to support advanced filtering options // [1] appending filter columns, if exist if (filters != null && filters.size() > 0) { for (String column : filters.keySet()) { - sql = sql + " AND " + column + " = ?"; + advancedSqlFiltering = advancedSqlFiltering + "AND " + column + " = ? "; } } + sql = "SELECT DEVICE_ID, PLATFORM, OWNERSHIP, CONNECTIVITY_STATUS FROM DEVICES_VIEW_1 " + + "WHERE TENANT_ID = ? " + advancedSqlFiltering + "ORDER BY DEVICE_ID ASC LIMIT ?, ?"; stmt = con.prepareStatement(sql); // [2] appending filter column values, if exist stmt.setInt(1, tenantId); @@ -435,6 +439,11 @@ class GadgetDataServiceDAOImpl implements GadgetDataServiceDAO { } i++; } + stmt.setInt(i, paginationRequest.getStartIndex()); + stmt.setInt(++i, paginationRequest.getRowCount()); + } else { + stmt.setInt(2, paginationRequest.getStartIndex()); + stmt.setInt(3, paginationRequest.getRowCount()); } // executing query rs = stmt.executeQuery(); @@ -446,33 +455,50 @@ class GadgetDataServiceDAOImpl implements GadgetDataServiceDAO { filteredDeviceWithDetails.put("connectivity-details", rs.getString("CONNECTIVITY_STATUS")); filteredDevicesWithDetails.add(filteredDeviceWithDetails); } + // fetching total records count + sql = "SELECT COUNT(DEVICE_ID) AS DEVICE_COUNT FROM DEVICES_VIEW_1 WHERE TENANT_ID = ?"; + + stmt = con.prepareStatement(sql); + stmt.setInt(1, tenantId); + + // executing query + rs = stmt.executeQuery(); + // fetching query results + while (rs.next()) { + totalRecordsCount = rs.getInt("DEVICE_COUNT"); + } } catch (SQLException e) { throw new GadgetDataServiceDAOException("Error occurred while executing a selection query to the database", e); } finally { DeviceManagementDAOUtil.cleanupResources(stmt, rs); } - return filteredDevicesWithDetails; + PaginationResult paginationResult = new PaginationResult(); + paginationResult.setData(filteredDevicesWithDetails); + paginationResult.setRecordsTotal(totalRecordsCount); + return paginationResult; } - public List> getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, Map filters) throws GadgetDataServiceDAOException { + public PaginationResult getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, + Map filters, PaginationRequest paginationRequest) throws GadgetDataServiceDAOException { Connection con; PreparedStatement stmt = null; ResultSet rs = null; int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); Map filteredDeviceWithDetails = new HashMap<>(); List> filteredDevicesWithDetails = new ArrayList<>(); + int totalRecordsCount = 0; try { con = this.getConnection(); - String sql; - sql = "SELECT DEVICE_ID, PLATFORM, OWNERSHIP, CONNECTIVITY_STATUS FROM DEVICES_VIEW_2 " + - "WHERE TENANT_ID = ? AND FEATURE_CODE = ?"; - // appending filters to support advanced filtering options + String sql, advancedSqlFiltering = ""; + // appending filters if exist, to support advanced filtering options // [1] appending filter columns, if exist if (filters != null && filters.size() > 0) { for (String column : filters.keySet()) { - sql = sql + " AND " + column + " = ?"; + advancedSqlFiltering = advancedSqlFiltering + "AND " + column + " = ? "; } } + sql = "SELECT DEVICE_ID, PLATFORM, OWNERSHIP, CONNECTIVITY_STATUS FROM DEVICES_VIEW_2 " + + "WHERE TENANT_ID = ? AND FEATURE_CODE = ? " + advancedSqlFiltering + "ORDER BY DEVICE_ID ASC LIMIT ?, ?"; stmt = con.prepareStatement(sql); // [2] appending filter column values, if exist stmt.setInt(1, tenantId); @@ -487,6 +513,11 @@ class GadgetDataServiceDAOImpl implements GadgetDataServiceDAO { } i++; } + stmt.setInt(i, paginationRequest.getStartIndex()); + stmt.setInt(++i, paginationRequest.getRowCount()); + } else { + stmt.setInt(3, paginationRequest.getStartIndex()); + stmt.setInt(4, paginationRequest.getRowCount()); } // executing query rs = stmt.executeQuery(); @@ -498,12 +529,29 @@ class GadgetDataServiceDAOImpl implements GadgetDataServiceDAO { filteredDeviceWithDetails.put("connectivity-details", rs.getString("CONNECTIVITY_STATUS")); filteredDevicesWithDetails.add(filteredDeviceWithDetails); } + // fetching total records count + sql = "SELECT COUNT(DEVICE_ID) AS DEVICE_COUNT FROM DEVICES_VIEW_2 " + + "WHERE TENANT_ID = ? AND FEATURE_CODE = ?"; + + stmt = con.prepareStatement(sql); + stmt.setInt(1, tenantId); + stmt.setString(2, nonCompliantFeatureCode); + + // executing query + rs = stmt.executeQuery(); + // fetching query results + while (rs.next()) { + totalRecordsCount = rs.getInt("DEVICE_COUNT"); + } } catch (SQLException e) { throw new GadgetDataServiceDAOException("Error occurred while executing a selection query to the database", e); } finally { DeviceManagementDAOUtil.cleanupResources(stmt, rs); } - return filteredDevicesWithDetails; + PaginationResult paginationResult = new PaginationResult(); + paginationResult.setData(filteredDevicesWithDetails); + paginationResult.setRecordsTotal(totalRecordsCount); + return paginationResult; } private Connection getConnection() throws SQLException { diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/internal/GadgetDataServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/internal/GadgetDataServiceImpl.java index 11b88d2004..b4dd073be9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/internal/GadgetDataServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/internal/GadgetDataServiceImpl.java @@ -236,4 +236,15 @@ class GadgetDataServiceImpl implements GadgetDataService { return featureNonCompliantDeviceCountsByOwnershipTypes; } + @Override + public PaginationResult getDevicesWithDetails(Map filters, PaginationRequest paginationRequest) { + return null; + } + + @Override + public PaginationResult getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, + Map filters, PaginationRequest paginationRequest) { + return null; + } + } From 49513ba79b34187a818e3749a2841d3799e34f56 Mon Sep 17 00:00:00 2001 From: dilanua Date: Thu, 28 Apr 2016 14:26:22 +0530 Subject: [PATCH 2/2] Adding temporary development code bits for dashboard analytics feature --- .../dashboard/GadgetDataService.java | 8 ++ .../dashboard/dao/GadgetDataServiceDAO.java | 8 ++ .../dao/GadgetDataServiceDAOImpl.java | 103 ++++++++++++++++++ .../internal/GadgetDataServiceImpl.java | 33 +++++- 4 files changed, 151 insertions(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java index 204c9ec218..d34bd4c2e5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/GadgetDataService.java @@ -21,6 +21,7 @@ package org.wso2.carbon.device.mgt.analytics.dashboard; import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.PaginationResult; +import java.util.List; import java.util.Map; /** @@ -76,4 +77,11 @@ public interface GadgetDataService { PaginationResult getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, Map filters, PaginationRequest paginationRequest); + @SuppressWarnings("unused") + List> getDevicesWithDetails(Map filters); + + @SuppressWarnings("unused") + List> getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, + Map filters); + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAO.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAO.java index f920aacd3d..f54701c716 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAO.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAO.java @@ -21,6 +21,7 @@ package org.wso2.carbon.device.mgt.analytics.dashboard.dao; import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.PaginationResult; +import java.util.List; import java.util.Map; public interface GadgetDataServiceDAO { @@ -87,4 +88,11 @@ public interface GadgetDataServiceDAO { PaginationResult getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, Map filters, PaginationRequest paginationRequest) throws GadgetDataServiceDAOException; + @SuppressWarnings("unused") + List> getDevicesWithDetails(Map filters) throws GadgetDataServiceDAOException; + + @SuppressWarnings("unused") + List> getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, + Map filters) throws GadgetDataServiceDAOException; + } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAOImpl.java index b18270b059..e56e241ec5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/dao/GadgetDataServiceDAOImpl.java @@ -554,6 +554,109 @@ class GadgetDataServiceDAOImpl implements GadgetDataServiceDAO { return paginationResult; } + public List> getDevicesWithDetails(Map filters) throws GadgetDataServiceDAOException { + Connection con; + PreparedStatement stmt = null; + ResultSet rs = null; + int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); + Map filteredDeviceWithDetails = new HashMap<>(); + List> filteredDevicesWithDetails = new ArrayList<>(); + try { + con = this.getConnection(); + String sql; + sql = "SELECT DEVICE_ID, PLATFORM, OWNERSHIP, CONNECTIVITY_STATUS FROM DEVICES_VIEW_1 WHERE TENANT_ID = ?"; + // appending filters to support advanced filtering options + // [1] appending filter columns, if exist + if (filters != null && filters.size() > 0) { + for (String column : filters.keySet()) { + sql = sql + " AND " + column + " = ?"; + } + } + stmt = con.prepareStatement(sql); + // [2] appending filter column values, if exist + stmt.setInt(1, tenantId); + if (filters != null && filters.values().size() > 0) { + int i = 2; + for (Object value : filters.values()) { + if (value instanceof Integer) { + stmt.setInt(i, (Integer) value); + } else if (value instanceof String) { + stmt.setString(i, (String) value); + } + i++; + } + } + // executing query + rs = stmt.executeQuery(); + // fetching query results + while (rs.next()) { + filteredDeviceWithDetails.put("device-id", rs.getInt("DEVICE_ID")); + filteredDeviceWithDetails.put("platform", rs.getString("PLATFORM")); + filteredDeviceWithDetails.put("ownership", rs.getString("OWNERSHIP")); + filteredDeviceWithDetails.put("connectivity-details", rs.getString("CONNECTIVITY_STATUS")); + filteredDevicesWithDetails.add(filteredDeviceWithDetails); + } + } catch (SQLException e) { + throw new GadgetDataServiceDAOException("Error occurred while executing a selection query to the database", e); + } finally { + DeviceManagementDAOUtil.cleanupResources(stmt, rs); + } + return filteredDevicesWithDetails; + } + + public List> getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, + Map filters) throws GadgetDataServiceDAOException { + Connection con; + PreparedStatement stmt = null; + ResultSet rs = null; + int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); + Map filteredDeviceWithDetails = new HashMap<>(); + List> filteredDevicesWithDetails = new ArrayList<>(); + try { + con = this.getConnection(); + String sql; + sql = "SELECT DEVICE_ID, PLATFORM, OWNERSHIP, CONNECTIVITY_STATUS FROM DEVICES_VIEW_2 " + + "WHERE TENANT_ID = ? AND FEATURE_CODE = ?"; + // appending filters to support advanced filtering options + // [1] appending filter columns, if exist + if (filters != null && filters.size() > 0) { + for (String column : filters.keySet()) { + sql = sql + " AND " + column + " = ?"; + } + } + stmt = con.prepareStatement(sql); + // [2] appending filter column values, if exist + stmt.setInt(1, tenantId); + stmt.setString(2, nonCompliantFeatureCode); + if (filters != null && filters.values().size() > 0) { + int i = 3; + for (Object value : filters.values()) { + if (value instanceof Integer) { + stmt.setInt(i, (Integer) value); + } else if (value instanceof String) { + stmt.setString(i, (String) value); + } + i++; + } + } + // executing query + rs = stmt.executeQuery(); + // fetching query results + while (rs.next()) { + filteredDeviceWithDetails.put("device-id", rs.getInt("DEVICE_ID")); + filteredDeviceWithDetails.put("platform", rs.getString("PLATFORM")); + filteredDeviceWithDetails.put("ownership", rs.getString("OWNERSHIP")); + filteredDeviceWithDetails.put("connectivity-details", rs.getString("CONNECTIVITY_STATUS")); + filteredDevicesWithDetails.add(filteredDeviceWithDetails); + } + } catch (SQLException e) { + throw new GadgetDataServiceDAOException("Error occurred while executing a selection query to the database", e); + } finally { + DeviceManagementDAOUtil.cleanupResources(stmt, rs); + } + return filteredDevicesWithDetails; + } + private Connection getConnection() throws SQLException { return GadgetDataServiceDAOFactory.getConnection(); } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/internal/GadgetDataServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/internal/GadgetDataServiceImpl.java index b4dd073be9..c0df361d9f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/internal/GadgetDataServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/src/main/java/org/wso2/carbon/device/mgt/analytics/dashboard/internal/GadgetDataServiceImpl.java @@ -27,6 +27,7 @@ import org.wso2.carbon.device.mgt.common.PaginationRequest; import org.wso2.carbon.device.mgt.common.PaginationResult; import java.sql.SQLException; +import java.util.List; import java.util.Map; /** @@ -238,12 +239,42 @@ class GadgetDataServiceImpl implements GadgetDataService { @Override public PaginationResult getDevicesWithDetails(Map filters, PaginationRequest paginationRequest) { - return null; + PaginationResult paginationResult = null; + try { + GadgetDataServiceDAOFactory.openConnection(); + paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO(). + getDevicesWithDetails(filters, paginationRequest); + } catch (GadgetDataServiceDAOException | SQLException e) { + return null; + } finally { + GadgetDataServiceDAOFactory.closeConnection(); + } + return paginationResult; } @Override public PaginationResult getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, Map filters, PaginationRequest paginationRequest) { + PaginationResult paginationResult = null; + try { + GadgetDataServiceDAOFactory.openConnection(); + paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO(). + getFeatureNonCompliantDevicesWithDetails(nonCompliantFeatureCode, filters, paginationRequest); + } catch (GadgetDataServiceDAOException | SQLException e) { + return null; + } finally { + GadgetDataServiceDAOFactory.closeConnection(); + } + return paginationResult; + } + + @Override + public List> getDevicesWithDetails(Map filters) { + return null; + } + + @Override + public List> getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode, Map filters) { return null; }