Browse Source

Implements a Value Object to hold user information

feature-credentialneu
fdai5728 3 years ago
parent
commit
40bbfbb196
  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