Example usage for javax.persistence FetchType EAGER

List of usage examples for javax.persistence FetchType EAGER

Introduction

In this page you can find the example usage for javax.persistence FetchType EAGER.

Prototype

FetchType EAGER

To view the source code for javax.persistence FetchType EAGER.

Click Source Link

Document

Defines that data must be eagerly fetched.

Usage

From source file:org.projectforge.business.book.BookDO.java

@ManyToOne(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
@JoinColumn(name = "lend_out_by")
public PFUserDO getLendOutBy() {
    return lendOutBy;
}

From source file:org.projectforge.business.fibu.AuftragDO.java

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "kunde_fk", nullable = true)
public KundeDO getKunde() {
    return kunde;
}

From source file:org.projectforge.business.fibu.AuftragDO.java

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "projekt_fk", nullable = true)
public ProjektDO getProjekt() {
    return projekt;
}

From source file:org.projectforge.business.fibu.AuftragDO.java

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "contact_person_fk", nullable = true)
public PFUserDO getContactPerson() {
    return contactPerson;
}

From source file:org.projectforge.business.fibu.AuftragDO.java

/**
 * Get the position entries for this object.
 *///from   w  w w  . j  a v  a 2  s  . c  o  m
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true, mappedBy = "auftrag")
//@OrderColumn(name = "number")
//TODO: Kann so nicht verwendet werden, da Zhler bei 1 starten muss. Grerer Umbau von nten, um es zu ndern.
@IndexColumn(name = "number", base = 1)
public List<AuftragsPositionDO> getPositionen() {
    if (this.positionen == null) {
        log.debug("The list of AuftragsPositionDO is null. AuftragDO id: " + this.getId());
        return Collections.emptyList();
    }
    for (AuftragsPositionDO aPosition : this.positionen) {
        if (aPosition == null) {
            log.debug("AuftragsPositionDO is null in list. AuftragDO id: " + this.getId());
        }
    }
    return this.positionen;
}

From source file:org.projectforge.business.fibu.AuftragDO.java

/**
 * Get the payment schedule entries for this object.
 */// w  w  w.ja v a2s  .  c om
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true, mappedBy = "auftrag")
@IndexColumn(name = "number", base = 1)
public List<PaymentScheduleDO> getPaymentSchedules() {
    return this.paymentSchedules;
}

From source file:org.projectforge.business.fibu.AuftragsPositionDO.java

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "auftrag_fk", nullable = false)
public AuftragDO getAuftrag() {
    return auftrag;
}

From source file:org.projectforge.business.fibu.EingangsrechnungDO.java

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "eingangsrechnung", targetEntity = EingangsrechnungsPositionDO.class)
@IndexColumn(name = "number", base = 1)
@Override//  ww w.  j  av a2s .c o m
public List<EingangsrechnungsPositionDO> getPositionen() {
    return this.positionen;
}

From source file:org.projectforge.business.fibu.kost.BuchungssatzDO.java

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "konto_id", nullable = false)
public KontoDO getKonto() {
    return konto;
}

From source file:org.projectforge.business.fibu.kost.BuchungssatzDO.java

@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "gegenkonto_id", nullable = false)
public KontoDO getGegenKonto() {
    return gegenKonto;
}