Ignore:
Timestamp:
02/08/21 20:00:55 (4 years ago)
Author:
Vzdra <vladko.zdravkovski@…>
Branches:
master
Children:
df62f68
Parents:
6729ba5
Message:

reorganization

Location:
back_end/src/main/java/it/finki/tinki/service
Files:
10 moved

Legend:

Unmodified
Added
Removed
  • back_end/src/main/java/it/finki/tinki/service/AccountService.java

    r6729ba5 r81c9e25  
    1212
    1313public interface AccountService {
     14    boolean hasData();
    1415    Account findUser(String email, String password, AccountType type);
    1516    Account registerUser(String email, String password, String name, String surname, List<Skill> retainedSkills, List<Skill> skillsToLearn);
  • back_end/src/main/java/it/finki/tinki/service/impl/AccountServiceImpl.java

    r6729ba5 r81c9e25  
    1818import org.springframework.stereotype.Service;
    1919
     20import java.util.ArrayList;
    2021import java.util.List;
    2122import java.util.Optional;
     
    5152    }
    5253
     54
     55    @Override
     56    public boolean hasData() {
     57
     58        List<User> users = this.userRepository.findAll();
     59        List<Company> companies = this.companyRepository.findAll();
     60        List<Team> teams = this.teamRepository.findAll();
     61
     62        return users.size() > 0 || companies.size() > 0 || teams.size() > 0;
     63    }
     64
    5365    @Override
    5466    public Account findUser(String email, String password, AccountType type) {
Note: See TracChangeset for help on using the changeset viewer.