Browse Source

Rewrite ValueObject to DTO since we don't want to destroy the old object each time it gets updated

feature-serializer
fdai5728 2 years ago
committed by fdai6352
parent
commit
b6e33cd520
  1. 9
      src/main/java/Credential.java
  2. 2
      src/main/java/CredentialRepository.java

9
src/main/java/Credential.java

@ -1,9 +1,5 @@
public class Credential {
/**
* Value Object für das Tupel aus name + pw
*/
private String name, password;
private int id;
@ -27,4 +23,9 @@ public class Credential {
{
this.password = newPassword;
}
public void updateUsername(String newUsername)
{
this.name = newUsername;
}
}

2
src/main/java/CredentialRepository.java

@ -62,6 +62,8 @@ public class CredentialRepository implements CredentialRepositoryInterface{
@Override
public void updatePassword(int index) {
}
public void updateUsername(int index){

Loading…
Cancel
Save