Skip to content

Commit 3fa4051

Browse files
committed
Repository creation with items
1 parent 1da222e commit 3fa4051

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
package com.itacademy.CrudEmpleats.persistence;
22

3+
import java.util.ArrayList;
4+
import java.util.Arrays;
5+
6+
import org.springframework.stereotype.Service;
7+
8+
import com.itacademy.CrudEmpleats.domain.Employee;
9+
10+
@Service
311
public class EmployeeRepository {
4-
12+
513
/*
6-
* Els objectes seran persistidos únicament en memòria
14+
* Els objectes seran persistidos únicament en memòria
715
*
816
*/
917

18+
private ArrayList<Employee> repository = new ArrayList<>(
19+
Arrays.asList(
20+
new Employee("Juan", "Director de Projectes"),
21+
new Employee("Gerard", "Programador"),
22+
new Employee("Maria", "Administrativa")
23+
)
24+
);
25+
1026
}

0 commit comments

Comments
 (0)