Example usage for javax.persistence FetchType LAZY

List of usage examples for javax.persistence FetchType LAZY

Introduction

In this page you can find the example usage for javax.persistence FetchType LAZY.

Prototype

FetchType LAZY

To view the source code for javax.persistence FetchType LAZY.

Click Source Link

Document

Defines that data can be lazily fetched.

Usage

From source file:edu.duke.cabig.c3pr.domain.Organization.java

/**
* Gets the identifiers assigned TO the organization.
* 
* @return the identifiers// w ww  .  jav  a  2 s . c  om
*/
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@Cascade({ CascadeType.MERGE, CascadeType.ALL })
@JoinColumn(name = "ORG_ID")
@Where(clause = "retired_indicator  = 'false'")
@OrderBy
public List<Identifier> getIdentifiersAssignedToOrganization() {
    return identifiersAssignedToOrganization;
}

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

/**
 *
 *///from   ww w .  j  av a 2 s  . co  m
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "StorageID", unique = false, nullable = true, insertable = true, updatable = true)
public Storage getStorage() {
    return this.storage;
}

From source file:com.hmsinc.epicenter.model.permission.Organization.java

/**
 * @return the workflow//from   w  w w  .  j  a va 2  s .c o m
 */
@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_WORKFLOW", unique = false, nullable = false, insertable = true, updatable = true)
@ForeignKey(name = "FK_ORGANIZATION_1")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public Workflow getWorkflow() {
    return workflow;
}

From source file:com.marand.thinkmed.medications.model.impl.MedicationImpl.java

@Override
@OneToMany(targetEntity = MedicationIndicationLinkImpl.class, mappedBy = "medication", fetch = FetchType.LAZY)
public Set<MedicationIndicationLink> getIndications() {
    return indications;
}

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

/**
 * @return the discipline/*  www . ja  va 2 s  .co m*/
 */
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "CollectionID", unique = false, nullable = false, insertable = true, updatable = true)
public Collection getCollection() {
    return collection;
}

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

@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "DisciplineID", unique = false, nullable = true, insertable = true, updatable = true)
public Discipline getDiscipline() {
    return this.discipline;
}

From source file:com.hmsinc.epicenter.model.surveillance.SurveillanceSet.java

/**
 * @return the tasks/*w  w w  .  j a v a  2  s  .c  o m*/
 */
@ManyToMany(cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, fetch = FetchType.LAZY, mappedBy = "sets", targetEntity = SurveillanceTask.class)
public Set<SurveillanceTask> getTasks() {
    return tasks;
}

From source file:com.hmsinc.epicenter.model.surveillance.Anomaly.java

/**
 * @return the classification// ww w. j av  a  2  s  .  c o m
 */
@ManyToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_CLASSIFICATION", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_ANOMALY_3")
public Classification getClassification() {
    return classification;
}

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

@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "ModifiedByAgentID")
public Agent getModifiedByAgent() {
    return this.modifiedByAgent;
}

From source file:com.hmsinc.epicenter.model.health.PatientDetail.java

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "patientDetail")
@Sort(type = SortType.NATURAL)/* w w w .  j  a  va 2s  .c  o  m*/
public SortedSet<Interaction> getInteractions() {
    return this.interactions;
}