Changeset 33d4f5d for src/main/java/it/finki/tinki/bootstrap
- Timestamp:
- 01/12/21 02:42:18 (4 years ago)
- Branches:
- master
- Children:
- a70db1a
- Parents:
- 8f1f460
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/tinki/bootstrap/DataHolder.java
r8f1f460 r33d4f5d 11 11 12 12 import javax.annotation.PostConstruct; 13 import java.text.DateFormat; 13 14 import java.util.ArrayList; 15 import java.util.Date; 14 16 import java.util.List; 15 17 … … 61 63 lista = this.skillRepository.findAll(); 62 64 63 List<Skill> l 2 = new ArrayList<>();64 l 2.add(this.skillRepository.findById(3L).get());65 l 2.add(this.skillRepository.findById(2L).get());66 l 2.add(this.skillRepository.findById(4L).get());67 l 2.add(this.skillRepository.findById(7L).get());68 l 2.add(this.skillRepository.findById(1L).get());69 l 2.add(this.skillRepository.findById(5L).get());70 l 2.add(this.skillRepository.findById(9L).get());71 l 2.add(this.skillRepository.findById(6L).get());65 List<Skill> lista2 = new ArrayList<>(); 66 lista2.add(this.skillRepository.findById(3L).get()); 67 lista2.add(this.skillRepository.findById(2L).get()); 68 lista2.add(this.skillRepository.findById(4L).get()); 69 lista2.add(this.skillRepository.findById(7L).get()); 70 lista2.add(this.skillRepository.findById(1L).get()); 71 lista2.add(this.skillRepository.findById(5L).get()); 72 lista2.add(this.skillRepository.findById(9L).get()); 73 lista2.add(this.skillRepository.findById(6L).get()); 72 74 73 75 74 List<Skill> l 3 = new ArrayList<>();75 l 3.add(this.skillRepository.findById(3L).get());76 l 3.add(this.skillRepository.findById(2L).get());77 l 3.add(this.skillRepository.findById(4L).get());78 l 3.add(this.skillRepository.findById(7L).get());76 List<Skill> lista3 = new ArrayList<>(); 77 lista3.add(this.skillRepository.findById(3L).get()); 78 lista3.add(this.skillRepository.findById(2L).get()); 79 lista3.add(this.skillRepository.findById(4L).get()); 80 lista3.add(this.skillRepository.findById(7L).get()); 79 81 80 List<Long> ids = new ArrayList<>();82 List<Long> allSkills = new ArrayList<>(); 81 83 lista.forEach(item -> { 82 ids.add(item.getId());84 allSkills.add(item.getId()); 83 85 }); 84 86 85 List<Long> s malls= new ArrayList<>();86 l 2.forEach(item -> {87 s malls.add(item.getId());87 List<Long> skills8 = new ArrayList<>(); 88 lista2.forEach(item -> { 89 skills8.add(item.getId()); 88 90 }); 89 91 90 List<Long> s m2= new ArrayList<>();91 l 3.forEach(item -> {92 s m2.add(item.getId());92 List<Long> skills4 = new ArrayList<>(); 93 lista3.forEach(item -> { 94 skills4.add(item.getId()); 93 95 }); 94 96 95 Account c = this.accountService.registerCompany("company@company", "company", "Co.co", "Macedonia", "Skopje", "Pero Nakov"); 97 Account c = this.accountService.registerCompany("company@company", "company", "Co.Co", "Macedonia", "Skopje", "Pero Nakov"); 98 Account ct = this.accountService.registerCompany("company@co", "company", "Co.Co", "Macedonia", "Skopje", "Pero Nakov"); 96 99 Account m = this.accountService.registerTeam("team@team", "team", "TeamRocket", 3); 97 100 98 this.workService.insertJob("asdfq", "asdfqw", m.getId() ,5000, smalls, AccountType.TEAM); 99 this.workService.insertJob("asdfq", "asdfqw", c.getId() ,5000, sm2, AccountType.COMPANY); 100 this.workService.insertJob("Asdf", "Asdfa", c.getId() ,5000, ids, AccountType.COMPANY); 101 this.workService.insertJob("Asdf", "Asdfa", m.getId() ,5000, ids, AccountType.TEAM); 101 this.workService.insertJob("Team Job 1", "Team job 1 requires 3 members!", m.getId() ,1515, allSkills, AccountType.TEAM); 102 this.workService.insertJob("Team Job 2", "Team job 2 requires 2 members!", m.getId() ,5511, skills4, AccountType.TEAM); 103 this.workService.insertJob("Company Job 1", "Company job 1 requires 3 members!", c.getId() ,12345, allSkills, AccountType.COMPANY); 104 this.workService.insertJob("Company Job 2", "Company job 2 requires 3 members!", ct.getId() ,8901, skills8, AccountType.COMPANY); 105 this.workService.insertInternship("Internship 1", "Opportunity to learn new things!", c.getId() ,5000, skills4, 6, AccountType.COMPANY); 106 this.workService.insertInternship("Internship 2", "Opportunity to learn new things!", c.getId() ,5000, allSkills, 3, AccountType.COMPANY); 107 this.workService.insertProject("Project 1", "Project that lasts few days!", m.getId() ,5000, skills8, new Date(), AccountType.TEAM); 108 this.workService.insertProject("Project 2", "Project that ends soon!", m.getId() ,5000, skills4, new Date(), AccountType.TEAM); 102 109 103 this.accountService.registerUser("user@user", "user", "Zoki", "Poki", l 3, lista);110 this.accountService.registerUser("user@user", "user", "Zoki", "Poki", lista3, lista); 104 111 105 112 }
Note:
See TracChangeset
for help on using the changeset viewer.