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.eryansky.entity.base.Resource.java

@ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY)
@JoinTable(name = "T_BASE_ROLE_RESOURCE", joinColumns = {
        @JoinColumn(name = "RESOURCE_ID") }, inverseJoinColumns = { @JoinColumn(name = "ROLE_ID") })
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = CacheConstants.HIBERNATE_CACHE_BASE)
public List<Role> getRoles() {
    return roles;
}

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

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

From source file:gov.nih.nci.protexpress.domain.protocol.InputOutputObject.java

/**
 * Gets the inputToProtocolApplication.//from w  w  w.  j  av  a2  s.c o m
 *
 * @return the inputToProtocolApplication.
 */
@OneToOne(fetch = FetchType.LAZY)
@JoinTable(name = "protapp_inputs", joinColumns = { @JoinColumn(name = "input_id") }, inverseJoinColumns = {
        @JoinColumn(name = "protapp_id") })
public ProtocolApplication getInputToProtocolApplication() {
    return inputToProtocolApplication;
}

From source file:de.terrestris.shogun.model.Wms.java

/**
 * @return the wmsLayers/*w  w  w  . ja v  a  2s  .c om*/
 */
@OneToMany(fetch = FetchType.LAZY, targetEntity = WmsLayer.class)
@Fetch(FetchMode.SUBSELECT)
@JsonSerialize(using = LeanBaseModelSetSerializer.class)
public Set<WmsLayer> getWmsLayers() {
    return wmsLayers;
}

From source file:edu.harvard.med.screensaver.model.AttachedFile.java

@ManyToMany(fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST, CascadeType.MERGE })
@JoinTable(name = "attachedFileUpdateActivity", joinColumns = @JoinColumn(name = "attachedFileId", nullable = false, updatable = false), inverseJoinColumns = @JoinColumn(name = "updateActivityId", nullable = false, updatable = false, unique = true))
@org.hibernate.annotations.Cascade(value = { org.hibernate.annotations.CascadeType.SAVE_UPDATE })
@Sort(type = SortType.NATURAL)//w ww. j  a  v a 2 s  .  c  o  m
@ToMany(singularPropertyName = "updateActivity", hasNonconventionalMutation = true /* model testing framework doesn't understand this is a containment relationship, and so requires addUpdateActivity() method*/)
@Override
public SortedSet<AdministrativeActivity> getUpdateActivities() {
    return _updateActivities;
}

From source file:com.jeefuse.system.log.model.GsysLoginlog.java

/**
 * ------------------------------------------------------------------------
 * gsysUser//from   www . j  av a2  s . c o m
 * ------------------------------------------------------------------------
 * 
 * @generated
 */
@JoinColumn(name = "USER_ID", unique = false, nullable = false, insertable = true, updatable = true)
@ManyToOne(fetch = FetchType.LAZY)
public GsysUser getGsysUser() {
    return gsysUser;
}

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

/**
 * @return the owner//from ww  w.  j  a v a 2 s. c  o m
 */
@ManyToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_USER", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_ATTACHMENT_1")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public EpiCenterUser getOwner() {
    return owner;
}

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

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "id_card_scan")
public AuthenticationMaterials getIdCardScan() {
    return this.idCardScan;
}

From source file:edu.duke.cabig.c3pr.domain.StratificationCriterion.java

/**
 * Gets the permissible answers internal.
 * //  w w  w.  j  a  va 2  s . c  o  m
 * @return the permissible answers internal
 */
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "str_cri_id", nullable = false)
@Cascade(value = { CascadeType.ALL })
@Where(clause = "retired_indicator = 'false'")
public List<StratificationCriterionPermissibleAnswer> getPermissibleAnswersInternal() {
    return lazyListHelper.getInternalList(StratificationCriterionPermissibleAnswer.class);
}

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

@Override
@ManyToOne(targetEntity = MedicationVersionImpl.class, fetch = FetchType.LAZY)
public void setDoseForm(final DoseForm doseForm) {
    this.doseForm = doseForm;
}