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 = "account_flow")
public AuthenticationMaterials getAccountFlow() {
    return this.accountFlow;
}

From source file:com.hrdb.Employee.java

@JsonInclude(Include.NON_EMPTY)
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.REMOVE, mappedBy = "employee")
public List<Vacation> getVacations() {
    return this.vacations;
}

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

/**
 * @return the pageSets//from   ww  w. j  a v a2 s.c  o m
 */
@OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "fieldNotebook")
@org.hibernate.annotations.Cascade({ org.hibernate.annotations.CascadeType.ALL,
        org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
@OrderBy("startDate ASC")
public Set<FieldNotebookPageSet> getPageSets() {
    return pageSets;
}

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

/**
 * /* w  ww.  j a va  2s.c o  m*/
 */
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "ParentID")
public Container getParent() {
    return this.parent;
}

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

/**
 * @return the organization/*from   w  ww. j a  v a 2  s.  c  om*/
 */
@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_ORGANIZATION", unique = false, nullable = false, insertable = true, updatable = true)
@ForeignKey(name = "FK_SURVEILLANCE_TASK_2")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public Organization getOrganization() {
    return organization;
}

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

/**
 * @return the transitionsTo// ww  w.j  a v  a 2s .c o m
 */
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "toState")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Sort(type = SortType.NATURAL)
public SortedSet<WorkflowTransition> getTransitionsTo() {
    return transitionsTo;
}

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

/**
 * ?//  w  w  w . j  a  v  a2s  .c  om
 * 
 * @return 
 */
@OneToMany(mappedBy = "productCategory", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
@OrderBy("order asc")
public Set<Attribute> getAttributes() {
    return attributes;
}

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

@Override
@OneToMany(targetEntity = MedicationRouteLinkImpl.class, mappedBy = "medication", fetch = FetchType.LAZY)
public Set<MedicationRouteLink> getRoutes() {
    return routes;
}

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

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "prt_id", nullable = false)
public Participant getMasterSubject() {
    return masterSubject;
}

From source file:gov.nih.nci.caarray.domain.sample.AbstractBioMaterial.java

/**
 * Gets the characteristics./*ww w  .  j a va  2 s.  c o  m*/
 *
 * @return the characteristics
 */
@OneToMany(mappedBy = "bioMaterial", fetch = FetchType.LAZY)
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.DELETE })
public Set<AbstractCharacteristic> getCharacteristics() {
    return this.characteristics;
}