DAO Layer Implementation

revert-70aa11f8
manoj 10 years ago
parent 19d4d1f62d
commit a3028b0683

@ -17,4 +17,13 @@ package org.wso2.carbon.device.mgt.common;
public final class DeviceManagementConstants {
/*DEVICE Manager operations*/
public static final String ADD_DEVICE_ENTRY = "Add device entry";
/*Data Source Configurations */
public static final class DataSourceProperties {
public static final String DB_CHECK_QUERY = "SELECT * FROM DM_DEVICE";
public static final String SECURE_VAULT_NS = "http://org.wso2.securevault/configuration";
}
}

@ -92,6 +92,34 @@
<artifactId>org.wso2.carbon.logging</artifactId>
<version>${carbon.kernel.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.utils</artifactId>
<version>${carbon.platform.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.ndatasource.core</artifactId>
<version>${carbon.platform.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.ndatasource.rdbms</artifactId>
<version>${carbon.platform.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.transaction.manager</artifactId>
<version>${carbon.platform.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.1_spec</artifactId>
<version>${jboss-transaction-api.version}</version>
</dependency>
</dependencies>
</project>

@ -18,8 +18,8 @@
package org.wso2.carbon.device.mgt.core.dao;
import org.wso2.carbon.device.mgt.core.dao.exception.CDMDAOException;
import org.wso2.carbon.device.mgt.core.dao.exception.CDMDatabaseConnectionException;
import org.wso2.carbon.device.mgt.core.dao.exception.DeviceDAOException;
import org.wso2.carbon.device.mgt.core.dao.exception.DeviceDatabaseConnectionException;
import org.wso2.carbon.device.mgt.core.dto.Device;
import org.wso2.carbon.device.mgt.core.dto.Status;
@ -27,14 +27,14 @@ import java.util.List;
public interface DeviceMgtDAO {
void addDevice(Device device) throws CDMDAOException, CDMDatabaseConnectionException;
void addDevice(Device device) throws DeviceDAOException, DeviceDatabaseConnectionException;
void updateDevice(Device device) throws CDMDAOException, CDMDatabaseConnectionException;
void updateDevice(Device device) throws DeviceDAOException, DeviceDatabaseConnectionException;
void updateDeviceStatus(Long deviceId, Status status) throws CDMDAOException, CDMDatabaseConnectionException;
void updateDeviceStatus(Long deviceId, Status status) throws DeviceDAOException, DeviceDatabaseConnectionException;
void deleteDevice(Long deviceId) throws CDMDAOException, CDMDatabaseConnectionException;
void deleteDevice(Long deviceId) throws DeviceDAOException, DeviceDatabaseConnectionException;
List<Device> getDeviceByDeviceId(Long deviceId) throws CDMDAOException, CDMDatabaseConnectionException;
List<Device> getDeviceByDeviceId(Long deviceId) throws DeviceDAOException, DeviceDatabaseConnectionException;
}

@ -18,17 +18,17 @@
package org.wso2.carbon.device.mgt.core.dao;
import org.wso2.carbon.device.mgt.core.dao.exception.CDMDAOException;
import org.wso2.carbon.device.mgt.core.dao.exception.CDMDatabaseConnectionException;
import org.wso2.carbon.device.mgt.core.dao.exception.DeviceDAOException;
import org.wso2.carbon.device.mgt.core.dao.exception.DeviceDatabaseConnectionException;
import org.wso2.carbon.device.mgt.core.dto.DeviceType;
import java.util.List;
public interface DeviceTypeMgtDAO {
void addDeviceType(DeviceType deviceType) throws CDMDAOException, CDMDatabaseConnectionException;
void addDeviceType(DeviceType deviceType) throws DeviceDAOException, DeviceDatabaseConnectionException;
void updateDeviceType(DeviceType deviceType) throws CDMDAOException, CDMDatabaseConnectionException;
void updateDeviceType(DeviceType deviceType) throws DeviceDAOException, DeviceDatabaseConnectionException;
List<DeviceType> getDeviceTypes() throws CDMDAOException, CDMDatabaseConnectionException;
List<DeviceType> getDeviceTypes() throws DeviceDAOException, DeviceDatabaseConnectionException;
}

Loading…
Cancel
Save