File tree Expand file tree Collapse file tree 3 files changed +45
-2
lines changed
src/main/java/com/somemore/location/repository Expand file tree Collapse file tree 3 files changed +45
-2
lines changed Original file line number Diff line number Diff line change 1+ package com .somemore .location .repository ;
2+
3+ import com .somemore .location .domain .Location ;
4+ import org .springframework .data .jpa .repository .JpaRepository ;
5+
6+ public interface LocationJpaRepository extends JpaRepository <Location , Long > {
7+
8+ }
Original file line number Diff line number Diff line change 11package com .somemore .location .repository ;
22
33import com .somemore .location .domain .Location ;
4- import org . springframework . data . jpa . repository . JpaRepository ;
4+ import java . util . Optional ;
55
6- public interface LocationRepository extends JpaRepository < Location , Long > {
6+ public interface LocationRepository {
77
8+ Location save (Location location );
9+
10+ Optional <Location > findById (Long id );
11+
12+ void deleteAllInBatch ();
813}
Original file line number Diff line number Diff line change 1+ package com .somemore .location .repository ;
2+
3+ import com .querydsl .jpa .impl .JPAQueryFactory ;
4+ import com .somemore .location .domain .Location ;
5+ import java .util .Optional ;
6+ import lombok .RequiredArgsConstructor ;
7+ import org .springframework .stereotype .Repository ;
8+
9+ @ RequiredArgsConstructor
10+ @ Repository
11+ public class LocationRepositoryImpl implements LocationRepository {
12+
13+ private final LocationJpaRepository locationJpaRepository ;
14+ private final JPAQueryFactory queryFactory ;
15+
16+ @ Override
17+ public Location save (Location location ) {
18+ return locationJpaRepository .save (location );
19+ }
20+
21+ @ Override
22+ public Optional <Location > findById (Long id ) {
23+ return locationJpaRepository .findById (id );
24+ }
25+
26+ @ Override
27+ public void deleteAllInBatch () {
28+ locationJpaRepository .deleteAllInBatch ();
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments