일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- rember me
- @SqlResultSetMapping
- Spring
- Drools Fusion
- spring jpa
- JBoss Seam
- zabbix
- JPA
- bootstrap jquery datepicker
- guvnor
- gwt
- jquery
- ibatis
- jquery serialize
- jstl
- Hudson
- SVN
- spring security
- MySQL
- jenkins
- GEventEvaluator
- maven
- COC
- CEP
- java tip
- spring transaction
- querydsl
- gwt-ext
- drools
- custom filter
- Today
- Total
목록JPA (2)
봉 블로그
Querydsl 3.6.7public class BoardRepositoryImpl extends QueryDslRepositorySupport implements BoardRepositoryCustom { public BoardRepositoryImpl() { super(Board.class); //Domain Class } ......JPQLQuery query = from(qBoard).where(predicate); Long totalCount = query.count(); List list = getQuerydsl().applyPagination(pageable, query).list(qBoard); return new PageImpl(list, pageable, totalCount);
Spring JPA 를 사용하면서 특정 Entity 와는 다른 데이타(field 조합)를 쿼리할경우가 있다.또는Entity 의 특정 field 만 쿼리할경우는 아래와 같이 하면 된다. ----------- 아래는 Entity class 를 사용하는경우 ---------@Repositorypublic interface BoardRepository extends JpaRepository, JpaSpecificationExecutor { @Query(value = "SELECT new Board(b.id, b.subject, b.userId, b.createDt) FROM Board b")Page findList(Pageable pageable);} ----------- 아래는 POJO class 를 사용하는..