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.PropertyTypePE.java

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = ColumnNames.CONTROLLED_VOCABULARY_COLUMN, updatable = false)
public VocabularyPE getVocabulary() {
    return vocabulary;
}

From source file:org.grails.datastore.mapping.query.Query.java

/**
 * Specifies whether a join query should be used (if join queries are supported by the underlying datastore)
 *
 * @param property The property/*from  ww w .  j  ava2s  . co m*/
 * @return The query
 */
public Query join(String property) {
    fetchStrategies.put(property, FetchType.EAGER);
    return this;
}

From source file:edu.ku.brc.specify.datamodel.PickListItem.java

@ManyToOne(cascade = {}, fetch = FetchType.EAGER)
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.LOCK })
@JoinColumn(name = "PickListID", nullable = false)
public PickList getPickList() {
    return pickList;
}

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

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = ColumnNames.GROUP_COLUMN, updatable = false)
public final GroupPE getGroup() {
    return group;
}

From source file:edu.ku.brc.specify.datamodel.AccessionAgent.java

/**
 *      * AgentAdress of agent playing role in Accession
 *//*from w  w  w  . j  a  v a 2 s  .  c o m*/
@ManyToOne(cascade = {}, fetch = FetchType.EAGER)
@JoinColumn(name = "AgentID", unique = false, nullable = false, insertable = true, updatable = true)
public Agent getAgent() {
    return this.agent;
}

From source file:gt.entities.Forum.java

@OneToMany(fetch = FetchType.EAGER, mappedBy = "forumParent")
public List<Forum> getDiscution() {
    return discution;
}

From source file:ca.mcgill.cs.swevo.qualyzer.model.Project.java

/**
 * @return the codes/* w ww.j a v a 2  s .  c  om*/
 */
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER)
@JoinColumn(name = "project_persistenceid", nullable = false)
@OrderColumn(name = "index")
public List<Code> getCodes() {
    return fCodes;
}

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

@NotNull(message = ValidationMessages.VOCABULARY_NOT_NULL_MESSAGE)
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = ColumnNames.CONTROLLED_VOCABULARY_COLUMN, updatable = false)
private VocabularyPE getVocabularyInternal() {
    return vocabulary;
}

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

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = ColumnNames.DATABASE_INSTANCE_COLUMN, updatable = false)
public final DatabaseInstancePE getDatabaseInstance() {
    return databaseInstance;
}

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

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = ColumnNames.PROPERTY_MATERIAL_TYPE_COLUMN, updatable = false)
public MaterialTypePE getMaterialType() {
    return materialType;
}