Example #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;
  }
Example #2
0
 @Override
 public Admin findAdmin(String name) {
   return repository.findAdmin(name);
 }
Example #3
0
 @Override
 public Admin findAdmin(int id) {
   return repository.findAdmin(id);
 }