|
|
@ -36,13 +36,14 @@ import java.util.List;
|
|
|
|
public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public DeviceCountByGroup getDeviceCount(ExtendedFilterSet extendedFilterSet)
|
|
|
|
public DeviceCountByGroup getDeviceCount(ExtendedFilterSet extendedFilterSet, String userName)
|
|
|
|
throws InvalidPotentialVulnerabilityValueException, DataAccessLayerException {
|
|
|
|
throws InvalidPotentialVulnerabilityValueException, DataAccessLayerException {
|
|
|
|
DeviceCountByGroup filteredDeviceCount;
|
|
|
|
DeviceCountByGroup filteredDeviceCount;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
filteredDeviceCount = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
filteredDeviceCount = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getDeviceCount(extendedFilterSet);
|
|
|
|
getDeviceCount(extendedFilterSet, userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -53,13 +54,13 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public DeviceCountByGroup getFeatureNonCompliantDeviceCount(String featureCode, BasicFilterSet basicFilterSet)
|
|
|
|
public DeviceCountByGroup getFeatureNonCompliantDeviceCount(String featureCode, BasicFilterSet basicFilterSet, String userName)
|
|
|
|
throws InvalidFeatureCodeValueException, DataAccessLayerException {
|
|
|
|
throws InvalidFeatureCodeValueException, DataAccessLayerException {
|
|
|
|
DeviceCountByGroup featureNonCompliantDeviceCount;
|
|
|
|
DeviceCountByGroup featureNonCompliantDeviceCount;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
featureNonCompliantDeviceCount = GadgetDataServiceDAOFactory.
|
|
|
|
featureNonCompliantDeviceCount = GadgetDataServiceDAOFactory.
|
|
|
|
getGadgetDataServiceDAO().getFeatureNonCompliantDeviceCount(featureCode, basicFilterSet);
|
|
|
|
getGadgetDataServiceDAO().getFeatureNonCompliantDeviceCount(featureCode, basicFilterSet, userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -70,11 +71,11 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public DeviceCountByGroup getTotalDeviceCount() throws DataAccessLayerException {
|
|
|
|
public DeviceCountByGroup getTotalDeviceCount(String userName) throws DataAccessLayerException {
|
|
|
|
DeviceCountByGroup totalDeviceCount;
|
|
|
|
DeviceCountByGroup totalDeviceCount;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
totalDeviceCount = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().getTotalDeviceCount();
|
|
|
|
totalDeviceCount = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().getTotalDeviceCount(userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -85,12 +86,12 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceCountByGroup> getDeviceCountsByConnectivityStatuses() throws DataAccessLayerException {
|
|
|
|
public List<DeviceCountByGroup> getDeviceCountsByConnectivityStatuses(String userName) throws DataAccessLayerException {
|
|
|
|
List<DeviceCountByGroup> deviceCountsByConnectivityStatuses;
|
|
|
|
List<DeviceCountByGroup> deviceCountsByConnectivityStatuses;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
deviceCountsByConnectivityStatuses = GadgetDataServiceDAOFactory.
|
|
|
|
deviceCountsByConnectivityStatuses = GadgetDataServiceDAOFactory.
|
|
|
|
getGadgetDataServiceDAO().getDeviceCountsByConnectivityStatuses();
|
|
|
|
getGadgetDataServiceDAO().getDeviceCountsByConnectivityStatuses(userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -101,12 +102,12 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceCountByGroup> getDeviceCountsByPotentialVulnerabilities() throws DataAccessLayerException {
|
|
|
|
public List<DeviceCountByGroup> getDeviceCountsByPotentialVulnerabilities(String userName) throws DataAccessLayerException {
|
|
|
|
List<DeviceCountByGroup> deviceCountsByPotentialVulnerabilities;
|
|
|
|
List<DeviceCountByGroup> deviceCountsByPotentialVulnerabilities;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
deviceCountsByPotentialVulnerabilities = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
deviceCountsByPotentialVulnerabilities = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getDeviceCountsByPotentialVulnerabilities();
|
|
|
|
getDeviceCountsByPotentialVulnerabilities(userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -117,14 +118,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PaginationResult getNonCompliantDeviceCountsByFeatures(int startIndex, int resultCount)
|
|
|
|
public PaginationResult getNonCompliantDeviceCountsByFeatures(int startIndex, int resultCount, String userName)
|
|
|
|
throws InvalidStartIndexValueException, InvalidResultCountValueException,
|
|
|
|
throws InvalidStartIndexValueException, InvalidResultCountValueException,
|
|
|
|
DataAccessLayerException {
|
|
|
|
DataAccessLayerException {
|
|
|
|
PaginationResult paginationResult;
|
|
|
|
PaginationResult paginationResult;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getNonCompliantDeviceCountsByFeatures(startIndex, resultCount);
|
|
|
|
getNonCompliantDeviceCountsByFeatures(startIndex, resultCount, userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -135,13 +136,13 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceCountByGroup> getDeviceCountsByPlatforms(ExtendedFilterSet extendedFilterSet)
|
|
|
|
public List<DeviceCountByGroup> getDeviceCountsByPlatforms(ExtendedFilterSet extendedFilterSet, String userName)
|
|
|
|
throws InvalidPotentialVulnerabilityValueException, DataAccessLayerException {
|
|
|
|
throws InvalidPotentialVulnerabilityValueException, DataAccessLayerException {
|
|
|
|
List<DeviceCountByGroup> deviceCountsByPlatforms;
|
|
|
|
List<DeviceCountByGroup> deviceCountsByPlatforms;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
deviceCountsByPlatforms = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
deviceCountsByPlatforms = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getDeviceCountsByPlatforms(extendedFilterSet);
|
|
|
|
getDeviceCountsByPlatforms(extendedFilterSet, userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -153,13 +154,13 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceCountByGroup> getFeatureNonCompliantDeviceCountsByPlatforms(String featureCode,
|
|
|
|
public List<DeviceCountByGroup> getFeatureNonCompliantDeviceCountsByPlatforms(String featureCode,
|
|
|
|
BasicFilterSet basicFilterSet) throws InvalidFeatureCodeValueException,
|
|
|
|
BasicFilterSet basicFilterSet, String userName) throws InvalidFeatureCodeValueException,
|
|
|
|
DataAccessLayerException {
|
|
|
|
DataAccessLayerException {
|
|
|
|
List<DeviceCountByGroup> featureNonCompliantDeviceCountsByPlatforms;
|
|
|
|
List<DeviceCountByGroup> featureNonCompliantDeviceCountsByPlatforms;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
featureNonCompliantDeviceCountsByPlatforms = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
featureNonCompliantDeviceCountsByPlatforms = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getFeatureNonCompliantDeviceCountsByPlatforms(featureCode, basicFilterSet);
|
|
|
|
getFeatureNonCompliantDeviceCountsByPlatforms(featureCode, basicFilterSet, userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -170,14 +171,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceCountByGroup> getDeviceCountsByOwnershipTypes(ExtendedFilterSet extendedFilterSet)
|
|
|
|
public List<DeviceCountByGroup> getDeviceCountsByOwnershipTypes(ExtendedFilterSet extendedFilterSet, String userName)
|
|
|
|
throws InvalidPotentialVulnerabilityValueException,
|
|
|
|
throws InvalidPotentialVulnerabilityValueException,
|
|
|
|
DataAccessLayerException {
|
|
|
|
DataAccessLayerException {
|
|
|
|
List<DeviceCountByGroup> deviceCountsByOwnershipTypes;
|
|
|
|
List<DeviceCountByGroup> deviceCountsByOwnershipTypes;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
deviceCountsByOwnershipTypes = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
deviceCountsByOwnershipTypes = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getDeviceCountsByOwnershipTypes(extendedFilterSet);
|
|
|
|
getDeviceCountsByOwnershipTypes(extendedFilterSet, userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -189,13 +190,13 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceCountByGroup>
|
|
|
|
public List<DeviceCountByGroup>
|
|
|
|
getFeatureNonCompliantDeviceCountsByOwnershipTypes(String featureCode, BasicFilterSet basicFilterSet)
|
|
|
|
getFeatureNonCompliantDeviceCountsByOwnershipTypes(String featureCode, BasicFilterSet basicFilterSet, String userName)
|
|
|
|
throws InvalidFeatureCodeValueException, DataAccessLayerException {
|
|
|
|
throws InvalidFeatureCodeValueException, DataAccessLayerException {
|
|
|
|
List<DeviceCountByGroup> featureNonCompliantDeviceCountsByOwnershipTypes;
|
|
|
|
List<DeviceCountByGroup> featureNonCompliantDeviceCountsByOwnershipTypes;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
featureNonCompliantDeviceCountsByOwnershipTypes = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
featureNonCompliantDeviceCountsByOwnershipTypes = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getFeatureNonCompliantDeviceCountsByOwnershipTypes(featureCode, basicFilterSet);
|
|
|
|
getFeatureNonCompliantDeviceCountsByOwnershipTypes(featureCode, basicFilterSet, userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -206,14 +207,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PaginationResult getDevicesWithDetails(ExtendedFilterSet extendedFilterSet, int startIndex, int resultCount)
|
|
|
|
public PaginationResult getDevicesWithDetails(ExtendedFilterSet extendedFilterSet, int startIndex, int resultCount, String userName)
|
|
|
|
throws InvalidPotentialVulnerabilityValueException, DataAccessLayerException,
|
|
|
|
throws InvalidPotentialVulnerabilityValueException, DataAccessLayerException,
|
|
|
|
InvalidStartIndexValueException, InvalidResultCountValueException {
|
|
|
|
InvalidStartIndexValueException, InvalidResultCountValueException {
|
|
|
|
PaginationResult paginationResult;
|
|
|
|
PaginationResult paginationResult;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getDevicesWithDetails(extendedFilterSet, startIndex, resultCount);
|
|
|
|
getDevicesWithDetails(extendedFilterSet, startIndex, resultCount, userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -225,14 +226,14 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public PaginationResult getFeatureNonCompliantDevicesWithDetails(String featureCode, BasicFilterSet basicFilterSet,
|
|
|
|
public PaginationResult getFeatureNonCompliantDevicesWithDetails(String featureCode, BasicFilterSet basicFilterSet,
|
|
|
|
int startIndex, int resultCount) throws InvalidFeatureCodeValueException,
|
|
|
|
int startIndex, int resultCount, String userName) throws InvalidFeatureCodeValueException,
|
|
|
|
DataAccessLayerException, InvalidStartIndexValueException,
|
|
|
|
DataAccessLayerException, InvalidStartIndexValueException,
|
|
|
|
InvalidResultCountValueException {
|
|
|
|
InvalidResultCountValueException {
|
|
|
|
PaginationResult paginationResult;
|
|
|
|
PaginationResult paginationResult;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
paginationResult = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getFeatureNonCompliantDevicesWithDetails(featureCode, basicFilterSet, startIndex, resultCount);
|
|
|
|
getFeatureNonCompliantDevicesWithDetails(featureCode, basicFilterSet, startIndex, resultCount, userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -243,13 +244,13 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceWithDetails> getDevicesWithDetails(ExtendedFilterSet extendedFilterSet)
|
|
|
|
public List<DeviceWithDetails> getDevicesWithDetails(ExtendedFilterSet extendedFilterSet, String userName)
|
|
|
|
throws InvalidPotentialVulnerabilityValueException, DataAccessLayerException {
|
|
|
|
throws InvalidPotentialVulnerabilityValueException, DataAccessLayerException {
|
|
|
|
List<DeviceWithDetails> devicesWithDetails;
|
|
|
|
List<DeviceWithDetails> devicesWithDetails;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
devicesWithDetails = GadgetDataServiceDAOFactory.
|
|
|
|
devicesWithDetails = GadgetDataServiceDAOFactory.
|
|
|
|
getGadgetDataServiceDAO().getDevicesWithDetails(extendedFilterSet);
|
|
|
|
getGadgetDataServiceDAO().getDevicesWithDetails(extendedFilterSet, userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
@ -261,13 +262,13 @@ public class GadgetDataServiceImpl implements GadgetDataService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<DeviceWithDetails> getFeatureNonCompliantDevicesWithDetails(String featureCode,
|
|
|
|
public List<DeviceWithDetails> getFeatureNonCompliantDevicesWithDetails(String featureCode,
|
|
|
|
BasicFilterSet basicFilterSet) throws InvalidFeatureCodeValueException,
|
|
|
|
BasicFilterSet basicFilterSet, String userName) throws InvalidFeatureCodeValueException,
|
|
|
|
DataAccessLayerException {
|
|
|
|
DataAccessLayerException {
|
|
|
|
List<DeviceWithDetails> featureNonCompliantDevicesWithDetails;
|
|
|
|
List<DeviceWithDetails> featureNonCompliantDevicesWithDetails;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
GadgetDataServiceDAOFactory.openConnection();
|
|
|
|
featureNonCompliantDevicesWithDetails = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
featureNonCompliantDevicesWithDetails = GadgetDataServiceDAOFactory.getGadgetDataServiceDAO().
|
|
|
|
getFeatureNonCompliantDevicesWithDetails(featureCode, basicFilterSet);
|
|
|
|
getFeatureNonCompliantDevicesWithDetails(featureCode, basicFilterSet, userName);
|
|
|
|
} catch (SQLException e) {
|
|
|
|
} catch (SQLException e) {
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
throw new DataAccessLayerException("Error in either opening a database connection or " +
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|
"accessing the database to fetch corresponding results.", e);
|
|
|
|