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.dhenton9000.birt.persistence.entities.Orders.java

/**
 * @return the orderDetails//from   w w  w .j  a  va  2  s .c  o  m
 */
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@JoinColumn(name = "ORDERNUMBER", nullable = false)
@JsonManagedReference
public Set<OrderDetails> getOrderDetails() {
    return orderDetails;
}

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

/**
 * ??
 * 
 * @return ?
 */
@OneToMany(mappedBy = "productCategory", fetch = FetchType.LAZY)
public Set<Product> getProducts() {
    return products;
}

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

/**
 * @return the preparations/*from ww  w .j  ava  2  s .co  m*/
 */
@OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "preparationAttribute")
public Set<Preparation> getPreparations() {
    return preparations;
}

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

@OneToMany(mappedBy = "healthcareSite", fetch = FetchType.LAZY, orphanRemoval = true)
@Cascade(value = { CascadeType.DELETE })
public List<StudyOrganization> getStudyOrganizations() {
    return studyOrganizations;
}

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

@ManyToOne(fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST, CascadeType.MERGE })
@JoinColumn(name = "screensaverUserId", nullable = true, updatable = false)
@org.hibernate.annotations.ForeignKey(name = "fk_attached_file_to_screening_room_user")
@org.hibernate.annotations.LazyToOne(value = org.hibernate.annotations.LazyToOneOption.PROXY)
@ToOne(hasNonconventionalSetterMethod = true /* mutually-exclusive parenting relationships */)
public ScreeningRoomUser getScreeningRoomUser() {
    return _screeningRoomUser;
}

From source file:com.infinities.skyport.entity.User.java

@XmlTransient
@OneToMany(fetch = FetchType.LAZY, mappedBy = "user", cascade = CascadeType.REMOVE)
public Set<TaskEvent> getTaskEvents() {
    return this.taskEvents;
}

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

/**
 * Gets the study personnels internal.//from   w w w. j  a  v  a2 s .  com
 *
 * @return the study personnels internal
 */
@OneToMany(mappedBy = "studyOrganization", fetch = FetchType.LAZY, orphanRemoval = true)
@Cascade(value = { CascadeType.ALL })
@UniqueObjectInCollection(message = "Duplicates found in StudyPersonnel list")
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
public List<StudyPersonnel> getStudyPersonnelsInternal() {
    return lazyListHelper.getInternalList(StudyPersonnel.class);
}

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

/**
 * @return the method//  w w  w.j  a va 2 s  .c  om
 */
@ManyToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_SURVEILLANCE_METHOD", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_ANOMALY_2")
public SurveillanceMethod getMethod() {
    return method;
}

From source file:com.esoft.jdp2p.borrower.model.BorrowerAuthentication.java

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "hu_kou_scan")
public AuthenticationMaterials getHuKouScan() {
    return this.huKouScan;
}

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

/**
 * @return the state/*from   www .  j ava  2s .  com*/
 */
@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_WORKFLOW_STATE", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_INVESTIGATION_1")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public WorkflowState getState() {
    return state;
}