Changeset 5f9d25a for src/main/java/it/finki/tinki/bootstrap
- Timestamp:
- 01/11/21 18:57:03 (4 years ago)
- Branches:
- master
- Children:
- 8f1f460
- Parents:
- fc8421e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/tinki/bootstrap/DataHolder.java
rfc8421e r5f9d25a 34 34 @PostConstruct 35 35 public void init(){ 36 if( skillRepository.findAll().size()==0){36 if(this.skillRepository.findAll().size()==0){ 37 37 Skill s1 = new Skill("C++"); 38 38 Skill s2 = new Skill("Java"); … … 46 46 Skill s0 = new Skill("Go"); 47 47 48 skillRepository.save(s1);49 skillRepository.save(s2);50 skillRepository.save(s3);51 skillRepository.save(s4);52 skillRepository.save(s5);53 skillRepository.save(s6);54 skillRepository.save(s7);55 skillRepository.save(s8);56 skillRepository.save(s9);57 skillRepository.save(s0);48 this.skillRepository.save(s1); 49 this.skillRepository.save(s2); 50 this.skillRepository.save(s3); 51 this.skillRepository.save(s4); 52 this.skillRepository.save(s5); 53 this.skillRepository.save(s6); 54 this.skillRepository.save(s7); 55 this.skillRepository.save(s8); 56 this.skillRepository.save(s9); 57 this.skillRepository.save(s0); 58 58 } 59 59 60 60 List<Skill> lista; 61 lista = skillRepository.findAll();61 lista = this.skillRepository.findAll(); 62 62 63 63 List<Skill> l2 = new ArrayList<>(); 64 l2.add( skillRepository.getOne(3L));65 l2.add( skillRepository.getOne(10L));66 l2.add( skillRepository.getOne(1L));67 l2.add( skillRepository.getOne(2L));68 l2.add( skillRepository.getOne(4L));69 l2.add( skillRepository.getOne(5L));70 l2.add( skillRepository.getOne(6L));71 l2.add( skillRepository.getOne(7L));64 l2.add(this.skillRepository.findById(3L).get()); 65 l2.add(this.skillRepository.findById(2L).get()); 66 l2.add(this.skillRepository.findById(4L).get()); 67 l2.add(this.skillRepository.findById(7L).get()); 68 l2.add(this.skillRepository.findById(1L).get()); 69 l2.add(this.skillRepository.findById(5L).get()); 70 l2.add(this.skillRepository.findById(9L).get()); 71 l2.add(this.skillRepository.findById(6L).get()); 72 72 73 73 74 74 List<Skill> l3 = new ArrayList<>(); 75 l3.add(skillRepository.getOne(3L)); 76 l3.add(skillRepository.getOne(10L)); 77 l3.add(skillRepository.getOne(5L)); 78 l3.add(skillRepository.getOne(6L)); 79 l3.add(skillRepository.getOne(7L)); 75 l3.add(this.skillRepository.findById(3L).get()); 76 l3.add(this.skillRepository.findById(2L).get()); 77 l3.add(this.skillRepository.findById(4L).get()); 78 l3.add(this.skillRepository.findById(7L).get()); 80 79 81 80 List<Long> ids = new ArrayList<>(); … … 94 93 }); 95 94 96 Account c = this.accountService.registerCompany(" asdf@asdf", "pass", "Co.co", "Macedonia", "Skopje", "Pero Nakov");97 Account m = this.accountService.registerTeam(" asdf", "asd", "TeamRocket", 3);95 Account c = this.accountService.registerCompany("company@company", "company", "Co.co", "Macedonia", "Skopje", "Pero Nakov"); 96 Account m = this.accountService.registerTeam("team@team", "team", "TeamRocket", 3); 98 97 99 Job z =this.workService.insertJob("asdfq", "asdfqw", m.getId() ,5000, smalls, AccountType.TEAM);100 Job n =this.workService.insertJob("asdfq", "asdfqw", c.getId() ,5000, sm2, AccountType.COMPANY);101 Job j =this.workService.insertJob("Asdf", "Asdfa", c.getId() ,5000, ids, AccountType.COMPANY);102 Job k =this.workService.insertJob("Asdf", "Asdfa", m.getId() ,5000, ids, AccountType.TEAM);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); 103 102 104 Account u = this.accountService.registerUser("asdf", "asdfq", "Zoki", "Poki", lista, lista);103 this.accountService.registerUser("user@user", "user", "Zoki", "Poki", l3, lista); 105 104 106 105 }
Note:
See TracChangeset
for help on using the changeset viewer.