本文整理汇总了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()));
}
}
示例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);
}