Browse Source

Implements a Value Object to hold user information

feature-serializer
fdai5728 3 years ago
committed by fdai6352
parent
commit
978c79d3ae
  1. 30
      src/main/java/Credential.java

30
src/main/java/Credential.java

@ -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;
}
}
Loading…
Cancel
Save