@Test public void testGetUsers() { List<User> users = userDao.getUsers(); assertSame(users.size(), userDao.getUserCount()); }
@Override public List<User> getUsers() { return this.jdbcTemplate.query( "select user_id, imei, imsi, phone_name from t_user", userMapper()); }
UserDaoJDBC implements UserDao { @Override public List<User> getUsers() { return this.jdbcTemplate.query( "select user_id, imei, imsi, phone_name from t_user", userMapper()); } }
UserDaoJDBC implements UserDao { @Override public List<User> getUsers() { return this.jdbcTemplate.query( "select user_id, imei, imsi, phone_name from t_user", userMapper()); } @Autowired  UserDaoJDBC(DataSource datasource); }
UserDaoJDBC implements UserDao { @Override public List<User> getUsers() { return this.jdbcTemplate.query( "select user_id, imei, imsi, phone_name from t_user", userMapper()); } @Autowired  UserDaoJDBC(DataSource datasource); @Override int getUserCount(); @Override User getUserbyID(int id); @Override List<User> getUsers(); @Override User addUser(final User user); @Override int updateUser(User user); }
UserDaoJDBC implements UserDao { @Override public List<User> getUsers() { return this.jdbcTemplate.query( "select user_id, imei, imsi, phone_name from t_user", userMapper()); } @Autowired  UserDaoJDBC(DataSource datasource); @Override int getUserCount(); @Override User getUserbyID(int id); @Override List<User> getUsers(); @Override User addUser(final User user); @Override int updateUser(User user);  }