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 mblDeviceOperationMapping)
          Adds a new mobile device operation mapping to the table.
 boolean deleteMobileDeviceOperationMapping(String mblDeviceId, int operationId)
          Delete a given MobileDeviceOperationMapping from MobileDeviceOperationMapping table.
 List<MobileDeviceOperationMapping> getAllMobileDeviceOperationMappingsOfDevice(String mblDeviceId)
          Retrieves all the of MobileDeviceOperationMappings relevant to a given mobile device.
 List<MobileDeviceOperationMapping> getAllPendingOperationMappingsOfMobileDevice(String mblDeviceId)
          Retrieves all the pending MobileDeviceOperationMappings of a mobile device.
 MobileDeviceOperationMapping getMobileDeviceOperationMapping(String mblDeviceId, int operationId)
          Retrieves a given MobileDeviceOperationMapping object from the MobileDeviceOperationMapping table.
 boolean updateMobileDeviceOperationMapping(MobileDeviceOperationMapping mblDeviceOperation)
          Updates a MobileDeviceOperationMapping in MobileDeviceOperationMapping table.
 boolean updateMobileDeviceOperationMappingToCompleted(String mblDeviceId, int operationId)
          Updates a MobileDeviceOperationMapping to completed state in MobileDeviceOperationMapping table.
 boolean updateMobileDeviceOperationMappingToInProgress(String mblDeviceId, int operationId)
          Updates a MobileDeviceOperationMapping to In-Progress state in MobileDeviceOperationMapping table.
 
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 mblDeviceOperationMapping)
                                        throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Adds a new mobile device operation mapping to the table.

Specified by:
addMobileDeviceOperationMapping in interface MobileDeviceOperationMappingDAO
Parameters:
mblDeviceOperationMapping - MobileDeviceOperationMapping object that holds data related to the MobileDeviceOperationMapping to be inserted.
Returns:
The status of the operation.
Throws:
MobileDeviceManagementDAOException

updateMobileDeviceOperationMapping

public boolean updateMobileDeviceOperationMapping(MobileDeviceOperationMapping mblDeviceOperation)
                                           throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Updates a MobileDeviceOperationMapping in MobileDeviceOperationMapping table.

Specified by:
updateMobileDeviceOperationMapping in interface MobileDeviceOperationMappingDAO
Parameters:
mblDeviceOperation - MobileDeviceOperationMapping object that holds data has to be updated.
Returns:
The status of the operation.
Throws:
MobileDeviceManagementDAOException

updateMobileDeviceOperationMappingToInProgress

public boolean updateMobileDeviceOperationMappingToInProgress(String mblDeviceId,
                                                              int operationId)
                                                       throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Updates a MobileDeviceOperationMapping to In-Progress state in MobileDeviceOperationMapping table.

Specified by:
updateMobileDeviceOperationMappingToInProgress in interface MobileDeviceOperationMappingDAO
Parameters:
mblDeviceId - MobileDevice id of the mappings to be updated.
operationId - Operation id of the mapping to be updated.
Returns:
The status of the operation.
Throws:
MobileDeviceManagementDAOException

updateMobileDeviceOperationMappingToCompleted

public boolean updateMobileDeviceOperationMappingToCompleted(String mblDeviceId,
                                                             int operationId)
                                                      throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Updates a MobileDeviceOperationMapping to completed state in MobileDeviceOperationMapping table.

Specified by:
updateMobileDeviceOperationMappingToCompleted in interface MobileDeviceOperationMappingDAO
Parameters:
mblDeviceId - MobileDevice id of the mappings to be updated.
operationId - Operation id of the mapping to be updated.
Returns:
The status of the operation.
Throws:
MobileDeviceManagementDAOException

deleteMobileDeviceOperationMapping

public boolean deleteMobileDeviceOperationMapping(String mblDeviceId,
                                                  int operationId)
                                           throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Delete a given MobileDeviceOperationMapping from MobileDeviceOperationMapping table.

Specified by:
deleteMobileDeviceOperationMapping in interface MobileDeviceOperationMappingDAO
Parameters:
mblDeviceId - MobileDevice id of the mappings to be deleted.
operationId - Operation id of the mapping to be deleted.
Returns:
The status of the operation.
Throws:
MobileDeviceManagementDAOException

getMobileDeviceOperationMapping

public MobileDeviceOperationMapping getMobileDeviceOperationMapping(String mblDeviceId,
                                                                    int operationId)
                                                             throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Retrieves a given MobileDeviceOperationMapping object from the MobileDeviceOperationMapping table.

Specified by:
getMobileDeviceOperationMapping in interface MobileDeviceOperationMappingDAO
Parameters:
mblDeviceId - 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

getAllMobileDeviceOperationMappingsOfDevice

public List<MobileDeviceOperationMapping> getAllMobileDeviceOperationMappingsOfDevice(String mblDeviceId)
                                                                               throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Retrieves all the of MobileDeviceOperationMappings relevant to a given mobile device.

Specified by:
getAllMobileDeviceOperationMappingsOfDevice in interface MobileDeviceOperationMappingDAO
Parameters:
mblDeviceId - MobileDevice id of the mappings to be retrieved.
Returns:
MobileDeviceOperationMapping object list.
Throws:
MobileDeviceManagementDAOException

getAllPendingOperationMappingsOfMobileDevice

public List<MobileDeviceOperationMapping> getAllPendingOperationMappingsOfMobileDevice(String mblDeviceId)
                                                                                throws MobileDeviceManagementDAOException
Description copied from interface: MobileDeviceOperationMappingDAO
Retrieves all the pending MobileDeviceOperationMappings of a mobile device.

Specified by:
getAllPendingOperationMappingsOfMobileDevice in interface MobileDeviceOperationMappingDAO
Parameters:
mblDeviceId - MobileDevice id of the mappings to be retrieved.
Returns:
MobileDeviceOperationMapping object list.
Throws:
MobileDeviceManagementDAOException


Copyright © 2015 WSO2. All rights reserved.