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

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

public class MobileFeatureDAOImpl
extends Object
implements MobileFeatureDAO

Implementation of MobileFeatureDAO.


Constructor Summary
MobileFeatureDAOImpl(DataSource dataSource)
           
 
Method Summary
 boolean addMobileFeature(MobileFeature mobileFeature)
          Add a new feature to feature table.
 boolean deleteMobileFeatureByCode(String featureCode)
          Delete a feature from feature table when the feature code is given.
 boolean deleteMobileFeatureById(int featureId)
          Delete a feature from feature table when the feature id is given.
 List<MobileFeature> getAllMobileFeatures()
           
 MobileFeature getMobileFeatureByCode(String featureCode)
          Retrieve a given feature from feature table when the feature code is given.
 List<MobileFeature> getMobileFeatureByDeviceType(String deviceType)
          Retrieve all the features from plugin specific database for a Device Type.
 MobileFeature getMobileFeatureById(int featureID)
          Retrieve a given feature from feature table when the feature id is given.
 boolean updateMobileFeature(MobileFeature mobileFeature)
          Update a feature in the feature table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MobileFeatureDAOImpl

public MobileFeatureDAOImpl(DataSource dataSource)
Method Detail

addMobileFeature

public boolean addMobileFeature(MobileFeature mobileFeature)
                         throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Add a new feature to feature table.

Specified by:
addMobileFeature in interface MobileFeatureDAO
Parameters:
mobileFeature - Feature object that holds data related to the feature to be inserted.
Returns:
The status of the operation. If the insert was successful or not.
Throws:
MobileDeviceManagementDAOException

updateMobileFeature

public boolean updateMobileFeature(MobileFeature mobileFeature)
                            throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Update a feature in the feature table.

Specified by:
updateMobileFeature in interface MobileFeatureDAO
Parameters:
mobileFeature - Feature object that holds data has to be updated.
Returns:
The status of the operation. If the update was successful or not.
Throws:
MobileDeviceManagementDAOException

deleteMobileFeatureByCode

public boolean deleteMobileFeatureByCode(String featureCode)
                                  throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Delete a feature from feature table when the feature code is given.

Specified by:
deleteMobileFeatureByCode in interface MobileFeatureDAO
Parameters:
featureCode - Feature code of the feature to be deleted.
Returns:
The status of the operation. If the operationId was successful or not.
Throws:
MobileDeviceManagementDAOException

deleteMobileFeatureById

public boolean deleteMobileFeatureById(int featureId)
                                throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Delete a feature from feature table when the feature id is given.

Specified by:
deleteMobileFeatureById in interface MobileFeatureDAO
Parameters:
featureId - Feature id of the feature to be deleted.
Returns:
The status of the operation. If the operationId was successful or not.
Throws:
MobileDeviceManagementDAOException

getMobileFeatureByCode

public MobileFeature getMobileFeatureByCode(String featureCode)
                                     throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Retrieve a given feature from feature table when the feature code is given.

Specified by:
getMobileFeatureByCode in interface MobileFeatureDAO
Parameters:
featureCode - Feature code of the feature to be retrieved.
Returns:
Feature object that holds data of the feature represented by featureCode.
Throws:
MobileDeviceManagementDAOException

getMobileFeatureById

public MobileFeature getMobileFeatureById(int featureID)
                                   throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Retrieve a given feature from feature table when the feature id is given.

Specified by:
getMobileFeatureById in interface MobileFeatureDAO
Parameters:
featureID - Feature id of the feature to be retrieved.
Returns:
Feature object that holds data of the feature represented by featureId.
Throws:
MobileDeviceManagementDAOException

getAllMobileFeatures

public List<MobileFeature> getAllMobileFeatures()
                                         throws MobileDeviceManagementDAOException
Specified by:
getAllMobileFeatures in interface MobileFeatureDAO
Throws:
MobileDeviceManagementDAOException

getMobileFeatureByDeviceType

public List<MobileFeature> getMobileFeatureByDeviceType(String deviceType)
                                                 throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Retrieve all the features from plugin specific database for a Device Type.

Specified by:
getMobileFeatureByDeviceType in interface MobileFeatureDAO
Parameters:
deviceType - - Device type.
Returns:
Feature object list.
Throws:
MobileDeviceManagementDAOException


Copyright © 2015 WSO2. All rights reserved.