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:ch.systemsx.cisd.openbis.generic.shared.dto.MaterialPE.java

@ManyToOne(fetch = FetchType.EAGER)
@NotNull(message = ValidationMessages.MATERIAL_TYPE_NOT_NULL_MESSAGE)
@JoinColumn(name = ColumnNames.MATERIAL_TYPE_COLUMN, updatable = false)
@IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_ENTITY_TYPE)
public MaterialTypePE getMaterialType() {
    return materialType;
}

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

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = ColumnNames.MATERIAL_PROP_COLUMN)
public MaterialPE getMaterialValue() {
    return material;
}

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

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = ColumnNames.PERSON_REGISTERER_COLUMN, updatable = false)
@IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_REGISTRATOR)
public PersonPE getRegistrator() {
    return registrator;
}

From source file:org.musicrecital.model.User.java

@ManyToMany(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)//w  w  w.j  av  a  2  s . c o  m
@JoinTable(name = "user_role", joinColumns = {
        @JoinColumn(name = "user_id") }, inverseJoinColumns = @JoinColumn(name = "role_id"))
public Set<Role> getRoles() {
    return roles;
}

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

@ManyToOne(fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE })
@JoinColumn(name = "address_id")
public Address getAddress() {
    return address;
}

From source file:com.lcw.one.modules.sys.entity.User.java

@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "sys_user_role", joinColumns = { @JoinColumn(name = "user_id") }, inverseJoinColumns = {
        @JoinColumn(name = "role_id") })
@Where(clause = "del_flag='" + DEL_FLAG_NORMAL + "'")
@OrderBy("id")//from  w w w.  j  a  v a 2  s.  c  om
@Fetch(FetchMode.SUBSELECT)
@NotFound(action = NotFoundAction.IGNORE)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@JsonIgnore
@ExcelField(title = "", align = 1, sort = 800, fieldType = RoleListType.class)
public List<Role> getRoleList() {
    return roleList;
}

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

/**
 * @return the authorities/*from  w  ww.  ja v a2s.c o m*/
 */
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name = "authentication_holder_authority", joinColumns = @JoinColumn(name = "owner_id"))
@Convert(converter = SimpleGrantedAuthorityStringConverter.class)
@Column(name = "authority")
public Collection<? extends GrantedAuthority> getAuthorities() {
    return authorities;
}

From source file:com.hrdb.Employee.java

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "`DEPT_ID`", referencedColumnName = "`DEPT_ID`", insertable = false, updatable = false)
public Department getDepartment() {
    return this.department;
}

From source file:com.yuga.ygplatform.modules.sys.entity.User.java

@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "sys_user_role", joinColumns = { @JoinColumn(name = "user_id") }, inverseJoinColumns = {
        @JoinColumn(name = "role_id") })
@Where(clause = "del_flag='" + DEL_FLAG_NORMAL + "'")
@OrderBy("id")/* ww  w .  j  a  v  a 2s . c o  m*/
@Fetch(FetchMode.SUBSELECT)
@NotFound(action = NotFoundAction.IGNORE)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@JsonIgnore
public List<Role> getRoleList() {
    return roleList;
}

From source file:com.jasperreports.hrdb.Employee.java

@JsonIgnoreProperties({ "employeeByManagerid", "employeesForManagerid" })
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "`MANAGERID`", referencedColumnName = "`EID`", insertable = true, updatable = true)
public Employee getEmployeeByManagerid() {
    return this.employeeByManagerid;
}