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.jeefuse.system.security.model.GsysFunction.java

/**
 * ------------------------------------------------------------------------
 *  ----------------------------------------------------------------------
 * --/*  www  .  ja va 2  s. com*/
 * 
 * @generated
 */
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "PARENT_ID")
public GsysFunction getParent() {
    return parent;
}

From source file:com.hmsinc.epicenter.model.surveillance.Anomaly.java

/**
 * @return the set//from w  w  w. ja  v  a  2s .co  m
 */
@ManyToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_SURVEILLANCE_SET", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_ANOMALY_4")
public SurveillanceSet getSet() {
    return set;
}

From source file:com.dhenton9000.birt.persistence.entities.Offices.java

@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@JoinColumn(name = "OFFICECODE", nullable = false)
@JsonManagedReference/*from   ww w  . j a  v  a2 s.  c o  m*/
public Set<Employees> getEmployees() {

    return employees;
}

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

@Override
@OneToMany(targetEntity = MedicationIngredientLinkImpl.class, mappedBy = "medication", fetch = FetchType.LAZY)
public Set<MedicationIngredientLink> getIngredients() {
    return ingredients;
}

From source file:com.hmsinc.epicenter.model.surveillance.SurveillanceTask.java

/**
 * @return the sets/* w ww . ja  v a 2  s . co m*/
 */
@ManyToMany(cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, fetch = FetchType.LAZY, targetEntity = SurveillanceSet.class)
@JoinTable(name = "SURVEILLANCE_TASK_SET", joinColumns = {
        @JoinColumn(name = "ID_SURVEILLANCE_TASK") }, inverseJoinColumns = {
                @JoinColumn(name = "ID_SURVEILLANCE_SET") })
@ForeignKey(name = "FK_SURVEILLANCE_TASK_SET_1", inverseName = "FK_SURVEILLANCE_TASK_SET_2")
public Set<SurveillanceSet> getSets() {
    return sets;
}

From source file:gov.nih.nci.protexpress.domain.experiment.Experiment.java

/**
 * Gets the experimentRuns.//from ww w .ja v a  2s .  c om
 *
 * @return the experimentRuns.
 */
@OneToMany(mappedBy = "experiment", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
public List<ExperimentRun> getExperimentRuns() {
    return this.experimentRuns;
}

From source file:com.esoft.jdp2p.borrower.model.BorrowerAuthentication.java

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "diploma_scan")
public AuthenticationMaterials getDiplomaScan() {
    return this.diplomaScan;
}

From source file:ch.systemsx.cisd.openbis.generic.shared.dto.AuthorizationGroupPE.java

@ManyToMany(fetch = FetchType.LAZY, mappedBy = "authorizationGroupsInternal")
private Set<PersonPE> getPersonsInternal() {
    return persons;
}

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

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

From source file:com.hmsinc.epicenter.model.geography.Geography.java

/**
 * @return the centroid/* ww  w  .  j a v  a2 s .  com*/
 */
@XmlElement(required = true, namespace = "http://epicenter.hmsinc.com/model")
@Column(name = "CENTROID", unique = false, nullable = true, insertable = true, updatable = true)
@Basic(fetch = FetchType.LAZY)
@org.hibernate.annotations.Type(type = "geometry")
@XmlJavaTypeAdapter(com.hmsinc.hibernate.spatial.jaxb2.GeometryTypeAdapter.class)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "com.hmsinc.epicenter.model.GeographyCache")
public Geometry getCentroid() {
    if (centroid == null && getGeometry() != null) {
        centroid = getGeometry().getCentroid();
        centroid.setSRID(getGeometry().getSRID());
    }
    return centroid;
}