Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USER:
- package at.fhj.swd.konfmana;
- public class User {
- private int id;
- private String username;
- private String password;
- private Group group;
- public User(int id, String username, String password) {
- if(username==null || password ==null){
- throw new IllegalArgumentException("A emtpy password or username is not allowed!");
- }
- this.id = id;
- this.username = username;
- this.password = password;
- }
- public int getId() {
- return this.id;
- }
- public Group getGroup() {
- return this.group;
- }
- public String getUsername() {
- return this.username;
- }
- public String getPassword() {
- return this.password;
- }
- public void setPassword(String password){
- this.password=password;
- }
- public void setGroup(Group group) {
- this.group = group;
- }
- public void setUsername(String username){
- this.username=username;
- }
- public void setId(int id){
- this.id=id;
- }
- public String toString(){
- return this.id+","+this.username+","+this.password;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement