Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PA165 Formula One Team
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Diana Gulčíková
PA165 Formula One Team
Merge requests
!48
An error occurred while fetching the assigned milestone of the selected merge_request.
14 component tests
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
14 component tests
14_component_tests
into
milestone_2
Overview
0
Commits
12
Pipelines
2
Changes
14
Merged
Tomáš Marek
requested to merge
14_component_tests
into
milestone_2
1 year ago
Overview
0
Commits
12
Pipelines
2
Changes
14
Expand
All component test pass after merge with milestone 2 Checkstyle fixed
0
0
Merge request reports
Compare
milestone_2
version 1
587a9939
1 year ago
milestone_2 (base)
and
latest version
latest version
84746bd1
12 commits,
1 year ago
version 1
587a9939
11 commits,
1 year ago
14 files
+
566
−
53
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
14
Search (e.g. *.vue) (Ctrl+P)
car/src/main/java/cz/muni/pa165/car/data/repository/CarRepository.java
+
13
−
2
Options
package
cz.muni.pa165.car.data.repository
;
import
cz.muni.pa165.car.data.model.Car
;
import
java.util.List
;
import
java.util.Optional
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.stereotype.Repository
;
/**
* Car Repository for Driver Manager.
*/
@Repository
public
interface
CarRepository
extends
JpaRepository
<
Car
,
Long
>
{}
public
interface
CarRepository
extends
JpaRepository
<
Car
,
Long
>
{
@Query
(
"SELECT c FROM Car c WHERE c.id = :id"
)
Optional
<
Car
>
findById
(
@Param
(
"id"
)
Long
id
);
@Query
(
"SELECT c FROM Car c"
)
List
<
Car
>
findAll
();
}
Loading