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