add: create worker account on first launch
This commit is contained in:
@@ -4,21 +4,30 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* one constructor is used to create new parents the other is used to create existing parents from database
|
||||
* one constructor is used to create new parents the other is used to create
|
||||
* existing parents from database
|
||||
*
|
||||
* @author Malte Schulze Hobeling
|
||||
*/
|
||||
public class Parent extends User{
|
||||
public class Parent extends User {
|
||||
List<Child> children;
|
||||
|
||||
public Parent(long id, String name, String firstname, String password, String email, Address address, List<Child> children) {
|
||||
public Parent(long id, String name, String firstname, String password, String email, Address address,
|
||||
List<Child> children) {
|
||||
super(id, name, firstname, password, email, address);
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public Parent(String name, String firstname, String password, String email, Address address) {
|
||||
super(name, firstname, password, email, address);
|
||||
this.children = new ArrayList<>();
|
||||
}
|
||||
|
||||
public Parent(User user) {
|
||||
super(user.getId(), user.getName(), user.getFirstname(), user.getPassword(), user.getEmail(), user.getAddress());
|
||||
this.children = new ArrayList<>();
|
||||
}
|
||||
|
||||
public List<Child> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user