當前位置: 首頁>>代碼示例>>Java>>正文


Java JoinType.INNER屬性代碼示例

本文整理匯總了Java中javax.persistence.criteria.JoinType.INNER屬性的典型用法代碼示例。如果您正苦於以下問題:Java JoinType.INNER屬性的具體用法?Java JoinType.INNER怎麽用?Java JoinType.INNER使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在javax.persistence.criteria.JoinType的用法示例。


在下文中一共展示了JoinType.INNER屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: performsTwoFetches

@Test
public void performsTwoFetches() {
	JoinFetch<Customer> spec1 = new JoinFetch<Customer>(new String[] { "orders" }, JoinType.LEFT);
	JoinFetch<Customer> spec2 = new JoinFetch<Customer>(new String[] { "orders2" }, JoinType.INNER);
    
	Conjunction<Customer> spec = new Conjunction<Customer>(spec1, spec2);
	
    List<Customer> customers = customerRepo.findAll(spec);
    
    assertThat(customers).isNotEmpty();
    
    for (Customer customer : customers) {
    	assertTrue(Hibernate.isInitialized(customer.getOrders()));
    	assertTrue(Hibernate.isInitialized(customer.getOrders2()));
    }
}
 
開發者ID:tkaczmarzyk,項目名稱:specification-arg-resolver,代碼行數:16,代碼來源:JoinFetchTest.java

示例2: testMethod_joinContainerWithJoinFetch

public void testMethod_joinContainerWithJoinFetch(
        @Joins(fetch = {
        	@JoinFetch(paths = { "fetch1" }),
            @JoinFetch(paths = { "fetch2" }, joinType = JoinType.INNER)
        })
        @Spec(path = "path1", spec = Like.class) Specification<Object> spec) {
}
 
開發者ID:tkaczmarzyk,項目名稱:specification-arg-resolver,代碼行數:7,代碼來源:SpecificationArgumentResolverTest.java

示例3: testMethod_joinContainerWithRegularJoin

public void testMethod_joinContainerWithRegularJoin(
        @Joins({
        	@Join(path = "join1", alias = "alias1", type = JoinType.INNER, distinct = true),
        	@Join(path = "join2", alias = "alias2", type = JoinType.LEFT, distinct = false)
        })
        @Spec(path = "path1", spec = Like.class) Specification<Object> spec) {
}
 
開發者ID:tkaczmarzyk,項目名稱:specification-arg-resolver,代碼行數:7,代碼來源:SpecificationArgumentResolverTest.java

示例4: testMethod_joinContainerWithRegularAndFetchJoins

public void testMethod_joinContainerWithRegularAndFetchJoins(
        @Joins(value = {
        	@Join(path = "join1", alias = "alias1", type = JoinType.INNER, distinct = true),
        	@Join(path = "join2", alias = "alias2", type = JoinType.LEFT, distinct = false)
        }, fetch = {
            	@JoinFetch(paths = { "fetch1" }),
                @JoinFetch(paths = { "fetch2" }, joinType = JoinType.INNER)
            })
        @Spec(path = "path1", spec = Like.class) Specification<Object> spec) {
}
 
開發者ID:tkaczmarzyk,項目名稱:specification-arg-resolver,代碼行數:10,代碼來源:SpecificationArgumentResolverTest.java

示例5: join

public <K> JoinBuilder<E, K> join(final ListAttribute<? super E, K> attribute)
{
	return new JoinBuilder<>(attribute, JoinType.INNER, false);
}
 
開發者ID:rlsutton1,項目名稱:VaadinUtils,代碼行數:4,代碼來源:JpaDslAbstract.java


注:本文中的javax.persistence.criteria.JoinType.INNER屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。