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:uk.ac.ebi.bioinvindex.model.processing.Assay.java

@ManyToOne(targetEntity = Study.class, fetch = FetchType.EAGER)
@JoinColumn(name = "STUDY_ID", nullable = false)
public Study getStudy() {
    return this.study;
}

From source file:uk.nhs.cfh.dsp.srth.information.model.impl.om.ehr.EHRImpl.java

/**
 * Gets the features./* w w  w  .ja v a  2s. co m*/
 *
 * @return the features
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, targetEntity = ClinicalFeatureEntry.class)
@JoinTable(name = "EHR_FEATURES", joinColumns = @JoinColumn(name = PATIENT_ID), inverseJoinColumns = @JoinColumn(name = "feature_id"))
@ForeignKey(name = "FK_EHR_FEA", inverseName = "FK_FEA_EHR")
public Set<BoundClinicalEntry> getFeatures() {
    return features;
}

From source file:uk.nhs.cfh.dsp.srth.information.model.impl.om.ehr.EHRImpl.java

/**
 * Gets the investigations.//from   w w  w.jav a  2s.  c om
 *
 * @return the investigations
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, targetEntity = InvestigationEventEntry.class)
@JoinTable(name = "EHR_INVESTIGATIONS", joinColumns = @JoinColumn(name = PATIENT_ID), inverseJoinColumns = @JoinColumn(name = "investigation_id"))
@ForeignKey(name = "FK_EHR_INVS", inverseName = "FK_INVS_EHR")
public Set<BoundClinicalEventEntry> getInvestigations() {
    return investigations;
}

From source file:uk.nhs.cfh.dsp.srth.information.model.impl.om.ehr.EHRImpl.java

/**
 * Gets the interventions./*from   w  w w  .jav  a  2  s  . com*/
 *
 * @return the interventions
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, targetEntity = InterventionEventEntry.class)
@JoinTable(name = "EHR_INTERVENTIONS", joinColumns = @JoinColumn(name = PATIENT_ID), inverseJoinColumns = @JoinColumn(name = "intervention_id"))
@ForeignKey(name = "FK_EHR_INTV", inverseName = "FK_INTV_EHR")
public Set<BoundClinicalEventEntry> getInterventions() {
    return interventions;
}

From source file:uk.nhs.cfh.dsp.srth.information.model.impl.om.ehr.EHRImpl.java

/**
 * Gets the medications./*w  w w  .j  a  va 2s.  c o m*/
 *
 * @return the medications
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, targetEntity = MedicationEventEntry.class)
@JoinTable(name = "EHR_MEDICATIONS", joinColumns = @JoinColumn(name = PATIENT_ID), inverseJoinColumns = @JoinColumn(name = "medication_id"))
@ForeignKey(name = "FK_EHR_MED", inverseName = "FK_MED_EHR")
public Set<BoundClinicalEventEntry> getMedications() {
    return medications;
}

From source file:uk.nhs.cfh.dsp.srth.information.model.impl.om.ehr.EHRImpl.java

/**
 * Gets the clinical findings./*from   w w w .  j av  a 2 s .c om*/
 *
 * @return the clinical findings
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, targetEntity = ClinicalFindingEntry.class)
@JoinTable(name = "EHR_FINDINGS", joinColumns = @JoinColumn(name = PATIENT_ID), inverseJoinColumns = @JoinColumn(name = "finding_id"))
@ForeignKey(name = "FK_EHR_FIN", inverseName = "FK_FIN_EHR")
public Set<BoundClinicalEntry> getClinicalFindings() {
    return findings;
}

From source file:uk.nhs.cfh.dsp.srth.information.model.impl.om.ehr.EHRImpl.java

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, targetEntity = AbstractBoundClinicalEntry.class)
@JoinTable(name = "EHR_ENTRIES", joinColumns = @JoinColumn(name = PATIENT_ID), inverseJoinColumns = @JoinColumn(name = "entry_id"))
@ForeignKey(name = "FK_EHR_ENT", inverseName = "FK_ENT_EHR")
public Set<BoundClinicalEntry> getEntries() {
    return entries;
}

From source file:velo.entity.Resource.java

/**
 * Get a list of Resource Admin entities assigned to the Resource
 * //from www  . j  a va 2  s  .  c  o  m
 * @return A list of ResourceAdmin entities
 */
@OneToMany(cascade = CascadeType.ALL, mappedBy = "resource", fetch = FetchType.EAGER)
@OrderBy("priority")
public Set<ResourceAdmin> getResourceAdmins() {
    return resourceAdmins;
}