当前位置: 首页>>代码示例>>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;未经允许,请勿转载。