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.dp2345.entity.Cart.java

/**
 * ?/* w  ww.  java2 s.c  o m*/
 * 
 * @return 
 */
@OneToMany(mappedBy = "cart", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
public Set<CartItem> getCartItems() {
    return cartItems;
}

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

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "study_site_ver_id", nullable = false)
@Cascade({ CascadeType.LOCK })/*from   ww  w  .j a va  2s.  c om*/
public StudySiteStudyVersion getStudySiteStudyVersion() {
    return studySiteStudyVersion;
}

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

/**
 * Gets the assignment.
 *
 * @return the assignment
 */
@ManyToOne(fetch = FetchType.LAZY)
public StudyParticipantAssignment getAssignment() {
    return assignment;
}

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

/**
 * @return the user/*from  w  w w .  ja  va  2 s . c o m*/
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "ID_APP_USER", unique = false, nullable = false, insertable = true, updatable = true)
@ForeignKey(name = "FK_AUDIT_EVENT_1")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public EpiCenterUser getUser() {
    return user;
}

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

/**
 * @return the agent/*from ww w . ja  v a2  s.  c  o m*/
 */
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "AgentID", unique = false, nullable = false, insertable = true, updatable = true)
public Agent getAgent() {
    return agent;
}

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

/**
 * Gets the recipient scheduled notification internal.
 * //from w  w  w  .  j  av  a 2 s .  c  om
 * @return the recipient scheduled notification internal
 */
@OneToMany(fetch = FetchType.LAZY)
@Cascade(value = { CascadeType.SAVE_UPDATE, CascadeType.MERGE })
@JoinColumn(name = "schld_notfns_id")
@Where(clause = "retired_indicator  = 'false'")
public List<RecipientScheduledNotification> getRecipientScheduledNotificationInternal() {
    return lazyListHelper.getInternalList(RecipientScheduledNotification.class);
}

From source file:gov.nih.nci.protexpress.domain.protocol.InputOutputObject.java

/**
 * Gets the outputOfProtocolApplication.
 *
 * @return the outputOfProtocolApplication.
 *///  w  w  w.  j a v a  2  s  .c o  m
@OneToOne(fetch = FetchType.LAZY)
@JoinTable(name = "protapp_outputs", joinColumns = { @JoinColumn(name = "output_id") }, inverseJoinColumns = {
        @JoinColumn(name = "protapp_id") })
public ProtocolApplication getOutputOfProtocolApplication() {
    return outputOfProtocolApplication;
}

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

@OneToOne(fetch = FetchType.LAZY)
@PrimaryKeyJoinColumn
public BorrowerInfo getBorrowerInfo() {
    return this.borrowerInfo;
}

From source file:com.hmsinc.epicenter.model.attribute.AgeGroup.java

@OneToMany(fetch = FetchType.LAZY, mappedBy = "ageGroup")
public Set<Interaction> getInteractions() {
    return this.interactions;
}

From source file:com.aistor.modules.sys.entity.Role.java

@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "sys_role_menu", joinColumns = { @JoinColumn(name = "role_id") }, inverseJoinColumns = {
        @JoinColumn(name = "menu_id") })
@Where(clause = "del_flag='" + DEL_FLAG_NORMAL + "'")
@OrderBy("id")//w w  w . j a  v a 2 s.  c  o  m
@Fetch(FetchMode.SUBSELECT)
@NotFound(action = NotFoundAction.IGNORE)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public List<Menu> getMenuList() {
    return menuList;
}