Ensure you have the following software installed:
-
- Open console ( cmd or else)
- Navigate to Java IfortexTest Task folder
- run command "docker-compose up"
-
- 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
-
- http://localhost:8080/api/sessions/active-users-ended-before-2025 ( returns only Sessions from Active users that were ended before 2025 sort by startedAtUtc in descending order )
- http://localhost:8080/api/sessions/first-desktop ( returns the first(earliest) desktop Session )
- http://localhost:8080/api/users/most-active ( returns a User with the biggest amount of sessions )
- http://localhost:8080/api/users/with-mobile-sessions ( returns Users that has at least 1 Mobile session sort by startedAtUtc in descending order )