|
|
@ -20,7 +20,10 @@ package org.wso2.carbon.device.mgt.analytics.dashboard.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.analytics.dashboard.GadgetDataService;
|
|
|
|
import org.wso2.carbon.device.mgt.analytics.dashboard.GadgetDataService;
|
|
|
|
import org.wso2.carbon.device.mgt.analytics.dashboard.dao.GadgetDataServiceDAOFactory;
|
|
|
|
import org.wso2.carbon.device.mgt.analytics.dashboard.dao.GadgetDataServiceDAOFactory;
|
|
|
|
import org.wso2.carbon.device.mgt.analytics.dashboard.dao.bean.*;
|
|
|
|
import org.wso2.carbon.device.mgt.analytics.dashboard.dao.bean.DetailedDeviceEntry;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.analytics.dashboard.dao.bean.DeviceCountByGroupEntry;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.analytics.dashboard.dao.bean.FilterSet;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.analytics.dashboard.dao.exception.DataAccessLayerException;
|
|
|
|
import org.wso2.carbon.device.mgt.analytics.dashboard.dao.exception.InvalidParameterValueException;
|
|
|
|
import org.wso2.carbon.device.mgt.analytics.dashboard.dao.exception.InvalidParameterValueException;
|
|
|
|
import org.wso2.carbon.device.mgt.common.PaginationResult;
|
|
|
|
import org.wso2.carbon.device.mgt.common.PaginationResult;
|
|
|
|
|
|
|
|
|
|
|
@ -33,11 +36,14 @@ import java.util.List;
|
|
|
|
public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public DeviceCountByGroupEntry getDeviceCount(FilterSet filterSet) throws InvalidParameterValueException, SQLException {
|
|
|
|
public DeviceCountByGroupEntry getDeviceCount(FilterSet filterSet)
|
|
|
|
|
|
|
|
throws InvalidParameterValueException, DataAccessLayerException {
|
|
|
|
DeviceCountByGroupEntry filteredDeviceCount;
|
|
|
|
DeviceCountByGroupEntry filteredDeviceCount;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
filteredDeviceCount = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().getDeviceCount(filterSet);
|
|
|
|
filteredDeviceCount = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().getDeviceCount(filterSet);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -45,13 +51,15 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public DeviceCountByGroupEntry getFeatureNonCompliantDeviceCount(String nonCompliantFeatureCode, FilterSet filterSet)
|
|
|
|
public DeviceCountByGroupEntry getFeatureNonCompliantDeviceCount(String nonCompliantFeatureCode,
|
|
|
|
throws InvalidParameterValueException, SQLException {
|
|
|
|
FilterSet filterSet) throws InvalidParameterValueException, DataAccessLayerException {
|
|
|
|
DeviceCountByGroupEntry featureNonCompliantDeviceCount;
|
|
|
|
DeviceCountByGroupEntry featureNonCompliantDeviceCount;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
featureNonCompliantDeviceCount = GadgetDataServiceDAOFactory.
|
|
|
|
featureNonCompliantDeviceCount = GadgetDataServiceDAOFactory.
|
|
|
|
getGadgetDataServiceDAO().getFeatureNonCompliantDeviceCount(nonCompliantFeatureCode, filterSet);
|
|
|
|
getGadgetDataServiceDAO().getFeatureNonCompliantDeviceCount(nonCompliantFeatureCode, filterSet);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -59,11 +67,13 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public DeviceCountByGroupEntry getTotalDeviceCount() throws SQLException {
|
|
|
|
public DeviceCountByGroupEntry getTotalDeviceCount() throws DataAccessLayerException {
|
|
|
|
DeviceCountByGroupEntry totalDeviceCount;
|
|
|
|
DeviceCountByGroupEntry totalDeviceCount;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
totalDeviceCount = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().getTotalDeviceCount();
|
|
|
|
totalDeviceCount = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().getTotalDeviceCount();
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -71,12 +81,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceCountByGroupEntry> getDeviceCountsByConnectivityStatuses() throws SQLException {
|
|
|
|
public List<DeviceCountByGroupEntry> getDeviceCountsByConnectivityStatuses() throws DataAccessLayerException {
|
|
|
|
List<DeviceCountByGroupEntry> deviceCountsByConnectivityStatuses;
|
|
|
|
List<DeviceCountByGroupEntry> deviceCountsByConnectivityStatuses;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
deviceCountsByConnectivityStatuses = GadgetDataServiceDAOFactory.
|
|
|
|
deviceCountsByConnectivityStatuses = GadgetDataServiceDAOFactory.
|
|
|
|
getGadgetDataServiceDAO().getDeviceCountsByConnectivityStatuses();
|
|
|
|
getGadgetDataServiceDAO().getDeviceCountsByConnectivityStatuses();
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -84,12 +96,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceCountByGroupEntry> getDeviceCountsByPotentialVulnerabilities() throws SQLException {
|
|
|
|
public List<DeviceCountByGroupEntry> getDeviceCountsByPotentialVulnerabilities() throws DataAccessLayerException {
|
|
|
|
List<DeviceCountByGroupEntry> deviceCountsByPotentialVulnerabilities;
|
|
|
|
List<DeviceCountByGroupEntry> deviceCountsByPotentialVulnerabilities;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
deviceCountsByPotentialVulnerabilities = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
deviceCountsByPotentialVulnerabilities = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getDeviceCountsByPotentialVulnerabilities();
|
|
|
|
getDeviceCountsByPotentialVulnerabilities();
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -98,12 +112,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PaginationResult getNonCompliantDeviceCountsByFeatures(int startIndex, int resultCount)
|
|
|
|
public PaginationResult getNonCompliantDeviceCountsByFeatures(int startIndex, int resultCount)
|
|
|
|
throws SQLException, InvalidParameterValueException {
|
|
|
|
throws InvalidParameterValueException, DataAccessLayerException {
|
|
|
|
PaginationResult paginationResult;
|
|
|
|
PaginationResult paginationResult;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getNonCompliantDeviceCountsByFeatures(startIndex, resultCount);
|
|
|
|
getNonCompliantDeviceCountsByFeatures(startIndex, resultCount);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -112,12 +128,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceCountByGroupEntry> getDeviceCountsByPlatforms(FilterSet filterSet)
|
|
|
|
public List<DeviceCountByGroupEntry> getDeviceCountsByPlatforms(FilterSet filterSet)
|
|
|
|
throws InvalidParameterValueException, SQLException {
|
|
|
|
throws InvalidParameterValueException, DataAccessLayerException {
|
|
|
|
List<DeviceCountByGroupEntry> deviceCountsByPlatforms;
|
|
|
|
List<DeviceCountByGroupEntry> deviceCountsByPlatforms;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
deviceCountsByPlatforms = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
deviceCountsByPlatforms = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getDeviceCountsByPlatforms(filterSet);
|
|
|
|
getDeviceCountsByPlatforms(filterSet);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -126,12 +144,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceCountByGroupEntry> getFeatureNonCompliantDeviceCountsByPlatforms(String nonCompliantFeatureCode,
|
|
|
|
public List<DeviceCountByGroupEntry> getFeatureNonCompliantDeviceCountsByPlatforms(String nonCompliantFeatureCode,
|
|
|
|
FilterSet filterSet) throws InvalidParameterValueException, SQLException {
|
|
|
|
FilterSet filterSet) throws InvalidParameterValueException, DataAccessLayerException {
|
|
|
|
List<DeviceCountByGroupEntry> featureNonCompliantDeviceCountsByPlatforms;
|
|
|
|
List<DeviceCountByGroupEntry> featureNonCompliantDeviceCountsByPlatforms;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
featureNonCompliantDeviceCountsByPlatforms = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
featureNonCompliantDeviceCountsByPlatforms = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getFeatureNonCompliantDeviceCountsByPlatforms(nonCompliantFeatureCode, filterSet);
|
|
|
|
getFeatureNonCompliantDeviceCountsByPlatforms(nonCompliantFeatureCode, filterSet);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -140,12 +160,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceCountByGroupEntry> getDeviceCountsByOwnershipTypes(FilterSet filterSet)
|
|
|
|
public List<DeviceCountByGroupEntry> getDeviceCountsByOwnershipTypes(FilterSet filterSet)
|
|
|
|
throws InvalidParameterValueException, SQLException {
|
|
|
|
throws InvalidParameterValueException, DataAccessLayerException {
|
|
|
|
List<DeviceCountByGroupEntry> deviceCountsByOwnershipTypes;
|
|
|
|
List<DeviceCountByGroupEntry> deviceCountsByOwnershipTypes;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
deviceCountsByOwnershipTypes = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
deviceCountsByOwnershipTypes = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getDeviceCountsByOwnershipTypes(filterSet);
|
|
|
|
getDeviceCountsByOwnershipTypes(filterSet);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -155,12 +177,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceCountByGroupEntry>
|
|
|
|
public List<DeviceCountByGroupEntry>
|
|
|
|
getFeatureNonCompliantDeviceCountsByOwnershipTypes(String nonCompliantFeatureCode,
|
|
|
|
getFeatureNonCompliantDeviceCountsByOwnershipTypes(String nonCompliantFeatureCode,
|
|
|
|
FilterSet filterSet) throws SQLException, InvalidParameterValueException {
|
|
|
|
FilterSet filterSet) throws InvalidParameterValueException, DataAccessLayerException {
|
|
|
|
List<DeviceCountByGroupEntry> featureNonCompliantDeviceCountsByOwnershipTypes;
|
|
|
|
List<DeviceCountByGroupEntry> featureNonCompliantDeviceCountsByOwnershipTypes;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
featureNonCompliantDeviceCountsByOwnershipTypes = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
featureNonCompliantDeviceCountsByOwnershipTypes = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getFeatureNonCompliantDeviceCountsByOwnershipTypes(nonCompliantFeatureCode, filterSet);
|
|
|
|
getFeatureNonCompliantDeviceCountsByOwnershipTypes(nonCompliantFeatureCode, filterSet);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -169,12 +193,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PaginationResult getDevicesWithDetails(FilterSet filterSet,
|
|
|
|
public PaginationResult getDevicesWithDetails(FilterSet filterSet,
|
|
|
|
int startIndex, int resultCount) throws InvalidParameterValueException, SQLException {
|
|
|
|
int startIndex, int resultCount) throws InvalidParameterValueException, DataAccessLayerException {
|
|
|
|
PaginationResult paginationResult;
|
|
|
|
PaginationResult paginationResult;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getDevicesWithDetails(filterSet, startIndex, resultCount);
|
|
|
|
getDevicesWithDetails(filterSet, startIndex, resultCount);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -184,12 +210,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PaginationResult getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode,
|
|
|
|
public PaginationResult getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode,
|
|
|
|
FilterSet filterSet, int startIndex, int resultCount)
|
|
|
|
FilterSet filterSet, int startIndex, int resultCount)
|
|
|
|
throws InvalidParameterValueException, SQLException {
|
|
|
|
throws InvalidParameterValueException, DataAccessLayerException {
|
|
|
|
PaginationResult paginationResult;
|
|
|
|
PaginationResult paginationResult;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getFeatureNonCompliantDevicesWithDetails(nonCompliantFeatureCode, filterSet, startIndex, resultCount);
|
|
|
|
getFeatureNonCompliantDevicesWithDetails(nonCompliantFeatureCode, filterSet, startIndex, resultCount);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -198,12 +226,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DetailedDeviceEntry> getDevicesWithDetails(FilterSet filterSet)
|
|
|
|
public List<DetailedDeviceEntry> getDevicesWithDetails(FilterSet filterSet)
|
|
|
|
throws InvalidParameterValueException, SQLException {
|
|
|
|
throws InvalidParameterValueException, DataAccessLayerException {
|
|
|
|
List<DetailedDeviceEntry> devicesWithDetails;
|
|
|
|
List<DetailedDeviceEntry> devicesWithDetails;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
devicesWithDetails = GadgetDataServiceDAOFactory.
|
|
|
|
devicesWithDetails = GadgetDataServiceDAOFactory.
|
|
|
|
getGadgetDataServiceDAO().getDevicesWithDetails(filterSet);
|
|
|
|
getGadgetDataServiceDAO().getDevicesWithDetails(filterSet);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -212,12 +242,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DetailedDeviceEntry> getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode,
|
|
|
|
public List<DetailedDeviceEntry> getFeatureNonCompliantDevicesWithDetails(String nonCompliantFeatureCode,
|
|
|
|
FilterSet filterSet) throws InvalidParameterValueException, SQLException {
|
|
|
|
FilterSet filterSet) throws InvalidParameterValueException, DataAccessLayerException {
|
|
|
|
List<DetailedDeviceEntry> featureNonCompliantDevicesWithDetails;
|
|
|
|
List<DetailedDeviceEntry> featureNonCompliantDevicesWithDetails;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
featureNonCompliantDevicesWithDetails = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
featureNonCompliantDevicesWithDetails = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getFeatureNonCompliantDevicesWithDetails(nonCompliantFeatureCode, filterSet);
|
|
|
|
getFeatureNonCompliantDevicesWithDetails(nonCompliantFeatureCode, filterSet);
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
|
|
|
throw new DataAccessLayerException("Error in opening database connection.", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
GadgetDataServiceDAOFactory.closeConnection();
|
|
|
|
}
|
|
|
|
}
|
|
|
|