@Repository public class DeviceDaoImpl extends Object implements DeviceDao
| Constructor and Description |
|---|
DeviceDaoImpl()
Creates new instance of the
DeviceDaoImpl. |
| Modifier and Type | Method and Description |
|---|---|
Long |
countDevices()
Counts the number of all registered devices.
|
Long |
countDevices(String deviceType)
Counts the number of devices by device type.
|
Long |
countDevicesWithoutUsername()
Returns a count of all devices that does not have a username
|
boolean |
doesDeviceHaveUsername(String deviceid)
Return tue if there is a username for the specifed deviceId
|
List<Device> |
findAllDevices()
Find all devices that are registered.
|
List<Device> |
findAllDevices(String deviceType)
Finds all devices of a specific type.
|
Device |
findDeviceByDeviceId(String deviceid)
Finds a device with the specified device ID
|
Device |
findDeviceById(Long id)
Finds a
Device by the Object ID for the Device |
Device |
findDeviceByRegId(String regid)
Finds devices with the specified device id.
|
List<Device> |
findDevicesByDeviceId(String deviceid)
Finds devices with the specified device id.
|
List<Device> |
findDevicesById(Long id)
This returns a list of devices with Long id.
|
List<Device> |
findDevicesByKeyword(String keyword)
Finds a List of
Device based on the specified keyword. |
List<Device> |
findDevicesByUsername(String username)
Returns a list of devices registed by a username.
|
List<Device> |
findDevicesWithoutUsername()
Finds all device that does not have a username
|
javax.persistence.EntityManager |
getEntityManager()
Returns the reference to the
EntityManager |
void |
registerDevice(Device device)
Persists a
Device instance |
boolean |
removeDevice(Device device)
Removes a
Device instance from persistence. |
void |
saveDevice(Device device)
Persists a
Device instance |
void |
setEntityManager(javax.persistence.EntityManager entityManager)
Sets the reference to the
EntityManager |
public DeviceDaoImpl()
DeviceDaoImpl.public List<Device> findAllDevices()
DeviceDaofindAllDevices in interface DeviceDaopublic List<Device> findDevicesByUsername(String username)
DeviceDaofindDevicesByUsername in interface DeviceDaopublic boolean doesDeviceHaveUsername(String deviceid)
DeviceDaodoesDeviceHaveUsername in interface DeviceDaopublic List<Device> findDevicesWithoutUsername()
DeviceDaofindDevicesWithoutUsername in interface DeviceDaopublic List<Device> findDevicesById(Long id)
DeviceDaofindDevicesById in interface DeviceDaopublic Device findDeviceById(Long id)
DeviceDaoDevice by the Object ID for the DevicefindDeviceById in interface DeviceDaoid - If of the Device to find.public Device findDeviceByRegId(String regid)
DeviceDaofindDeviceByRegId in interface DeviceDaopublic List<Device> findDevicesByDeviceId(String deviceid)
DeviceDaoDevicefindDevicesByDeviceId in interface DeviceDaopublic Device findDeviceByDeviceId(String deviceid)
DeviceDaofindDeviceByDeviceId in interface DeviceDaopublic List<Device> findDevicesByKeyword(String keyword)
DeviceDaoDevice based on the specified keyword.findDevicesByKeyword in interface DeviceDao@Transactional public boolean removeDevice(Device device)
DeviceDaoDevice instance from persistence.removeDevice in interface DeviceDaodevice - The device to remove.public void saveDevice(Device device)
DeviceDaoDevice instancesaveDevice in interface DeviceDaopublic void registerDevice(Device device)
DeviceDaoDevice instanceregisterDevice in interface DeviceDaodevice - The device to persistpublic Long countDevices()
DeviceDaocountDevices in interface DeviceDaopublic Long countDevicesWithoutUsername()
DeviceDaocountDevicesWithoutUsername in interface DeviceDaopublic Long countDevices(String deviceType)
DeviceDaocountDevices in interface DeviceDaopublic List<Device> findAllDevices(String deviceType)
DeviceDaofindAllDevices in interface DeviceDaopublic javax.persistence.EntityManager getEntityManager()
EntityManagerEntityManagerpublic void setEntityManager(javax.persistence.EntityManager entityManager)
EntityManagerentityManager - The reference to the EntityManagerCopyright © 2011-2013 The Kuali Foundation. All Rights Reserved.