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.ProductCategory.java

/**
 * ?//ww  w. j  a v  a  2s.  c om
 * 
 * @return 
 */
@ManyToMany(mappedBy = "productCategories", fetch = FetchType.LAZY)
public Set<Promotion> getPromotions() {
    return promotions;
}

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

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "student_id")
public AuthenticationMaterials getStudentId() {
    return this.studentId;
}

From source file:gov.nih.nci.firebird.data.CtepFinancialDisclosure.java

/**
 * Financial disclosure - List of pharmaceutical companies.
 * Field 5 in the PDF Form//ww w  .j av a  2  s  .c  o  m
 *
 * @return Organizations
 */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "ctep_financial_disclosure_pharmaceuticals", joinColumns = @JoinColumn(name = "disclosure"), inverseJoinColumns = @JoinColumn(name = "pharmaceutical"))
@ForeignKey(name = "ctep_financial_disclosure_fkey", inverseName = "pharmaceutical_fkey")
@Cascade({ org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.MERGE,
        org.hibernate.annotations.CascadeType.REFRESH })
@Sort(type = SortType.NATURAL)
public List<Organization> getPharmaceuticalCompanies() {
    return pharmaceuticalCompanies;
}

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

@OneToMany(mappedBy = "office", fetch = FetchType.LAZY)
@Where(clause = "del_flag='" + DEL_FLAG_NORMAL + "'")
@OrderBy(value = "id")
@Fetch(FetchMode.SUBSELECT)/*from w  w  w  . j  a v a2  s.c  o  m*/
@NotFound(action = NotFoundAction.IGNORE)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@JsonIgnore
public List<User> getUserList() {
    return userList;
}

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

@Override
@OneToMany(targetEntity = MedicationCustomGroupMemberImpl.class, mappedBy = "medication", fetch = FetchType.LAZY)
public Set<MedicationCustomGroupMember> getCustomGroupMembers() {
    return customGroupMembers;
}

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

/**
 * @return the technicalContacts//from ww  w . ja  v a 2 s. co m
 */
@OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "instTechContact")
@org.hibernate.annotations.Cascade({ org.hibernate.annotations.CascadeType.ALL,
        org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
public Set<Agent> getTechnicalContacts() {
    return technicalContacts;
}

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

/**
 * ??//from  w  w  w.  ja v a2  s .  c  o m
 * 
 * @return ?
 */
@OneToMany(mappedBy = "set_product", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
public Set<SetProductItem> getSetProductItems() {
    return setProductItems;
}

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

/**
 * @return the authoritativeRegion//ww w  .j  av  a 2  s .co  m
 */
@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_GEOGRAPHY", unique = false, nullable = true, insertable = true, updatable = true)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@ForeignKey(name = "FK_ORGANIZATION_2")
public Geography getAuthoritativeRegion() {
    return authoritativeRegion;
}

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

@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "entity")
@Cascade(value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_PROPERTIES)
@Fetch(FetchMode.SUBSELECT)//from   w  w  w  . j  a v a  2  s  . c o  m
private Set<SamplePropertyPE> getSampleProperties() {
    return properties;
}

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

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "positional_titles")
public AuthenticationMaterials getPositionalTitles() {
    return this.positionalTitles;
}