Example usage for javax.persistence.criteria Root fetch

List of usage examples for javax.persistence.criteria Root fetch

Introduction

In this page you can find the example usage for javax.persistence.criteria Root fetch.

Prototype

<Y> Fetch<X, Y> fetch(SingularAttribute<? super X, Y> attribute, JoinType jt);

Source Link

Document

Create a fetch join to the specified single-valued attribute using the given join type.

Usage

From source file:com.expressui.core.dao.security.query.RelatedRolesQuery.java

@Override
public void addFetchJoins(Root<Role> role) {
    role.fetch("userRoles", JoinType.INNER).fetch("user", JoinType.INNER);
}

From source file:com.expressui.sample.dao.query.ProfileQuery.java

@Override
public void addFetchJoins(Root<Profile> profile) {
    profile.fetch("user", JoinType.LEFT);
}

From source file:com.expressui.sample.dao.query.RecentContactsQuery.java

@Override
public void addFetchJoins(Root<Contact> contact) {
    Fetch mailingAddress = contact.fetch("mailingAddress", JoinType.LEFT);
    mailingAddress.fetch("state", JoinType.LEFT);
    mailingAddress.fetch("country", JoinType.LEFT);
}

From source file:com.expressui.sample.view.dashboard.RecentContactsQuery.java

@Override
public void addFetchJoins(Root<Contact> rootEntity) {
    rootEntity.fetch("mailingAddress", JoinType.LEFT).fetch("state", JoinType.LEFT);
}

From source file:com.expressui.core.dao.security.query.RelatedPermissionsQuery.java

@Override
public void addFetchJoins(Root<Permission> permission) {
    permission.fetch("role", JoinType.LEFT);
}

From source file:com.expressui.sample.dao.query.ContactQuery.java

@Override
public void addFetchJoins(Root<Contact> contact) {
    contact.fetch("mailingAddress", JoinType.LEFT);
    contact.fetch("account", JoinType.LEFT);
}

From source file:com.expressui.sample.dao.query.OpportunityQuery.java

@Override
public void addFetchJoins(Root<Opportunity> opportunity) {
    opportunity.fetch("account", JoinType.LEFT);
}

From source file:com.expressui.sample.view.opportunity.OpportunityQuery.java

@Override
public void addFetchJoins(Root<Opportunity> rootEntity) {
    rootEntity.fetch("account", JoinType.LEFT);
}

From source file:com.expressui.sample.dao.query.AccountQuery.java

@Override
public void addFetchJoins(Root<Account> account) {
    account.fetch("billingAddress", JoinType.LEFT);
}

From source file:com.expressui.core.dao.security.query.RelatedUsersQuery.java

@Override
public void addFetchJoins(Root<User> user) {
    user.fetch("userRoles", JoinType.INNER).fetch("user", JoinType.INNER);
}