Example usage for javax.persistence FetchType EAGER

List of usage examples for javax.persistence FetchType EAGER

Introduction

In this page you can find the example usage for javax.persistence FetchType EAGER.

Prototype

FetchType EAGER

To view the source code for javax.persistence FetchType EAGER.

Click Source Link

Document

Defines that data must be eagerly fetched.

Usage

From source file:org.projectforge.fibu.EingangsrechnungDO.java

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "eingangsrechnung")
@IndexColumn(name = "number", base = 1)
@Override//from  w w  w  . j a  v  a  2 s .  co  m
public List<EingangsrechnungsPositionDO> getPositionen() {
    return this.positionen;
}

From source file:org.projectforge.framework.persistence.user.entities.GroupDO.java

@ManyToMany(targetEntity = org.projectforge.framework.persistence.user.entities.PFUserDO.class, cascade = {
        CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.EAGER)
@JoinTable(name = "T_GROUP_USER", joinColumns = @JoinColumn(name = "GROUP_ID"), inverseJoinColumns = @JoinColumn(name = "USER_ID"), indexes = {
        @javax.persistence.Index(name = "idx_fk_t_group_user_group_id", columnList = "group_id"),
        @javax.persistence.Index(name = "idx_fk_t_group_user_user_id", columnList = "user_id") })
public Set<PFUserDO> getAssignedUsers() {
    return assignedUsers;
}

From source file:org.projectforge.framework.persistence.user.entities.PFUserDO.java

@OneToMany(fetch = FetchType.EAGER, orphanRemoval = true, mappedBy = "user")
public Set<UserRightDO> getRights() {
    return this.rights;
}

From source file:org.projectforge.plugins.crm.ContactDO.java

/**
 * Get the contact entries for this object.
 *//*  w ww  .jav  a2  s .c  om*/
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true, mappedBy = "contact", targetEntity = ContactEntryDO.class)
@IndexColumn(name = "number", base = 1)
public Set<ContactEntryDO> getContactEntries() {
    return this.contactEntries;
}

From source file:org.projectforge.plugins.crm.ContactEntryDO.java

/**
 * Not used as object due to performance reasons.
 *
 * @return// www  . j a  v a  2 s .  c o  m
 */
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "contact_id", nullable = false)
public ContactDO getContact() {
    return contact;
}

From source file:org.projectforge.plugins.teamcal.event.TeamEventDO.java

/**
 * @return the attendees/*from w  w w.  j a v a 2  s. c  o m*/
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "team_event_fk", insertable = true, updatable = true)
@Sort(type = SortType.NATURAL)
public SortedSet<TeamEventAttendeeDO> getAttendees() {
    return attendees;
}

From source file:org.projectforge.user.GroupDO.java

@ManyToMany(targetEntity = org.projectforge.user.PFUserDO.class, cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, fetch = FetchType.EAGER)
@JoinTable(name = "T_GROUP_USER", joinColumns = @JoinColumn(name = "GROUP_ID"), inverseJoinColumns = @JoinColumn(name = "USER_ID"))
public Set<PFUserDO> getAssignedUsers() {
    return assignedUsers;
}

From source file:ru.runa.wfe.execution.Swimlane.java

@Override
@ManyToOne(targetEntity = Executor.class, fetch = FetchType.EAGER)
@JoinColumn(name = "EXECUTOR_ID")
@ForeignKey(name = "FK_SWIMLANE_EXECUTOR")
public Executor getExecutor() {
    return executor;
}

From source file:ru.runa.wfe.task.Task.java

@ManyToOne(targetEntity = Process.class, fetch = FetchType.EAGER)
@JoinColumn(name = "PROCESS_ID")
@ForeignKey(name = "FK_TASK_PROCESS")
@Index(name = "IX_TASK_PROCESS")
public Process getProcess() {
    return process;
}

From source file:ru.runa.wfe.task.Task.java

@Override
@ManyToOne(targetEntity = Executor.class, fetch = FetchType.EAGER)
@JoinColumn(name = "EXECUTOR_ID")
@ForeignKey(name = "FK_TASK_EXECUTOR")
@Index(name = "IX_TASK_EXECUTOR")
public Executor getExecutor() {
    return executor;
}