일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- jsp
- 이클립스
- Web Service
- WebView
- Eclipse
- MANTIS
- decompiler
- 자바
- varags
- Redirect
- TextBox
- javascript
- SpringSource Tool Suite
- Maven
- Bootstrap
- 컬럼명
- scrollView
- Android
- 자바스크립트
- MS-SQL
- C#
- html
- Apache Lucene
- 안드로이드
- 웹뷰
- Java
- STS
- 웹 서비스
- MSsql
- asp.net
- Today
- Total
목록hibernate (2)
bboks.net™
Hibernate를 사용하다보면 Criteria를 재사용할 상황이 가끔 생긴다. 예를 들면 Paging과 같은 nHibernate에는 CriteriaTransformer(?)에서 지원을 하는 것 같은데 hibernate에서는 없는 것 같음 이를 우회하는 방법은 criteria의 projection을 초기화하고 다시 세팅하는 방법이 있다. ProjectionList projectionList = Projections.projectionList(); //전체 개수를 가져옴 int totalCount = Integer.parseInt(criteria.setProjection(Projections.rowCount()).list().get(0).toString()); //criteria 재사용을 위해 projec..
※ 본 예제에서는 In-memory DB로 한번 실행이 되면 데이터가 삭제된다. 1. 이클립스에서 Maven Project 생성 2. pom.xml을 수정해서 필요한 Dependency 등록unit : 4.7mockito-all : 1.9.5spring-context : 3.1.2.RELEASEspring-asm : 3.1.4.RELEASEspring-beans : 3.1.2.RELEASEspring-core : 3.1.2.RELEASEspring-expression : 3.1.2.RELEASEspring -test : 3.1.2.RELEASEspring-orm : 3.1.2.RELEASEhibernate-core : 4.1.9.Finalhsqldb : 2.2.9cglib : 2.2.2commons-db..