Example usage for javax.persistence CascadeType ALL

List of usage examples for javax.persistence CascadeType ALL

Introduction

In this page you can find the example usage for javax.persistence CascadeType ALL.

Prototype

CascadeType ALL

To view the source code for javax.persistence CascadeType ALL.

Click Source Link

Document

Cascade all operations

Usage

From source file:uk.nhs.cfh.dsp.snomed.objectmodel.impl.SnomedRelationshipImpl.java

@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = SnomedConceptImpl.class)
@JoinTable(name = "Sources", joinColumns = @JoinColumn(name = "relationship_id"), inverseJoinColumns = @JoinColumn(name = "source_id"))
public SnomedConcept getSourceConcept() {
    return sourceConcept;
}

From source file:ca.mcgill.cs.swevo.qualyzer.model.Project.java

/**
 * @return the transcripts/*from w w w.j  a  va2 s  .  co  m*/
 */
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER)
@JoinColumn(name = "project_persistenceid", nullable = false)
@OrderColumn(name = "index")
public List<Transcript> getTranscripts() {
    return fTranscripts;
}

From source file:com.evolveum.midpoint.repo.sql.data.common.any.RAssignmentExtension.java

@OneToMany(mappedBy = RAExtValue.ANY_CONTAINER, orphanRemoval = true)
@Cascade({ org.hibernate.annotations.CascadeType.ALL })
public Set<RAExtBoolean> getBooleans() {
    if (booleans == null) {
        booleans = new HashSet<>();
    }/*w  ww.  j  ava 2 s . c o  m*/
    return booleans;
}

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.jrecruiter.model.Role.java

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

From source file:org.openhie.openempi.model.Dataset.java

@OneToMany(mappedBy = "dataset", cascade = CascadeType.ALL)
@JoinColumn(name = "dataset_id")
@OrderBy("columnInformationId")
public List<ColumnInformation> getColumnInformation() {
    return columnInformation;
}

From source file:org.bwgz.swim.openlane.data.model.Event.java

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
public Set<Entry> getEntries() {
    return entries;
}

From source file:org.tsm.concharto.model.Event.java

@OneToOne(cascade = { CascadeType.ALL })
@ForeignKey(name = "FK_EVENT_GEOM")
public TsGeometry getTsGeometry() {
    return tsGeometry;
}

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/*from   www  .j a  va  2s  .c om*/
public List<EingangsrechnungsPositionDO> getPositionen() {
    return this.positionen;
}

From source file:no.abmu.questionnarie.domain.Account.java

/**
 * @hibernate.set lazy="false"//from  ww  w.ja  v a 2  s .co  m
 * table="FINANCE_ACCOUNT_POST"
 * cascade="save-update"
 * @hibernate.key column="FK_ACCOUNT_ID"
 * @hibernate.many-to-many class="no.abmu.finances.domain.Post"
 * column="FK_POST_ID"
 * @hibernate.cache usage="nonstrict-read-write"
 * @hibernate.collection-key column="FK_ACCOUNT_ID"
 * @hibernate.collection-many-to-many class="no.abmu.finances.domain.Post"
 * column="FK_POST_ID"
 */
@ManyToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER /* TODO FETCH */
)
@JoinTable(
        //            schema = "QUESTIONNARIE"
        name = "QUESTIONNARIE_ACCOUNT_POST", joinColumns = {
                @JoinColumn(name = "ACCOUNT_ID") }, inverseJoinColumns = { @JoinColumn(name = "POST_ID") })
public Set<Post> getPosts() {
    return posts;
}