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:org.dspace.orm.entity.Collection.java

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

From source file:com.evolveum.midpoint.repo.sql.data.common.embedded.REmbeddedReference.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  2  s  .c  o  m
public RObject getTarget() {
    return target;
}

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

@ForeignKey(name = "fk_acc_cert_wi_ref_owner") // max. 30 chars (Oracle)
@MapsId("workItem")
@ManyToOne(fetch = FetchType.LAZY)
@NotQueryable/*from ww  w.j  ava 2  s.c  o m*/
public RAccessCertificationWorkItem getOwner() {
    return owner;
}

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

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

From source file:com.bahadirakin.persistance.model.CustomerOrder.java

@ManyToOne(targetEntity = Customer.class, fetch = FetchType.LAZY)
@JoinColumn(name = "customerid", referencedColumnName = "id", updatable = true, insertable = true)
public Customer getCustomer() {
    return customer;
}

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

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

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

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "submitter_id", nullable = true)
public Eperson getSubmitter() {
    return submitter;
}

From source file:com.ravipatel.statusserver.models.User.java

@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "company_id", nullable = false)
public Company getCompany() {
    return this.company;
}

From source file:com.eryansky.entity.base.Role.java

@ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY)
@JoinTable(name = "T_BASE_ROLE_RESOURCE", joinColumns = {
        @JoinColumn(name = "ROLE_ID") }, inverseJoinColumns = { @JoinColumn(name = "RESOURCE_ID") })
//    @Fetch(FetchMode.SUBSELECT)
@OrderBy("id")/*from w  w w .j  ava2 s .c  om*/
//    @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE,region = CacheConstants.HIBERNATE_CACHE_BASE)
public List<Resource> getResources() {
    return resources;
}

From source file:com.sccl.attech.modules.sys.entity.Area.java

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "parent_id")
@NotFound(action = NotFoundAction.IGNORE)
@JsonIgnore
public Area getParent() {
    return parent;
}