YtiotTAdminStateEntityDaoImpl.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package cn.com.usky.iot.userstatus.dao;
  2. import java.util.Date;
  3. import java.util.List;
  4. import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
  5. import cn.com.usky.iot.entity.YtiotTAdminStateEntity;
  6. import cn.com.usky.iot.order.dao.YtiotTOrderDao;
  7. import cn.com.usky.utils.DaoQuery;
  8. import cn.com.usky.utils.DaoResult;
  9. public class YtiotTAdminStateEntityDaoImpl extends HibernateDaoSupport implements YtiotTAdminStateEntityDao {
  10. private DaoQuery daoQuery;
  11. private YtiotTOrderDao ytiotTOrderDao;
  12. public DaoQuery getDaoQuery() {
  13. return daoQuery;
  14. }
  15. public void setDaoQuery(DaoQuery daoQuery) {
  16. this.daoQuery = daoQuery;
  17. }
  18. public YtiotTOrderDao getYtiotTOrderDao() {
  19. return ytiotTOrderDao;
  20. }
  21. public void setYtiotTOrderDao(YtiotTOrderDao ytiotTOrderDao) {
  22. this.ytiotTOrderDao = ytiotTOrderDao;
  23. }
  24. @Override
  25. public DaoResult update(YtiotTAdminStateEntity ytiotTAdminStateEntity) {
  26. this.getHibernateTemplate().update(ytiotTAdminStateEntity);
  27. return new DaoResult(String.valueOf(ytiotTAdminStateEntity.getUusid()),true);
  28. }
  29. @Override
  30. public int getCount(String sqlwhere) {
  31. // TODO Auto-generated method stub
  32. return daoQuery.getCount("YtiotTAdminStateEntity", sqlwhere);
  33. }
  34. @Override
  35. public List query(String sqlwhere, String order, String dir, String start, String limit) {
  36. // TODO Auto-generated method stub
  37. return daoQuery.query("YtiotTAdminStateEntity", sqlwhere, order, dir, start, limit);
  38. }
  39. }