|
|
@ -0,0 +1,30 @@ |
|
|
|
public class Credential { |
|
|
|
|
|
|
|
/** |
|
|
|
* Value Object für das Tupel aus name + pw |
|
|
|
*/ |
|
|
|
|
|
|
|
private String name, password; |
|
|
|
private int id; |
|
|
|
|
|
|
|
|
|
|
|
public Credential(String name, String password, int id) throws Exception { |
|
|
|
if(name == null || password == null) |
|
|
|
throw new Exception("kein leeres Objekt erstellen bliat"); |
|
|
|
|
|
|
|
this.name = name; |
|
|
|
this.password = password; |
|
|
|
} |
|
|
|
|
|
|
|
public String getName() |
|
|
|
{ |
|
|
|
return this.name; |
|
|
|
} |
|
|
|
public String getPassword() { return this.password; } |
|
|
|
public int getId() { return this.id; } |
|
|
|
|
|
|
|
public void upDatePassword(String newPassword) |
|
|
|
{ |
|
|
|
this.password = newPassword; |
|
|
|
} |
|
|
|
} |