-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ad380d
commit adb1d66
Showing
4 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/main/java/com/ssafy/tott/housegeo/data/cond/HouseGeoFilterCond.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.ssafy.tott.housegeo.data.cond; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.util.List; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@Getter | ||
public class HouseGeoFilterCond { | ||
private String district; | ||
private String legalDong; | ||
private int minPrice; | ||
private int maxPrice; | ||
private int minArea; | ||
private int maxArea; | ||
private List<String> type; | ||
private int buildingYear; | ||
} |
3 changes: 2 additions & 1 deletion
3
src/main/java/com/ssafy/tott/housegeo/domain/HouseGeoRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package com.ssafy.tott.housegeo.domain; | ||
|
||
import com.ssafy.tott.housegeo.domain.query.HouseGeoRepositoryCustom; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.Optional; | ||
|
||
public interface HouseGeoRepository extends JpaRepository<HouseGeo, Integer> { | ||
public interface HouseGeoRepository extends JpaRepository<HouseGeo, Integer>, HouseGeoRepositoryCustom { | ||
Optional<HouseGeo> findByMainNumberAndSubNumber(int mainNumber, int subNumber); | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/ssafy/tott/housegeo/domain/query/HouseGeoRepositoryCustom.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.ssafy.tott.housegeo.domain.query; | ||
|
||
import com.ssafy.tott.housegeo.data.cond.HouseGeoFilterCond; | ||
import com.ssafy.tott.housegeo.domain.HouseGeo; | ||
|
||
import java.util.List; | ||
|
||
public interface HouseGeoRepositoryCustom { | ||
List<HouseGeo> findByFilterCond(HouseGeoFilterCond cond); | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/com/ssafy/tott/housegeo/domain/query/HouseGeoRepositoryImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.ssafy.tott.housegeo.domain.query; | ||
|
||
import com.querydsl.jpa.impl.JPAQueryFactory; | ||
import com.ssafy.tott.housegeo.data.cond.HouseGeoFilterCond; | ||
import com.ssafy.tott.housegeo.domain.HouseGeo; | ||
|
||
import javax.persistence.EntityManager; | ||
import java.util.List; | ||
|
||
public class HouseGeoRepositoryImpl implements HouseGeoRepositoryCustom { | ||
private final JPAQueryFactory query; | ||
|
||
public HouseGeoRepositoryImpl(EntityManager em) { | ||
this.query = new JPAQueryFactory(em); | ||
} | ||
|
||
@Override | ||
public List<HouseGeo> findByFilterCond(HouseGeoFilterCond cond) { | ||
return null; | ||
} | ||
} |