示例#1
0
  @Override
  public boolean isExist(String name, String pass) {
    Admin admin = repository.findAdmin(name);
    if (admin == null || admin.getName() == null || admin.getPass() == null) {
      return false;
    }

    if (!admin.getName().equalsIgnoreCase(name)) {
      return false;
    }

    if (admin.getPass().equals(pass)) return true;

    return false;
  }
示例#2
0
 @Override
 public Admin findAdmin(String name) {
   return repository.findAdmin(name);
 }
示例#3
0
 @Override
 public Admin findAdmin(int id) {
   return repository.findAdmin(id);
 }