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.hmsinc.epicenter.model.health.Interaction.java

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "ID_AGE_GROUP", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_INTERACTION_1")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public AgeGroup getAgeGroup() {
    return this.ageGroup;
}

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

/**
 *
 *//*from ww  w  .  j  av a 2s . c  o  m*/
@ManyToOne(fetch = FetchType.LAZY)
@Cascade({ CascadeType.ALL })
@JoinColumn(name = "GeologicTimePeriodTreeDefID", nullable = false)
public GeologicTimePeriodTreeDef getGeologicTimePeriodTreeDef() {
    return this.geologicTimePeriodTreeDef;
}

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

/**
 * ??//from   w  ww  .j a va2s.  c o m
 * 
 * @return ?
 */
@OneToMany(mappedBy = "coupon", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
public Set<CouponCode> getCouponCodes() {
    return couponCodes;
}

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

/**
 * ?
 * 
 * @return 
 */
@ManyToOne(fetch = FetchType.LAZY)
public Shop getShop() {
    return shop;
}

From source file:org.dspace.orm.entity.Item.java

@OneToMany(fetch = FetchType.LAZY, mappedBy = "")
public List<Collection> getTemplateItemCollections() {
    return templateItemCollections;
}

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

@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = TableNames.AUTHORIZATION_GROUP_PERSONS_TABLE, joinColumns = {
        @JoinColumn(name = ColumnNames.PERSON_ID_COLUMN, updatable = false) }, inverseJoinColumns = {
                @JoinColumn(name = ColumnNames.AUTHORIZATION_GROUP_ID_COLUMN, updatable = false) })
final Set<AuthorizationGroupPE> getAuthorizationGroupsInternal() {
    return authorizationGroups;
}

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

/**
 *
 *///from   ww  w  . j a v a 2 s  .co m
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "AgentID", unique = false, nullable = true, insertable = true, updatable = true)
public Agent getAgent() {
    return this.agent;
}

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

@OneToMany(mappedBy = "company", fetch = FetchType.LAZY)
@Where(clause = "del_flag='" + DEL_FLAG_NORMAL + "'")
@OrderBy(value = "id")
@Fetch(FetchMode.SUBSELECT)/*from   ww  w. j  a v a 2s. com*/
@NotFound(action = NotFoundAction.IGNORE)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@JsonIgnore
public List<SmsRecords> getRecordsList() {
    return recordsList;
}

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

/*****clinicalDocuments*****/
@OneToMany(fetch = FetchType.LAZY, mappedBy = "person", targetEntity = ClinicalDocument.class, cascade = CascadeType.REMOVE)
public Set<ClinicalDocument> getClinicalDocuments() {
    return clinicalDocuments;
}

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

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