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:com.sccl.attech.modules.sys.entity.Menu.java

@OneToMany(mappedBy = "parent", fetch = FetchType.EAGER)
@Where(clause = "del_flag='" + DEL_FLAG_NORMAL + "'")
@OrderBy(value = "sort")
@Fetch(FetchMode.SUBSELECT)//from   w ww. ja  v a 2 s  . c o m
@NotFound(action = NotFoundAction.IGNORE)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@JsonIgnore
public List<Menu> getChildList() {
    return childList;
}

From source file:com.green.modules.sys.entity.Role.java

@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "sys_role_office", joinColumns = { @JoinColumn(name = "role_id") }, inverseJoinColumns = {
        @JoinColumn(name = "office_id") })
@Where(clause = "del_flag='" + DEL_FLAG_NORMAL + "'")
@OrderBy("id")/* w  w  w  . j av  a  2  s. co m*/
@Fetch(FetchMode.SUBSELECT)
@NotFound(action = NotFoundAction.IGNORE)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public List<Office> getOfficeList() {
    return officeList;
}

From source file:example.app.model.Contact.java

@ManyToOne(fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE })
@JoinColumn(name = "phone_number_id")
public PhoneNumber getPhoneNumber() {
    return phoneNumber;
}

From source file:gov.nih.nci.protexpress.domain.experiment.Experiment.java

/**
 * Gets the contactPerson./* www  . ja  va2  s  .  c om*/
 *
 * @return the contactPerson.
 */
@OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinColumn(name = "contact_person_id")
@Valid
public ContactPerson getContactPerson() {
    return contactPerson;
}

From source file:com.hrdb.Employee.java

@JsonIgnoreProperties({ "employeeByManagerId", "employeesForManagerId" })
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "`MANAGER_ID`", referencedColumnName = "`EMP_ID`", insertable = false, updatable = false)
public Employee getEmployeeByManagerId() {
    return this.employeeByManagerId;
}

From source file:org.mitre.oauth2.model.AuthenticationHolderEntity.java

/**
 * @return the resourceIds/*from  w w w. jav  a  2  s  .  c o m*/
 */
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "authentication_holder_resource_id", joinColumns = @JoinColumn(name = "owner_id"))
@Column(name = "resource_id")
public Set<String> getResourceIds() {
    return resourceIds;
}

From source file:com.impetus.ankush.common.domain.Cluster.java

/**
 * Gets the nodes./*  w  w  w . j  a v a2s  . co  m*/
 * 
 * @return the nodes
 */
@OneToMany(mappedBy = CLUSTER_ID, fetch = FetchType.EAGER, cascade = CascadeType.REMOVE)
@JsonIgnore
public Set<Node> getNodes() {
    return nodes;
}

From source file:ch.systemsx.cisd.openbis.generic.shared.dto.PropertyTypePE.java

@NotNull(message = ValidationMessages.DATA_TYPE_NOT_NULL_MESSAGE)
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = ColumnNames.DATA_TYPE_COLUMN, updatable = false)
public final DataTypePE getType() {
    return type;//from w  ww. j  a  v a2  s  .co  m
}

From source file:edu.northwestern.bioinformatics.studycalendar.domain.PlannedActivity.java

@ManyToOne(optional = false, fetch = FetchType.EAGER)
@JoinColumn(name = "activity_id")
public Activity getActivity() {
    return activity;
}

From source file:ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE.java

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = ColumnNames.GROUP_COLUMN)
public final GroupPE getHomeGroup() {
    return homeGroup;
}