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.protocol.ProtocolApplication.java

/**
 * Gets the values./*www  .j a v  a 2  s. c om*/
 *
 * @return the values
 */
@OneToMany(mappedBy = "protocolApplication", fetch = FetchType.LAZY)
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.DELETE })
public Set<AbstractParameterValue> getValues() {
    return values;
}

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

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "group2groupcache", joinColumns = {
        @JoinColumn(name = "parent_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "child_id", nullable = false) })
public List<EpersonGroup> getAllChilds() {
    return allChilds;
}

From source file:org.meruvian.yama.core.user.User.java

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

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

@OneToMany(fetch = FetchType.LAZY, mappedBy = "user")
public Set<UserFeed> getUserFeeds() {
    return this.userFeeds;
}

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

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "community2collection", joinColumns = {
        @JoinColumn(name = "community_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "collection_id", nullable = false) })
public List<Collection> getCollections() {
    return collections;
}

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

@XmlTransient
@Override
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "DOMAINID", nullable = false)
public Domain getDomain() {
    return domain;
}

From source file:com.oakhole.sms.entity.SmsTask.java

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "owner")
public User getOwner() {
    return owner;
}

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

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, orphanRemoval = true, mappedBy = "document")
@MapKey(name = "offset")
@Override//w  ww  .j  a  va  2s . c o m
public Map<Integer, Fragment> getFragments() {
    return fFragments;
}

From source file:com.evolveum.midpoint.repo.sql.data.common.container.RCertCaseReference.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  ww . j  a  v a 2  s  . c  om
public RObject getTarget() {
    return super.getTarget();
}

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

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