public class UserDeviceDao extends PlatformDataAccessObject
限定符和类型 | 方法和说明 |
---|---|
void |
bind(java.lang.String username,
java.lang.String macAddress,
java.lang.String devName)
授权设备
|
boolean |
delete(UserDeviceInfo userDeviceInfo)
删除
|
boolean |
deleteByID(long id)
根据ID删除对象
|
boolean |
deleteByUsername(java.lang.String username)
根据用户名删除对象
|
java.util.List<UserDeviceInfo> |
findAll()
查找所有首页
|
java.util.List<UserDeviceInfo> |
findByUserName(java.lang.String username)
根据用户名查找
|
java.util.List<UserDeviceInfo> |
findDeviceInfoByMacAddress(java.lang.String macAddress) |
UserDeviceInfo |
findDeviceInfoByUM(java.lang.String username,
java.lang.String macAddress) |
static UserDeviceDao |
getInstance() |
void |
save(UserDeviceInfo userDeviceInfo)
保存
|
boolean |
saveOrUpdate(UserDeviceInfo userDeviceInfo)
保存或更新
|
void |
transfer(UserDeviceInfo userDeviceInfo)
转移
|
boolean |
unbind(java.lang.String username,
java.lang.String macAddress,
boolean passed)
删除设备
|
boolean |
update(UserDeviceInfo userDeviceInfo)
更新
|
closeSession, createSession, createSession, rollbackSession
public static UserDeviceDao getInstance()
public void save(UserDeviceInfo userDeviceInfo) throws java.lang.Exception
userDeviceInfo
- 设备信息java.lang.Exception
- 异常public void transfer(UserDeviceInfo userDeviceInfo) throws java.lang.Exception
userDeviceInfo
- 设备信息java.lang.Exception
public boolean saveOrUpdate(UserDeviceInfo userDeviceInfo) throws java.lang.Exception
userDeviceInfo
- 设备信息java.lang.Exception
- 异常public boolean update(UserDeviceInfo userDeviceInfo) throws java.lang.Exception
userDeviceInfo
- 首页java.lang.Exception
- 异常public boolean delete(UserDeviceInfo userDeviceInfo) throws java.lang.Exception
userDeviceInfo
- 设备信息java.lang.Exception
- 异常public boolean deleteByID(long id) throws java.lang.Exception
id
- 首页IDjava.lang.Exception
- 异常public boolean unbind(java.lang.String username, java.lang.String macAddress, boolean passed) throws java.lang.Exception
macAddress
- mac地址,如果为空,解绑该用户所有设备java.lang.Exception
- 异常public void bind(java.lang.String username, java.lang.String macAddress, java.lang.String devName) throws java.lang.Exception
macAddress
- mac地址,没有mac地址和用户名称默认全部授权username
- 用户名java.lang.Exception
- 异常public boolean deleteByUsername(java.lang.String username) throws java.lang.Exception
username
- 用户名java.lang.Exception
- 异常public java.util.List<UserDeviceInfo> findByUserName(java.lang.String username) throws java.lang.Exception
username
- 用户名java.lang.Exception
- 异常public java.util.List<UserDeviceInfo> findAll() throws java.lang.Exception
java.lang.Exception
- 异常public java.util.List<UserDeviceInfo> findDeviceInfoByMacAddress(java.lang.String macAddress)
public UserDeviceInfo findDeviceInfoByUM(java.lang.String username, java.lang.String macAddress)