Fix overrides in DeviceDAO

master
Charitha Goonetilleke 6 months ago
parent 7c0df33738
commit caf548ac75

@ -18,18 +18,14 @@
package io.entgra.device.mgt.core.device.mgt.core.dao.impl.device;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import io.entgra.device.mgt.core.device.mgt.common.Count;
import io.entgra.device.mgt.core.device.mgt.common.Device;
import io.entgra.device.mgt.core.device.mgt.common.DeviceBilling;
import io.entgra.device.mgt.core.device.mgt.common.PaginationRequest;
import io.entgra.device.mgt.core.device.mgt.common.EnrolmentInfo;
import io.entgra.device.mgt.core.device.mgt.common.device.details.DeviceInfo;
import io.entgra.device.mgt.core.device.mgt.core.dao.DeviceManagementDAOException;
import io.entgra.device.mgt.core.device.mgt.core.dao.DeviceManagementDAOFactory;
import io.entgra.device.mgt.core.device.mgt.core.dao.impl.AbstractDeviceDAOImpl;
import io.entgra.device.mgt.core.device.mgt.core.dao.util.DeviceManagementDAOUtil;
import io.entgra.device.mgt.core.device.mgt.core.report.mgt.Constants;
@ -47,7 +43,7 @@ import java.util.Map;
/**
* This class holds the generic implementation of DeviceDAO which can be used to support ANSI db syntax.
*/
public class PostgreSQLDeviceDAOImpl extends AbstractDeviceDAOImpl {
public class PostgreSQLDeviceDAOImpl extends GenericDeviceDAOImpl {
private static final Log log = LogFactory.getLog(PostgreSQLDeviceDAOImpl.class);
@ -1300,7 +1296,4 @@ public class PostgreSQLDeviceDAOImpl extends AbstractDeviceDAOImpl {
}
}
private Connection getConnection() throws SQLException {
return DeviceManagementDAOFactory.getConnection();
}
}

@ -27,11 +27,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import io.entgra.device.mgt.core.device.mgt.common.device.details.DeviceInfo;
import io.entgra.device.mgt.core.device.mgt.core.dao.DeviceManagementDAOException;
import io.entgra.device.mgt.core.device.mgt.core.dao.DeviceManagementDAOFactory;
import io.entgra.device.mgt.core.device.mgt.core.dao.impl.AbstractDeviceDAOImpl;
import io.entgra.device.mgt.core.device.mgt.core.dao.util.DeviceManagementDAOUtil;
import io.entgra.device.mgt.core.device.mgt.common.geo.service.GeoCluster;
import io.entgra.device.mgt.core.device.mgt.common.geo.service.GeoCoordinate;
import io.entgra.device.mgt.core.device.mgt.core.report.mgt.Constants;
import java.sql.Connection;
@ -48,7 +44,7 @@ import java.util.Map;
/**
* This class holds the generic implementation of DeviceDAO which can be used to support ANSI db syntax.
*/
public class SQLServerDeviceDAOImpl extends AbstractDeviceDAOImpl {
public class SQLServerDeviceDAOImpl extends GenericDeviceDAOImpl {
private static final Log log = LogFactory.getLog(SQLServerDeviceDAOImpl.class);
@ -1117,10 +1113,6 @@ public class SQLServerDeviceDAOImpl extends AbstractDeviceDAOImpl {
}
}
private Connection getConnection() throws SQLException {
return DeviceManagementDAOFactory.getConnection();
}
@Override
public List<Device> getDevicesByDuration(PaginationRequest request, int tenantId,
String fromDate, String toDate)

Loading…
Cancel
Save