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.jasperreports.hrdb.Employee.java

@JsonIgnoreProperties({ "employeeByManagerid", "employeesForManagerid" })
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "employeeByManagerid")
public List<Employee> getEmployeesForManagerid() {
    return this.employeesForManagerid;
}

From source file:com.sccl.attech.modules.sys.entity.Menu.java

@ManyToMany(mappedBy = "menuList", fetch = FetchType.LAZY)
@Where(clause = "del_flag='" + DEL_FLAG_NORMAL + "'")
@OrderBy("id")//from  w w  w .j  a va2 s .  co  m
@Fetch(FetchMode.SUBSELECT)
@NotFound(action = NotFoundAction.IGNORE)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@JsonIgnore
public List<Role> getRoleList() {
    return roleList;
}

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

/**
 * Gets the array.//from w  ww . j  a  v  a  2s . c  o  m
 *
 * @return the array
 */
@ManyToOne(fetch = FetchType.LAZY)
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.DELETE })
@ForeignKey(name = "hybridization_array_fk")
public Array getArray() {
    return this.array;
}

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

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

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

/**
 * Gets the study site./*from ww  w. ja va 2s  . c  o  m*/
 *
 * @return the study site
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "study_site_id")
@Cascade({ CascadeType.LOCK })
public StudySite getStudySite() {
    return studySite;
}

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

/**
 * @return the members/*from   w w  w .jav a  2  s .c o m*/
 */
@OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "division")
@org.hibernate.annotations.Cascade({ org.hibernate.annotations.CascadeType.ALL,
        org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
public Set<Agent> getMembers() {
    return members;
}

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

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

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

/**
 * ??//from  w w w . ja  va 2 s.com
 * 
 * @return ?
 */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_product_category_brand")
@OrderBy("order asc")
public Set<Brand> getBrands() {
    return brands;
}

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

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "hu_kou_photo")
public AuthenticationMaterials getHuKouPhoto() {
    return this.huKouPhoto;
}

From source file:ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE.java

@Private
@OneToMany(fetch = FetchType.LAZY, mappedBy = "group")
public List<ProjectPE> getProjects() {
    return projects;
}