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:gov.nih.nci.cabig.caaers.domain.Investigator.java

/**
 * Gets the site investigators internal.
 *
 * @return the site investigators internal
 *//*w ww.ja va  2  s.  c  om*/
@OneToMany(mappedBy = "investigator", fetch = FetchType.LAZY, orphanRemoval = true)
@Cascade(value = { CascadeType.ALL })
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
public List<SiteInvestigator> getSiteInvestigatorsInternal() {
    return lazyListHelper.getInternalList(SiteInvestigator.class);
}

From source file:com.infinities.skyport.compute.entity.ComputeObject.java

@Override
@OneToMany(fetch = FetchType.LAZY, mappedBy = "templateBaseEntity", cascade = CascadeType.ALL)
public NetworkAdapters getNics() {
    return nics;
}

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

/**
 * @return the division//from www  .  j a v a 2 s  .  c  o m
 */
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "DivisionID", unique = false, nullable = false, insertable = true, updatable = true)
public Division getDivision() {
    return division;
}

From source file:gov.nih.nci.caarray.domain.hybridization.Hybridization.java

/**
 * Gets the images./*from   ww w.  ja v a 2s .c o  m*/
 *
 * @return the images
 */
@OneToMany(mappedBy = MAPPED_BY, fetch = FetchType.LAZY)
@Cascade(CascadeType.DELETE)
public Set<Image> getImages() {
    return this.images;
}

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

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

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

/**
 * @return the workflow/*from  w  w  w .  ja  va 2s. c  o m*/
 */
@ManyToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_WORKFLOW", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_WORKFLOW_STATE_1")
public Workflow getWorkflow() {
    return workflow;
}

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

/**
 * @return the geography//  ww  w  .  ja  v a 2  s  .co m
 */
@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_GEOGRAPHY", unique = false, nullable = false, insertable = true, updatable = true)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@org.hibernate.annotations.ForeignKey(name = "FK_AUTHORIZED_REGION_2")
public Geography getGeography() {
    return geography;
}

From source file:edu.uiowa.icts.bluebutton.domain.LabTest.java

/*****labTestRanges*****/
@OneToMany(fetch = FetchType.LAZY, mappedBy = "labTest", targetEntity = LabTestRange.class, cascade = CascadeType.REMOVE)
public Set<LabTestRange> getLabTestRanges() {
    return labTestRanges;
}

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

/**
*
*///w  w  w. j  a  v  a  2  s  .c  o m
@ManyToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "spPrincipals")
public Set<SpecifyUser> getSpecifyUsers() {
    return this.specifyUsers;
}

From source file:com.ineunet.knife.security.entity.Tenant.java

@JsonIgnore
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "knife_tenants_roles")
@Cascade(value = CascadeType.ALL)//from   w  w w. j  a v a  2  s  . c  o m
public Set<Role> getRoles() {
    return roles;
}