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
 int addMobileFeature(MobileFeature mobileFeature)
          Adds a new MobileFeature to Mobile-Feature table.
 boolean deleteMobileFeatureByCode(String mblFeatureCode)
          Deletes a MobileFeature from Mobile-Feature table when the feature code is given.
 boolean deleteMobileFeatureById(int mblFeatureId)
          Deletes a MobileFeature from Mobile-Feature table when the feature id is given.
 List<MobileFeature> getAllMobileFeatures()
          Retrieve all the MobileFeatures from Mobile-Feature table.
 MobileFeature getMobileFeatureByCode(String mblFeatureCode)
          Retrieves a given MobileFeature from Mobile-Feature table when the feature code is given.
 List<MobileFeature> getMobileFeatureByDeviceType(String deviceType)
          Retrieves all MobileFeatures of a MobileDevice type from Mobile-Feature table.
 MobileFeature getMobileFeatureById(int mblFeatureId)
          Retrieves a given MobileFeature from Mobile-Feature table when the feature id is given.
 boolean updateMobileFeature(MobileFeature mobileFeature)
          Updates a MobileFeature in Mobile-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 int addMobileFeature(MobileFeature mobileFeature)
                     throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Adds a new MobileFeature to Mobile-Feature table.

Specified by:
addMobileFeature in interface MobileFeatureDAO
Parameters:
mobileFeature - MobileFeature object that holds data related to the feature to be inserted.
Returns:
The id of inserted MobileFeature.
Throws:
MobileDeviceManagementDAOException

updateMobileFeature

public boolean updateMobileFeature(MobileFeature mobileFeature)
                            throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Updates a MobileFeature in Mobile-Feature table.

Specified by:
updateMobileFeature in interface MobileFeatureDAO
Parameters:
mobileFeature - MobileFeature object that holds data has to be updated.
Returns:
The status of the operation.
Throws:
MobileDeviceManagementDAOException

deleteMobileFeatureByCode

public boolean deleteMobileFeatureByCode(String mblFeatureCode)
                                  throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Deletes a MobileFeature from Mobile-Feature table when the feature code is given.

Specified by:
deleteMobileFeatureByCode in interface MobileFeatureDAO
Parameters:
mblFeatureCode - MobileFeature code of the feature to be deleted.
Returns:
The status of the operation.
Throws:
MobileDeviceManagementDAOException

deleteMobileFeatureById

public boolean deleteMobileFeatureById(int mblFeatureId)
                                throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Deletes a MobileFeature from Mobile-Feature table when the feature id is given.

Specified by:
deleteMobileFeatureById in interface MobileFeatureDAO
Parameters:
mblFeatureId - MobileFeature id of the MobileFeature to be deleted.
Returns:
The status of the operation.
Throws:
MobileDeviceManagementDAOException

getMobileFeatureByCode

public MobileFeature getMobileFeatureByCode(String mblFeatureCode)
                                     throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Retrieves a given MobileFeature from Mobile-Feature table when the feature code is given.

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

getMobileFeatureById

public MobileFeature getMobileFeatureById(int mblFeatureId)
                                   throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Retrieves a given MobileFeature from Mobile-Feature table when the feature id is given.

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

getAllMobileFeatures

public List<MobileFeature> getAllMobileFeatures()
                                         throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Retrieve all the MobileFeatures from Mobile-Feature table.

Specified by:
getAllMobileFeatures in interface MobileFeatureDAO
Returns:
MobileFeature object list.
Throws:
MobileDeviceManagementDAOException

getMobileFeatureByDeviceType

public List<MobileFeature> getMobileFeatureByDeviceType(String deviceType)
                                                 throws MobileDeviceManagementDAOException
Description copied from interface: MobileFeatureDAO
Retrieves all MobileFeatures of a MobileDevice type from Mobile-Feature table.

Specified by:
getMobileFeatureByDeviceType in interface MobileFeatureDAO
Parameters:
deviceType - MobileDevice type of the MobileFeatures to be retrieved
Returns:
MobileFeature object list.
Throws:
MobileDeviceManagementDAOException


Copyright © 2015 WSO2. All rights reserved.