Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To complete the test task you need:

  1. Prerequisites

Ensure you have the following software installed:



  1. Create a fork of this repository to work with

Select Fork
Fill in the Name and proceed


  1. Create Postgres Docker Container

    • Open console ( cmd or else)
    • Navigate to Java IfortexTest Task folder
    • run command "docker-compose up"

  2. Implement methods to meet the requirements.

    • Write Sql in @Query(value = "", nativeQuery = true) in SessionRepository.getFirstDesktopSession() so it returns the first(earliest) desktop Session
    • Implement SessionService.getFirstDesktopSession() using SessionRepository.getFirstDesktopSession() so it returns the first(earliest) desktop Session

    • Write Sql in @Query(value = "", nativeQuery = true) in SessionRepository.getSessionsFromActiveUsersEndedBefore2025() so it returns only Sessions from Active users that were ended before 2025 sort by startedAtUtc in descending order
    • Implement SessionService.getSessionsFromActiveUsersEndedBefore2025() using SessionRepository.getSessionsFromActiveUsersEndedBefore2025() so it returns only Sessions from Active users that were ended before 2025 sort by startedAtUtc in descending order

    • Write Sql in @Query(value = "", nativeQuery = true) in UserRepository.getUserWithMostSessions() so it returns a User with the biggest amount of sessions
    • Implement UserService.getUserWithMostSessions() method of UserService using UserRepository.getUserWithMostSessions() so it returns a User with the biggest amount of sessions

    • Write Sql in @Query(value = "", nativeQuery = true) in UserRepository.getUsersWithAtLeastOneMobileSession() so it returns Users that have at least 1 Mobile session sort by startedAtUtc in descending order
    • Implement UserService.getUsersWithAtLeastOneMobileSession() method of UserService using UserRepository.getUsersWithAtLeastOneMobileSession() so it returns Users that have at least 1 Mobile session sort by startedAtUtc in descending order

    IMPORTANT: Do NOT change any files except of SessionService, UserService, SessionRepository, UserRepository

  3. Check that all Api's returns response with 200 ok status and correct data

  4. Commit and push your code



  1. Provide us a link to your fork of the test-task repository

Check the commited code and provide the url


  1. Do NOT contribute against the original test-task repository

Do not contribute to the original repo

About

Test task for java students

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages