Browse Source

overloaded person constructor

mpierse 5 years ago
parent
commit
0886b84c45

+ 5
- 0
src/main/java/io/zipcoder/crudapp/Person.java View File

20
     public Person() {
20
     public Person() {
21
     }
21
     }
22
 
22
 
23
+    public Person(String firstName, String lastName) {
24
+        this.firstName = firstName;
25
+        this.lastName = lastName;
26
+    }
27
+
23
     public Long getId() {
28
     public Long getId() {
24
         return id;
29
         return id;
25
     }
30
     }

+ 0
- 2
src/main/java/io/zipcoder/crudapp/PersonRepository.java View File

4
 
4
 
5
 public interface PersonRepository extends CrudRepository<Person, Long> {
5
 public interface PersonRepository extends CrudRepository<Person, Long> {
6
 
6
 
7
-
8
-
9
 }
7
 }