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:com.esoft.jdp2p.borrower.model.BorrowerAuthentication.java

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "bank_credit_report")
public AuthenticationMaterials getBankCreditReport() {
    return this.bankCreditReport;
}

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

/**
 * Gets the book randomization entry internal.
 * /*from  w w w.j  av a 2s.  co m*/
 * @return the book randomization entry internal
 */
@OneToMany(mappedBy = "stratumGroup", fetch = FetchType.LAZY, orphanRemoval = true)
@Cascade(value = { CascadeType.ALL })
public List<BookRandomizationEntry> getBookRandomizationEntryInternal() {
    return lazyListHelper.getInternalList(BookRandomizationEntry.class);
}

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

@OneToMany(fetch = FetchType.LAZY, mappedBy = "sampleInternal")
private Set<DataPE> getDatasetsInternal() {
    return datasets;
}

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

/**
 *
 *///  ww  w . j a  v a2s. c om
@OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "container")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.LOCK })
public Set<CollectionObject> getCollectionObjects() {
    return this.collectionObjects;
}

From source file:org.dspace.orm.entity.Bitstream.java

@OneToMany(fetch = FetchType.LAZY, mappedBy = "logo")
public List<Community> getCommunities() {
    return communities;
}

From source file:com.impetus.ankush.common.domain.Cluster.java

/**
 * Gets the logs.//from   w ww.j  av a 2  s  .c  om
 * 
 * @return the logs
 */
@OneToMany(mappedBy = CLUSTER_ID, fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
@JsonIgnore
public List<Log> getLogs() {
    return logs;
}

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

/**
 * @return the attributes//w ww  . j  a v  a 2s .  c  om
 */
@ManyToMany(cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, fetch = FetchType.LAZY, targetEntity = Attribute.class)
@JoinTable(name = "SURVEILLANCE_SET_ATTRIB", joinColumns = {
        @JoinColumn(name = "ID_SURVEILLANCE_SET") }, inverseJoinColumns = {
                @JoinColumn(name = "ID_ATTRIBUTE") })
@ForeignKey(name = "FK_SURVEILLANCE_SET_ATTRIB_1", inverseName = "FK_SURVEILLANCE_SET_ATTRIB_2")
public Set<Attribute> getAttributes() {
    return attributes;
}

From source file:com.hmsinc.epicenter.model.analysis.classify.ClassificationTarget.java

/**
 * @return the patientClass/*from ww  w .  java2 s.com*/
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "ID_PATIENT_CLASS", unique = false, nullable = false, insertable = true, updatable = true)
@ForeignKey(name = "FK_CLASSIFICATION_TARGET_3")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public PatientClass getPatientClass() {
    return patientClass;
}

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

/**
 * @return the geography/*from  w ww.jav  a2 s  .c  om*/
 */
@ManyToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_GEOGRAPHY", unique = false, nullable = false, insertable = true, updatable = true)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@ForeignKey(name = "FK_EVENT_2")
public Geography getGeography() {
    return geography;
}

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

/**
 * Gets the study personnels.//from  www .  j a v a  2s  . co m
 *
 * @return the study personnels
 */
@OneToMany(mappedBy = "siteResearchStaff", fetch = FetchType.LAZY, orphanRemoval = true)
@Cascade(value = { CascadeType.ALL })
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
public List<StudyPersonnel> getStudyPersonnels() {
    return studyPersonnels;
}