org.wso2.carbon.device.mgt.mobile.dao.impl
Class MobileDeviceOperationMappingDAOImpl

java.lang.Object
  extended by org.wso2.carbon.device.mgt.mobile.dao.impl.MobileDeviceOperationMappingDAOImpl
All Implemented Interfaces:
MobileDeviceOperationMappingDAO

public class MobileDeviceOperationMappingDAOImpl
extends Object
implements MobileDeviceOperationMappingDAO

Implementation of MobileDeviceOperationMappingDAO.


Constructor Summary
MobileDeviceOperationMappingDAOImpl(DataSource dataSource)
           
 
Method Summary
 boolean addMobileDeviceOperationMapping(MobileDeviceOperationMapping deviceOperation)
          Add a new mobile device operation mapping to the table.
 boolean deleteMobileDeviceOperationMapping(String deviceId, int operationId)
          Delete a given mobile device operation mapping from table.
 List<MobileDeviceOperationMapping> getAllMobileDeviceOperationNappingsOfDevice(String deviceId)
          Retrieves all the of mobile device operation mappings relavent to the given mobile device.
 List<MobileDeviceOperationMapping> getAllPendingOperationMappingsOfMobileDevice(String deviceId)
          Retrieves all the pending device operation mappings of a mobiel device.
 MobileDeviceOperationMapping getMobileDeviceOperationMapping(String deviceId, int operationId)
          Retrieves a given mobile device operation from the plugin database.
 boolean updateMobileDeviceOperationMapping(MobileDeviceOperationMapping deviceOperation)
          Updates a mobile device operation mapping.
 boolean updateMobileDeviceOperationMappingToCompleted(String deviceId, int operationId)
          Updates a mobile device operation mapping to completed state.
 boolean updateMobileDeviceOperationMappingToInProgress(String deviceId, int operationId)
          Updates a mobile device operation mapping to In-Progress state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MobileDeviceOperationMappingDAOImpl

public MobileDeviceOperationMappingDAOImpl(DataSource dataSource)
Method Detail

addMobileDeviceOperationMapping

public boolean addMobileDeviceOperationMapping(MobileDeviceOperationMapping deviceOperation)
                                        throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Add a new mobile device operation mapping to the table.

Specified by:
addMobileDeviceOperationMapping in interface MobileDeviceOperationMappingDAO
Parameters:
deviceOperation - MobileDeviceOperation object that holds data related to the MobileDeviceOperation to be inserted.
Returns:
The status of the operation. If the insert was successful or not.
Throws:
MobileDeviceManagementDAOException

updateMobileDeviceOperationMapping

public boolean updateMobileDeviceOperationMapping(MobileDeviceOperationMapping deviceOperation)
                                           throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Updates a mobile device operation mapping.

Specified by:
updateMobileDeviceOperationMapping in interface MobileDeviceOperationMappingDAO
Parameters:
deviceOperation - MobileDeviceOperation object that holds data has to be updated.
Returns:
The status of the operation. If the update was successful or not.
Throws:
MobileDeviceManagementDAOException

updateMobileDeviceOperationMappingToInProgress

public boolean updateMobileDeviceOperationMappingToInProgress(String deviceId,
                                                              int operationId)
                                                       throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Updates a mobile device operation mapping to In-Progress state.

Specified by:
updateMobileDeviceOperationMappingToInProgress in interface MobileDeviceOperationMappingDAO
Parameters:
deviceId - Device id of the mapping to be deleted.
operationId - Operation id of the mapping to be deleted.
Returns:
The status of the operation. If the update was successful or not.
Throws:
MobileDeviceManagementDAOException

updateMobileDeviceOperationMappingToCompleted

public boolean updateMobileDeviceOperationMappingToCompleted(String deviceId,
                                                             int operationId)
                                                      throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Updates a mobile device operation mapping to completed state.

Specified by:
updateMobileDeviceOperationMappingToCompleted in interface MobileDeviceOperationMappingDAO
Parameters:
deviceId - Device id of the mapping to be deleted.
operationId - Operation id of the mapping to be deleted.
Returns:
The status of the operation. If the update was successful or not.
Throws:
MobileDeviceManagementDAOException

deleteMobileDeviceOperationMapping

public boolean deleteMobileDeviceOperationMapping(String deviceId,
                                                  int operationId)
                                           throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Delete a given mobile device operation mapping from table.

Specified by:
deleteMobileDeviceOperationMapping in interface MobileDeviceOperationMappingDAO
Parameters:
deviceId - Device id of the mapping to be deleted.
operationId - Operation id of the mapping to be deleted.
Returns:
The status of the operation. If the deletion was successful or not.
Throws:
MobileDeviceManagementDAOException

getMobileDeviceOperationMapping

public MobileDeviceOperationMapping getMobileDeviceOperationMapping(String deviceId,
                                                                    int operationId)
                                                             throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Retrieves a given mobile device operation from the plugin database.

Specified by:
getMobileDeviceOperationMapping in interface MobileDeviceOperationMappingDAO
Parameters:
deviceId - Device id of the mapping to be retrieved.
operationId - Operation id of the mapping to be retrieved.
Returns:
MobileDeviceOperation object that holds data of the device operation mapping represented by deviceId and operationId.
Throws:
MobileDeviceManagementDAOException

getAllMobileDeviceOperationNappingsOfDevice

public List<MobileDeviceOperationMapping> getAllMobileDeviceOperationNappingsOfDevice(String deviceId)
                                                                               throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Retrieves all the of mobile device operation mappings relavent to the given mobile device.

Specified by:
getAllMobileDeviceOperationNappingsOfDevice in interface MobileDeviceOperationMappingDAO
Returns:
Device operation mapping object list.
Throws:
MobileDeviceManagementDAOException

getAllPendingOperationMappingsOfMobileDevice

public List<MobileDeviceOperationMapping> getAllPendingOperationMappingsOfMobileDevice(String deviceId)
                                                                                throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Retrieves all the pending device operation mappings of a mobiel device.

Specified by:
getAllPendingOperationMappingsOfMobileDevice in interface MobileDeviceOperationMappingDAO
Returns:
Device operation mapping object list.
Throws:
MobileDeviceManagementDAOException


Copyright © 2015 WSO2. All rights reserved.