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:onl.netfishers.netshot.device.DeviceGroup.java

/**
 * Gets the snapshot tasks./* w  ww  .j av a2 s. c  o m*/
 *
 * @return the snapshot tasks
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "deviceGroup")
public List<TakeGroupSnapshotTask> getSnapshotTasks() {
    return snapshotTasks;
}

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

/**
 * Gets the contact mechanism based recipient internal.
 * //from  w w w .  j a v a 2  s  . co  m
 * @return the contact mechanism based recipient internal
 */
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@Cascade(value = { CascadeType.ALL })
@JoinColumn(name = "planned_notfns_id", nullable = false)
@Where(clause = "DTYPE = 'CMR' and retired_indicator  = 'false'")
public List<ContactMechanismBasedRecipient> getContactMechanismBasedRecipientInternal() {
    return lazyListHelper.getInternalList(ContactMechanismBasedRecipient.class);
}

From source file:edu.harvard.med.screensaver.model.AttachedFile.java

@ManyToOne(fetch = FetchType.LAZY, cascade = { CascadeType.MERGE })
@JoinColumn(name = "attachedFileTypeId", nullable = false)
@org.hibernate.annotations.ForeignKey(name = "fk_attached_file_to_attached_file_type")
@org.hibernate.annotations.LazyToOne(value = org.hibernate.annotations.LazyToOneOption.PROXY)
@org.hibernate.annotations.Cascade(value = { org.hibernate.annotations.CascadeType.SAVE_UPDATE })
@edu.harvard.med.screensaver.model.annotations.ToOne(unidirectional = true)
public AttachedFileType getFileType() {
    return _fileType;
}

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

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "subscription", joinColumns = {
        @JoinColumn(name = "eperson_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "collection_id", nullable = false) })
public List<Eperson> getEpersons() {
    return epersons;
}

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

/**
 * Gets the report./*  w  w  w  . j av  a2 s  .c o  m*/
 *
 * @return the report
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "report_id", insertable = false, updatable = false, nullable = false)
public Report getReport() {
    return report;
}

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

/**
 * @return the result/*from w  ww .j av a  2s.c o  m*/
 */
@Column(name = "RESULT", unique = false, nullable = true, insertable = true, updatable = true)
@Basic(fetch = FetchType.LAZY)
@Type(type = "com.hmsinc.hibernate.xml.XMLType", parameters = {
        @Parameter(name = "contextPath", value = "com.hmsinc.epicenter.model:com.hmsinc.ts4j") })
public SurveillanceResult getResult() {
    return result;
}

From source file:com.doculibre.constellio.entities.Record.java

@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval = true)
public ParsedContent getParsedContent() {
    return parsedContent;
}

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

/**
 * @return the numberingSchemes/*from w w w. j  a  v a 2s.c  o  m*/
 */
@ManyToMany(cascade = {}, fetch = FetchType.LAZY)
@JoinTable(name = "autonumsch_div", joinColumns = {
        @JoinColumn(name = "DivisionID", unique = false, nullable = false, insertable = true, updatable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "AutoNumberingSchemeID", unique = false, nullable = false, insertable = true, updatable = false) })
public Set<AutoNumberingScheme> getNumberingSchemes() {
    return numberingSchemes;
}

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

/**
 * @return the createdBy/* w w w  . j  a v  a  2s . co  m*/
 */
@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_APP_USER_CREATED_BY", unique = false, nullable = true, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_INVESTIGATION_4")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public EpiCenterUser getCreatedBy() {
    return createdBy;
}

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

/**
 *
 *///from  w  w w.j av  a 2s  .  c  om
@ManyToOne(fetch = FetchType.LAZY)
@Cascade({ CascadeType.ALL, CascadeType.DELETE_ORPHAN })
@JoinColumn(name = "GeographyTreeDefID", nullable = false)
public GeographyTreeDef getGeographyTreeDef() {
    return this.geographyTreeDef;
}