示例#1
0
 @Override
 public User create() {
   User u = new User();
   u.setUserId(userId);
   userId++;
   return u;
 }
示例#2
0
 private void writeUser(User aUser) {
   String date = df.format(aUser.getBirthday().getTime());
   String s =
       ""
           + aUser.getUserId()
           + ";"
           + aUser.getName()
           + ";"
           + aUser.getEmail()
           + ";"
           + aUser.getGender()
           + ";"
           + date
           + ";"
           + aUser.getPassword()
           + ";"
           + aUser.getImage()
           + "\n";
   try {
     writer.write(s);
   } catch (IOException e) {
     LogUtil.getLogger().error(e);
   }
 }