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:org.dspace.orm.entity.Collection.java

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "workflow_step_3", nullable = true)
public EpersonGroup getWorkflowStep3() {
    return workflowStep3;
}

From source file:gov.nih.nci.cabig.caaers.domain.ResearchStaff.java

/**
 * This method will return a status text for display purpose's.
 *
 * @return the site research staffs internal
 *//*  www .j  a v  a2 s  . c  om*/

@OneToMany(mappedBy = "researchStaff", fetch = FetchType.LAZY, orphanRemoval = true)
@Cascade(value = { CascadeType.ALL })
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
public List<SiteResearchStaff> getSiteResearchStaffsInternal() {
    return lazyListHelper.getInternalList(SiteResearchStaff.class);
}

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

@Override
@ManyToOne(targetEntity = MedicationBasicUnitImpl.class, fetch = FetchType.LAZY)
public MedicationBasicUnit getBasicUnit() {
    return basicUnit;
}

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

/**
 * @return the investigation//  w  w  w  .j a  v a2 s.  c  o m
 */
@ManyToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_INVESTIGATION", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_ATTACHMENT_2")
@Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)
public Investigation getInvestigation() {
    return investigation;
}

From source file:gov.nih.nci.protexpress.domain.experiment.ExperimentRun.java

/**
 * Gets the protocolApplications.// ww  w  . j a v  a  2 s.  co m
 *
 * @return the protocolApplications.
 */
@OneToMany(mappedBy = "experimentRun", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
public List<ProtocolApplication> getProtocolApplications() {
    return this.protocolApplications;
}

From source file:com.dp2345.entity.ShopCategory.java

/**
 * ?
 * 
 * @return 
 */
@OneToMany(mappedBy = "shopCategory", fetch = FetchType.LAZY)
public Set<Shop> getShops() {
    return shops;
}

From source file:com.eryansky.entity.base.Organ.java

@ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY)
@JoinTable(name = "T_BASE_USER_ORGAN", joinColumns = { @JoinColumn(name = "ORGAN_ID") }, inverseJoinColumns = {
        @JoinColumn(name = "USER_ID") })
@Fetch(FetchMode.SUBSELECT)//from w  w w .j  a  va2 s .  c om
@OrderBy("id")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = CacheConstants.HIBERNATE_CACHE_BASE)
public List<User> getUsers() {
    return users;
}

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

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "patient")
@Sort(type = SortType.NATURAL)//  w  w  w.ja  v  a  2s.  c o m
public SortedSet<PatientDetail> getPatientDetails() {
    return this.patientDetails;
}

From source file:com.dp2345.entity.ArticleCategory.java

/**
 * ?
 * 
 * @return 
 */
@OneToMany(mappedBy = "articleCategory", fetch = FetchType.LAZY)
public Set<Article> getArticles() {
    return articles;
}

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

/**
 *      * The CollectingTrip the agent participated in
 *//*from  w  w  w.  ja v  a 2s . co m*/
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "CollectingTripID", nullable = false)
public CollectingTrip getCollectingTrip() {
    return this.collectingTrip;
}