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

@ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.DETACH)
@JoinTable(name = "community2community", joinColumns = {
        @JoinColumn(name = "parent_comm_id", nullable = false) }, inverseJoinColumns = {
                @JoinColumn(name = "child_comm_id", nullable = false) })
public List<Community> getChilds() {
    return childs;
}

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

/**
 * @return the locality//ww  w .  ja  va 2 s .  c  o  m
 */
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "LocalityID", unique = false, nullable = false, insertable = true, updatable = true)
public Locality getLocality() {
    return locality;
}

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

@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "CollectionRelTypeID", unique = false, nullable = true, insertable = true, updatable = true)
public CollectionRelType getCollectionRelType() {
    return this.collectionRelType;
}

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

/**
 * @return the user/* w w  w .ja v a 2  s . c om*/
 */
@ManyToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_APP_USER", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_ACTIVITY_1")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public EpiCenterUser getUser() {
    return user;
}

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

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

From source file:com.marand.thinkmed.medications.model.impl.TherapyTemplateImpl.java

@Override
@OneToMany(targetEntity = TherapyTemplateElementImpl.class, mappedBy = "therapyTemplate", fetch = FetchType.LAZY)
public Set<TherapyTemplateElement> getTherapyTemplateElements() {
    return therapyTemplateElements;
}

From source file:net.shopxx.entity.ShippingMethod.java

@ManyToOne(fetch = FetchType.LAZY)
public DeliveryCorp getDefaultDeliveryCorp() {
    return defaultDeliveryCorp;
}

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

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

From source file:com.cubeia.backoffice.accounting.core.entity.Account.java

@MapKey(name = "key")
// @Cache(region="Accounts", usage=READ_WRITE)
@OneToMany(mappedBy = "account", cascade = ALL, fetch = FetchType.LAZY)
public Map<String, AccountAttribute> getAttributes() {
    return attributes;
}

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

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "owning_collection", nullable = true)
public Collection getOwningCollection() {
    return owningCollection;
}