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.infinities.skyport.entity.PermissionOperation.java

@XmlTransient
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "PARENTID")
public PermissionOperation getParent() {
    return parent;
}

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

@ForeignKey(name = "none")
@ManyToOne(fetch = FetchType.LAZY, optional = true)
@JoinColumn(referencedColumnName = "oid", updatable = false, insertable = false, nullable = true)
@NotFound(action = NotFoundAction.IGNORE)
@NotQueryable/*from w  w  w.  j a va  2s  .  c  om*/
// only for HQL use
public RObject getTarget() {
    return null;
}

From source file:com.aistor.modules.sys.entity.Role.java

@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "sys_user_role", joinColumns = { @JoinColumn(name = "role_id") }, inverseJoinColumns = {
        @JoinColumn(name = "user_id") })
@Where(clause = "del_flag='" + DEL_FLAG_NORMAL + "'")
@OrderBy("id")//  w  w  w .j a  v  a2 s .c o  m
@Fetch(FetchMode.SUBSELECT)
@NotFound(action = NotFoundAction.IGNORE)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public List<User> getUserList() {
    return userList;
}

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

@OneToMany(mappedBy = "articleCategory", fetch = FetchType.LAZY)
public Set<Article> getArticles() {
    return articles;
}

From source file:com.iterzp.momo.entity.Role.java

/**
 * ?
 * 
 * @return ?
 */
@ManyToMany(mappedBy = "roles", fetch = FetchType.LAZY)
public Set<Member> getMembers() {
    return members;
}

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

/**
 * ?  ??//  w ww.  jav a 2  s.  co  m
 * 
 * @return 
 */
@OneToMany(mappedBy = "cart", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
public Set<CartSetProductItem> getSetItems() {
    return setItems;
}

From source file:gov.nih.nci.caarray.domain.contact.Person.java

/**
 * Gets the affiliations.//www .  j a  v a  2  s  .  co m
 *
 * @return the affiliations
 */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "personorganization", joinColumns = {
        @JoinColumn(name = "person_id") }, inverseJoinColumns = { @JoinColumn(name = "organization_id") })
@ForeignKey(name = "perorg_person_fk", inverseName = "perorg_organization_fk")
@Cascade(org.hibernate.annotations.CascadeType.SAVE_UPDATE)
@BatchSize(size = AbstractCaArrayObject.DEFAULT_BATCH_SIZE)
public Set<Organization> getAffiliations() {
    return this.affiliations;
}

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

/**
 * @return the configuration//from   ww  w .  ja v  a2s. c  o  m
 */
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
@JoinColumns({ @JoinColumn(name = "clusterId", referencedColumnName = "clusterId"),
        @JoinColumn(name = "host", referencedColumnName = "publicIp") })
public List<Event> getEvents() {
    return events;
}

From source file:com.hmsinc.epicenter.model.permission.PasswordResetToken.java

/**
 * @return the user/*from   w ww  . ja v  a 2 s .  c  o  m*/
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "ID_APP_USER", unique = false, nullable = false, insertable = true, updatable = true)
@ForeignKey(name = "FK_APP_USER_TOKEN_1")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public EpiCenterUser getUser() {
    return user;
}

From source file:fr.mael.microrss.domain.User.java

@OneToMany(fetch = FetchType.LAZY, mappedBy = "user")
public Set<UserArticle> getUserArticles() {
    return this.userArticles;
}