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

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

From source file:gov.nih.nci.protexpress.domain.protocol.ProtocolApplication.java

/**
 * Gets the protocol./*  w  w  w  .j a  v  a2s . c o  m*/
 *
 * @return the protocol.
 */
@ManyToOne(fetch = FetchType.EAGER)
@NotNull
@JoinColumn(name = "protocol_id")
@Valid
public Protocol getProtocol() {
    return this.protocol;
}

From source file:com.hmsinc.epicenter.model.workflow.Workflow.java

/**
 * @return the states//from   w  w  w . j ava 2  s .  c o  m
 */
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER, mappedBy = "workflow")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Sort(type = SortType.NATURAL)
public SortedSet<WorkflowState> getStates() {
    return states;
}

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

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = ColumnNames.VOCABULARY_TERM_COLUMN)
@IndexedEmbedded
public VocabularyTermPE getVocabularyTerm() {
    return vocabularyTerm;
}

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

@ManyToOne(fetch = FetchType.EAGER)
@NotNull(message = ValidationMessages.GROUP_NOT_NULL_MESSAGE)
@JoinColumn(name = ColumnNames.GROUP_COLUMN, updatable = true)
@IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_GROUP)
public final GroupPE getGroup() {
    return group;
}

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

/**
 * @return the client
 */
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "client_id")
public ClientDetailsEntity getClient() {
    return client;
}

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

/**
 *      * Link to Collector's record in Agent table
 */// ww w. j a  v  a2  s  . com
@ManyToOne(cascade = {}, fetch = FetchType.EAGER)
@JoinColumn(name = "AgentID", nullable = false)
public Agent getAgent() {
    return this.agent;
}

From source file:org.openmrs.contrib.metadatarepository.model.User.java

@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "user_role", joinColumns = {
        @JoinColumn(name = "user_id") }, inverseJoinColumns = @JoinColumn(name = "role_id"))
public Set<Role> getRoles() {
    return roles;
}

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

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

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

@OneToOne(fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE })
public Person getPerson() {
    return person;
}