publicstaticvoid main(String[] args) {
// TODO Auto-generated method stub
addUser();
listUser();
changeUser();
}
privatestaticvoid printUser(String extraText, User user) {
System.out.println(extraText
+ "User[Username: "
+ user.getUsername()
+ ", Password:"
+ user.getPassword()
+ ",First Name: "
+ user.getFirstName()
+ ",Last Name: "
+ user.getLastName()
+ "]");
}
privatestaticvoid addUser() {
// Create user
User user = new User();
user.setId(1);
user.setUsername("guoqiang");
user.setFirstName("guo");
user.setLastName("qiang");
user.setPassword("guoqiang");
user.setDateCreated(System.currentTimeMillis());
// Create DAO