Changeset 336d09e for src/main


Ignore:
Timestamp:
01/08/21 03:34:14 (4 years ago)
Author:
Vzdra <vladko.zdravkovski@…>
Branches:
master
Children:
4b1c93d
Parents:
b31afbd
Message:

cleanup

Location:
src/main/java/it/finki/tinki
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/it/finki/tinki/bootstrap/DataHolder.java

    rb31afbd r336d09e  
    11package it.finki.tinki.bootstrap;
    22
    3 import it.finki.tinki.model.Address;
    4 import it.finki.tinki.model.EmbeddedMatchId;
    53import it.finki.tinki.model.Jobs.Job;
    6 import it.finki.tinki.model.Jobs.Work;
    7 import it.finki.tinki.model.Match;
    84import it.finki.tinki.model.Skill;
    95import it.finki.tinki.model.Users.Account;
    10 import it.finki.tinki.model.Users.Company;
    11 import it.finki.tinki.model.Users.User;
    126import it.finki.tinki.model.enumerator.AccountType;
    13 import it.finki.tinki.model.enumerator.WorkType;
    147import it.finki.tinki.repository.*;
    158import it.finki.tinki.service.AccountService;
    169import it.finki.tinki.service.WorkService;
    17 import org.springframework.beans.factory.annotation.Autowired;
    1810import org.springframework.stereotype.Component;
    1911
  • src/main/java/it/finki/tinki/helper/Matchmaker.java

    rb31afbd r336d09e  
    2222        }
    2323
     24        System.out.println(k/coef);
     25
    2426        return k/coef;
    2527    }
  • src/main/java/it/finki/tinki/model/EmbeddedMatchId.java

    rb31afbd r336d09e  
    66
    77import javax.persistence.Embeddable;
    8 import javax.persistence.FetchType;
    98import javax.persistence.OneToOne;
    109import java.io.Serializable;
    11 import java.util.Objects;
    1210
    1311@Embeddable
  • src/main/java/it/finki/tinki/model/Match.java

    rb31afbd r336d09e  
    11package it.finki.tinki.model;
    22
    3 import com.sun.istack.NotNull;
    4 import it.finki.tinki.model.Jobs.Work;
    5 import it.finki.tinki.model.Users.User;
    63import it.finki.tinki.model.enumerator.WorkType;
    74import lombok.Data;
     
    129@Data
    1310public class Match {
    14 
    15 //    @Id
    16 //    @GeneratedValue(strategy = GenerationType.AUTO)
    17 //    Long id;
    18 //
    19 //    @NotNull
    20 //    Long workId;
    21 //
    22 //    @NotNull
    23 //    Long userId;
    2411
    2512    @Id
     
    3219    public Match(){}
    3320
    34 //    public Match(Long workId, Long userId, float coefficient, WorkType type) {
    35 //        this.workId = workId;
    36 //        this.userId = userId;
    37 //        this.coefficient = coefficient;
    38 //        this.type = type;
    39 //    }
    40 
    4121    public Match(EmbeddedMatchId embeddedMatchId, float coefficient, WorkType type) {
    4222        this.embeddedMatchId = embeddedMatchId;
  • src/main/java/it/finki/tinki/model/dto/InternshipResponseDTO.java

    rb31afbd r336d09e  
    33import it.finki.tinki.model.Address;
    44import it.finki.tinki.model.Jobs.Internship;
    5 import it.finki.tinki.model.Jobs.Project;
    65import it.finki.tinki.model.Users.Company;
    7 import it.finki.tinki.model.Users.Team;
    86import it.finki.tinki.model.enumerator.AccountType;
    97import lombok.Data;
  • src/main/java/it/finki/tinki/model/dto/ProjectResponseDTO.java

    rb31afbd r336d09e  
    11package it.finki.tinki.model.dto;
    22
    3 import it.finki.tinki.model.Address;
    4 import it.finki.tinki.model.Jobs.Job;
    53import it.finki.tinki.model.Jobs.Project;
    6 import it.finki.tinki.model.Users.Company;
    74import it.finki.tinki.model.Users.Team;
    85import it.finki.tinki.model.enumerator.AccountType;
  • src/main/java/it/finki/tinki/model/dto/UserResponseDTO.java

    rb31afbd r336d09e  
    11package it.finki.tinki.model.dto;
    22
    3 import it.finki.tinki.model.Jobs.Internship;
    4 import it.finki.tinki.model.Jobs.Job;
    5 import it.finki.tinki.model.Jobs.Project;
    63import it.finki.tinki.model.Skill;
    74import lombok.Data;
  • src/main/java/it/finki/tinki/repository/AddressRepository.java

    rb31afbd r336d09e  
    55import org.springframework.stereotype.Repository;
    66
    7 import java.util.List;
    8 
    97@Repository
    108public interface AddressRepository extends JpaRepository<Address, Long> {
  • src/main/java/it/finki/tinki/repository/InternshipRepository.java

    rb31afbd r336d09e  
    22
    33import it.finki.tinki.model.Jobs.Internship;
    4 import it.finki.tinki.model.Jobs.Work;
    54import org.springframework.data.jpa.repository.JpaRepository;
    65import org.springframework.stereotype.Repository;
  • src/main/java/it/finki/tinki/repository/MatchRepository.java

    rb31afbd r336d09e  
    1313public interface MatchRepository extends JpaRepository<Match, EmbeddedMatchId> {
    1414    List<Match> findAllByEmbeddedMatchIdUserAndTypeOrderByCoefficientDesc(User user, WorkType type);
    15 //    List<Match> getAllByUserIdAndTypeOrderByCoefficientDesc(Long uId, WorkType type);
    1615}
  • src/main/java/it/finki/tinki/service/impl/AccountServiceImpl.java

    rb31afbd r336d09e  
    1616import it.finki.tinki.service.AccountService;
    1717import it.finki.tinki.service.MatchmakerService;
    18 import it.finki.tinki.service.WorkService;
    1918import org.springframework.stereotype.Service;
    2019
    21 import java.util.HashMap;
    2220import java.util.List;
    23 import java.util.Map;
    2421
    2522@Service
  • src/main/java/it/finki/tinki/service/impl/MatchmakerServiceImpl.java

    rb31afbd r336d09e  
    66import it.finki.tinki.model.Jobs.Job;
    77import it.finki.tinki.model.Jobs.Project;
    8 import it.finki.tinki.model.Jobs.Work;
    98import it.finki.tinki.model.Match;
    109import it.finki.tinki.model.Skill;
     
    6160        if(matches.size()!=0) {
    6261            matches.forEach(match -> {
    63                 System.out.println(match.getCoefficient());
    6462                jobs.add((Job) match.getEmbeddedMatchId().getWork());
    6563            });
  • src/main/java/it/finki/tinki/service/impl/SkillServiceImpl.java

    rb31afbd r336d09e  
    22
    33import it.finki.tinki.model.Skill;
    4 import it.finki.tinki.model.exception.SkillNotFoundException;
    54import it.finki.tinki.repository.SkillRepository;
    65import it.finki.tinki.service.SkillService;
  • src/main/java/it/finki/tinki/service/impl/WorkServiceImpl.java

    rb31afbd r336d09e  
    44import it.finki.tinki.model.Jobs.Job;
    55import it.finki.tinki.model.Jobs.Project;
    6 import it.finki.tinki.model.Match;
    76import it.finki.tinki.model.Skill;
    87import it.finki.tinki.model.Users.Account;
    98import it.finki.tinki.model.enumerator.AccountType;
    10 import it.finki.tinki.model.enumerator.WorkType;
    119import it.finki.tinki.repository.InternshipRepository;
    1210import it.finki.tinki.repository.JobRepository;
     
    1412import it.finki.tinki.repository.ProjectRepository;
    1513import it.finki.tinki.service.AccountService;
    16 import it.finki.tinki.service.MatchmakerService;
    1714import it.finki.tinki.service.SkillService;
    1815import it.finki.tinki.service.WorkService;
  • src/main/java/it/finki/tinki/web/controller/LoginController.java

    rb31afbd r336d09e  
    1313import it.finki.tinki.service.MatchmakerService;
    1414import it.finki.tinki.service.WorkService;
    15 import org.apache.coyote.Response;
    1615import org.springframework.web.bind.annotation.*;
    1716import org.springframework.web.server.ResponseStatusException;
    1817
    1918import java.util.List;
    20 import java.util.Map;
    2119
    2220@RestController
     
    3533    }
    3634
     35    //TODO: ADD JOB/INTERNSHIP RESPONSE TYPE TO COMPANY AND TEAM ---------------------v
     36
    3737    @PostMapping(path = "/login")
    3838    public LoginResponseDTO testPage(@RequestBody AccountLoginDTO body) throws ResponseStatusException {
    39 
    40         System.out.println(body);
    4139
    4240        Account a1 = accountService.findUser(body.getEmail(), body.getPassword(), body.getType());
     
    8987                tDto.setEmail(a1.getEmail());
    9088                tDto.setName(a1.getName());
    91                 tDto.setType(AccountType.USER);
     89                tDto.setType(AccountType.TEAM);
    9290                tDto.setMembers(((Team) a1).getMembers());
    9391
     
    106104                cDto.setEmail(a1.getEmail());
    107105                cDto.setName(a1.getName());
    108                 cDto.setType(AccountType.USER);
     106                cDto.setType(AccountType.COMPANY);
    109107                cDto.setAddress(((Company) a1).getAddress());
    110108
  • src/main/java/it/finki/tinki/web/controller/RegisterController.java

    rb31afbd r336d09e  
    11package it.finki.tinki.web.controller;
    22
    3 import it.finki.tinki.helper.Matchmaker;
    4 import it.finki.tinki.model.Jobs.Internship;
    5 import it.finki.tinki.model.Jobs.Job;
    6 import it.finki.tinki.model.Jobs.Project;
    73import it.finki.tinki.model.Skill;
    84import it.finki.tinki.model.Users.Account;
    9 import it.finki.tinki.model.Users.User;
    105import it.finki.tinki.model.dto.UserRegisterDTO;
    116import it.finki.tinki.service.AccountService;
     
    5550    }
    5651
     52    //TODO: ADD TEAM AND COMPANY REGISTER TDO --------------------------------------v
     53
    5754    @RequestMapping(path = "/team", method = RequestMethod.POST)
    5855    private Map<String, String> registerTeam(@RequestBody String email,
Note: See TracChangeset for help on using the changeset viewer.