jpq2 JPA - 객체지향 쿼리 언어 - Criteria 조회 - 참조: 자바 ORM 표준 JPA 프로그래밍 - 조회(select & multiselect) Criteria 에서 SELECT 절을 만드는 함수는 아래와 같다. /** * The CriteriaQuery interface defines functionality that is specific * to top-level queries. * * @param the type of the defined result * * @since 2.0 */ public interface CriteriaQuery extends AbstractQuery { CriteriaQuery select(Selection... selections); CriteriaQuery multiselect(List 2021. 8. 8. JPA - 객체지향 쿼리 언어 - Criteria 쿼리 생성 - 참조: 자바 ORM 표준 JPA 프로그래밍 - Criteria 쿼리 생성 Criteria 를 사용하려면 CriteriaBuilder.createQuery() 메소드로 Criteria 쿼리를 생성하면 된다. CriteriaBuilder 인터페이스의 메소드 시그니처는 아래와 같다. public interface CriteriaBuilder { /** * Create a CriteriaQuery object. * @return criteria query object */ CriteriaQuery createQuery(); /** * Create a CriteriaQuery object with the specified result * type. * @param resultClass type of the q.. 2021. 8. 5. 이전 1 다음