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.caarray.domain.sample.Sample.java

/**
 * Gets the extracts.//from w ww.  j a  va  2 s  .  co  m
 *
 * @return the extracts
 */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "sampleextract", joinColumns = {
        @javax.persistence.JoinColumn(name = "sample_id") }, inverseJoinColumns = {
                @javax.persistence.JoinColumn(name = "extract_id") })
@ForeignKey(name = "sampleextract_sample_fk", inverseName = "sampleextract_extract_fk")
@Cascade(org.hibernate.annotations.CascadeType.SAVE_UPDATE)
public Set<Extract> getExtracts() {
    return this.extracts;
}

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

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

From source file:com.testing26thjuly_.wmstudio.Table29.java

@JsonIgnoreProperties({ "table29ByColumn3", "table29sForColumn3" })
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "table29ByColumn3")
public List<Table29> getTable29sForColumn3() {
    return this.table29sForColumn3;
}

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

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "PERMISSIONID")
public PermissionOperation getPermissionOperation() {
    return this.permissionOperation;
}

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

@ForeignKey(name = "fk_case_wi_reference_owner")
@MapsId("workItem")
@ManyToOne(fetch = FetchType.LAZY)
@NotQueryable/*  w w  w. ja  va  2 s  .  co m*/
public RCaseWorkItem getOwner() {
    return owner;
}

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

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

From source file:net.groupbuy.entity.ParameterGroup.java

/**
 * ??/* w w  w  .  j a  v a 2s  . c  o  m*/
 * 
 * @return ?
 */
@JsonProperty
@Valid
@NotEmpty
@OneToMany(mappedBy = "parameterGroup", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)
@OrderBy("order asc")
public List<Parameter> getParameters() {
    return parameters;
}

From source file:com.mycompany.model.Idea.java

@OneToMany(mappedBy = "parent", fetch = FetchType.LAZY)
public Set<Idea> getChildren() {
    return children;
}

From source file:com.lcw.one.common.persistence.DataEntity.java

@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
@NotFound(action = NotFoundAction.IGNORE)
public User getCreateBy() {
    return createBy;
}

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

/**
 * Gets web resource.// w  w  w. ja va2s  . co m
 *
 * @return the web resource
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "web_resource_id", nullable = false)
public WebResource getWebResource() {
    return webResource;
}