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.oakhole.sms.entity.SmsTask.java

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "channel_group_id")
public ChannelGroup getChannelGroup() {
    return channelGroup;
}

From source file:com.testing26thjuly_.wmstudio.Table2.java

@JsonIgnoreProperties({ "table2ByMergeFirmId", "table2sForMergeFirmId" })
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "table2ByMergeFirmId")
public List<Table2> getTable2sForMergeFirmId() {
    return this.table2sForMergeFirmId;
}

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

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "tasklistitem", joinColumns = {
        @JoinColumn(name = "workflow_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "eperson_id", nullable = false) })
public List<Eperson> getEpersons() {
    return epersons;
}

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

@OneToMany(fetch = FetchType.LAZY, mappedBy = "organization", cascade = CascadeType.REMOVE)
public Set<User> getUsers() {
    return this.users;
}

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

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

From source file:example.Child.java

@OneToOne(targetEntity = Child.class, fetch = FetchType.LAZY)
@ReadPermission(all = { Role.NONE.class })
public Child getNoReadAccess() {
    return noReadAccess;
}

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

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "epersongroup2workspaceitem", joinColumns = {
        @JoinColumn(name = "workspace_item_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "eperson_group_id", nullable = false) })
public List<EpersonGroup> getEpersonGroups() {
    return epersonGroups;
}

From source file:org.jrecruiter.model.Role.java

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "role")
public Set<UserToRole> getUserToRoles() {
    return this.userToRoles;
}

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

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

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

@JsonView(Views.All.class)
@OneToMany(fetch = FetchType.LAZY, mappedBy = "domain", cascade = CascadeType.ALL)
public Set<Project> getProjects() {
    return projects;
}