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:edu.ku.brc.specify.datamodel.AccessionAgent.java

/**
 *      * Accession in which the Agent played a role
 *//*from   w ww. j  av a  2  s.  com*/
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "AccessionID", unique = false, nullable = true, insertable = true, updatable = true)
public Accession getAccession() {
    return this.accession;
}

From source file:com.infinities.skyport.compute.entity.ComputeObject.java

@Override
@OneToMany(fetch = FetchType.LAZY, mappedBy = "templateBaseEntity", cascade = CascadeType.ALL)
public Disks getDisks() {
    return disks;
}

From source file:com.hmsinc.epicenter.model.analysis.DataType.java

/**
 * @return the targets//from  w w  w .  j av a2 s  .c o  m
 */
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "dataType")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public Set<ClassificationTarget> getTargets() {
    return targets;
}

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

/**
 * ?/* w w w. java 2s. c  o m*/
 * 
 * @return 
 */
@OneToMany(mappedBy = "parent", fetch = FetchType.LAZY)
@OrderBy("order asc")
public Set<ShopCategory> getChildren() {
    return children;
}

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

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "workflow_step_1", nullable = true)
public EpersonGroup getWorkflowStep1() {
    return workflowStep1;
}

From source file:com.impetus.ankush.common.domain.Node.java

/**
 * Gets the monitors.//  w w  w .j a  v a  2 s  .  c o  m
 * 
 * @return the monitors
 */
@OneToMany(mappedBy = "nodeId", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
@JsonIgnore
public List<NodeMonitoring> getMonitors() {
    return monitors;
}

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

/**
 * ?/*from  ww  w .ja v a 2  s .co  m*/
 * 
 * @return 
 */
@OneToMany(mappedBy = "parent", fetch = FetchType.LAZY)
@OrderBy("order asc")
public Set<ArticleCategory> getChildren() {
    return children;
}

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

@OneToMany(mappedBy = "agent", fetch = FetchType.LAZY, orphanRemoval = true)
@Cascade({ CascadeType.LOCK, CascadeType.SAVE_UPDATE })
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
//@Transient/*from w w  w  .  j a v a 2  s.c o  m*/
public List<AgentSpecificTerm> getAgentSpecificTerms() {
    return agentSpecificTerms;
}

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

/**
 *      * The CollectingEvent the agent participated in
 *///  w  ww. j  ava  2s  .c  o  m
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "CollectingEventID", nullable = false)
public CollectingEvent getCollectingEvent() {
    return this.collectingEvent;
}

From source file:com.hmsinc.epicenter.model.analysis.classify.ClassificationTarget.java

/**
 * @return the dataType//from www. ja va2 s.com
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "ID_DATA_TYPE", unique = false, nullable = false, insertable = true, updatable = true)
@ForeignKey(name = "FK_CLASSIFICATION_TARGET_2")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public DataType getDataType() {
    return dataType;
}