|
@ -2,7 +2,7 @@ import java.util.ArrayList; |
|
|
|
|
|
|
|
|
public class CredentialRepository implements CredentialRepositoryInterface{ |
|
|
public class CredentialRepository implements CredentialRepositoryInterface{ |
|
|
|
|
|
|
|
|
private int idCounter = 0; |
|
|
|
|
|
|
|
|
private int idCounter = 1; |
|
|
private ArrayList<Credential> credentials; |
|
|
private ArrayList<Credential> credentials; |
|
|
|
|
|
|
|
|
public CredentialRepository() |
|
|
public CredentialRepository() |
|
@ -49,11 +49,19 @@ public class CredentialRepository implements CredentialRepositoryInterface{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Credential getCredentialsViaId() { |
|
|
|
|
|
|
|
|
public Credential getCredentialsViaId(int id) { |
|
|
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
|
return this.credentials.get(id); |
|
|
|
|
|
} |
|
|
|
|
|
catch (IndexOutOfBoundsException outOfBoundsException) |
|
|
|
|
|
{ |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void setCredentials() { |
|
|
public void setCredentials() { |
|
|
|
|
|
|
|
|