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

/**
 * @return the geography/*from w ww.  java2s .  co m*/
 */
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "GeographyID", unique = false, nullable = false, insertable = true, updatable = true)
public Geography getGeography() {
    return geography;
}

From source file:com.infinities.keystone4j.model.identity.Group.java

@JsonView(Views.All.class)
@OneToMany(fetch = FetchType.LAZY, mappedBy = "group", cascade = CascadeType.ALL)
public Set<UserGroupMembership> getUserGroupMemberships() {
    return userGroupMemberships;
}

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

@OneToMany(fetch = FetchType.LAZY, mappedBy = "parent", cascade = CascadeType.REMOVE)
public Set<Organization> getOrganizations() {
    return organizations;
}

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

@XmlTransient
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "SCOPEID")
public Scope getScope() {
    return this.scope;
}

From source file:com.infinities.keystone4j.model.assignment.Project.java

@JsonView(Views.All.class)
@Override/* w w  w .j av a  2  s. c o m*/
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "DOMAINID", nullable = false)
public Domain getDomain() {
    return domain;
}

From source file:com.lcw.one.modules.sys.entity.Menu.java

@ManyToMany(mappedBy = "menuList", fetch = FetchType.LAZY)
@Where(clause = "del_flag='" + DEL_FLAG_NORMAL + "'")
@OrderBy("id")/*from   www  .  ja  v a 2 s  . c o  m*/
@Fetch(FetchMode.SUBSELECT)
@NotFound(action = NotFoundAction.IGNORE)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public List<Role> getRoleList() {
    return roleList;
}

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

/**
 * @return the classifier//from   w  w w . ja  va  2s  . co  m
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "ID_CLASSIFIER", unique = false, nullable = false, insertable = true, updatable = true)
@ForeignKey(name = "FK_CLASSIFICATION_TARGET_1")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public Classifier getClassifier() {
    return classifier;
}

From source file:org.meruvian.yama.repository.jpa.user.JpaUser.java

@JsonIgnore
@OneToMany(mappedBy = "user", cascade = { CascadeType.REMOVE }, fetch = FetchType.LAZY)
public List<JpaUserRole> getRoles() {
    return roles;
}

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

/**
 * @return the investigation//  w  ww  .  ja  v a  2s .  c om
 */
@ManyToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_INVESTIGATION", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_ACTIVITY_2")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public Investigation getInvestigation() {
    return investigation;
}

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

/**
 * AgentID of group/*from  w w  w .  j ava2 s  .  c  o  m*/
 */
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "GroupID", unique = false, nullable = false, insertable = true, updatable = true)
public Agent getGroup() {
    return this.group;
}