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:gov.nih.nci.cabig.caaers.domain.TreatmentAssignment.java

@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "treatment_assignment_id", nullable = false)
@OrderBy//from  w w w  .  ja va2 s.  c  om
@Cascade(value = { CascadeType.ALL })
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
public List<AbstractStudyInterventionExpectedAE> getAbstractStudyInterventionExpectedAEs() {
    return abstractStudyInterventionExpectedAEs;
}

From source file:com.lingxiang2014.entity.ArticleCategory.java

@ManyToOne(fetch = FetchType.LAZY)
public ArticleCategory getParent() {
    return parent;
}

From source file:com.infinities.keystone4j.model.catalog.Region.java

@JsonView(Views.All.class)
@OneToMany(fetch = FetchType.LAZY, mappedBy = "region", cascade = CascadeType.ALL)
public Set<Endpoint> getEndpoints() {
    return endpoints;
}

From source file:com.evolveum.midpoint.repo.sql.data.common.RObjectTextInfo.java

@ForeignKey(name = "fk_object_text_info_owner")
@MapsId("owner")
@ManyToOne(fetch = FetchType.LAZY)
@NotQueryable
public RObject getOwner() {
    return owner;
}

From source file:ca.mcgill.cs.swevo.qualyzer.model.AnnotatedDocument.java

@ManyToMany(fetch = FetchType.LAZY)
@CollectionId(columns = @Column(name = "COL_ID"), type = @Type(type = "string"), generator = "uuid-gen")
@Override/*from   w w w .  ja  va2 s.c o m*/
public List<Participant> getParticipants() {
    return fParticipants;
}

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

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "collection2item", joinColumns = {
        @JoinColumn(name = "collection_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "item_id", nullable = false) })
public List<Item> getItems() {
    return items;
}

From source file:com.evolveum.midpoint.repo.sql.data.common.RObjectReference.java

@ForeignKey(name = "none")
@ManyToOne(fetch = FetchType.LAZY, optional = true, targetEntity = RObject.class)
@JoinColumn(referencedColumnName = "oid", updatable = false, insertable = false, nullable = true)
@NotFound(action = NotFoundAction.IGNORE)
@NotQueryable//from w  ww. j  a  v  a 2s.c o m
public T getTarget() {
    return target;
}

From source file:gov.nih.nci.caarray.domain.MultiPartBlob.java

/**
 * The blobParts as stored by hibernate.
 * /*  w ww.  j a  va 2  s  .  c  o  m*/
 * @return the blobParts the blobParts.
 */
@OneToMany(fetch = FetchType.LAZY)
@IndexColumn(name = "contents_index")
@Cascade(value = CascadeType.ALL)
public List<BlobHolder> getBlobParts() {
    return this.blobParts;
}

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

@XmlTransient
@OneToMany(fetch = FetchType.LAZY, mappedBy = "permissionOperation", cascade = CascadeType.REMOVE)
public Set<RolePermission> getRolePermissions() {
    return this.rolePermissions;
}

From source file:de.iew.framework.domain.security.WebResourceAccessRule.java

/**
 * Gets authority.//  w  w  w  .j a  v a2  s  .c o  m
 *
 * @return the authority
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "authority_id", nullable = true)
public Authority getAuthority() {
    return authority;
}