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:org.projectforge.continuousdb.demo.entities.UserDO.java

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true, mappedBy = "user")
public Set<UserRightDO> getRights() {
    return this.rights;
}

From source file:uk.nhs.cfh.dsp.srth.information.model.impl.om.ehr.EHRImpl.java

/**
 * Gets the investigations./* w  w w  .ja  va2s.  c  om*/
 *
 * @return the investigations
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, targetEntity = InvestigationEventEntry.class)
@JoinTable(name = "EHR_INVESTIGATIONS", joinColumns = @JoinColumn(name = PATIENT_ID), inverseJoinColumns = @JoinColumn(name = "investigation_id"))
@ForeignKey(name = "FK_EHR_INVS", inverseName = "FK_INVS_EHR")
public Set<BoundClinicalEventEntry> getInvestigations() {
    return investigations;
}

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

/**
 * @return the states/*w ww .  j  ava2 s .  c  om*/
 */
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER, mappedBy = "workflow")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Sort(type = SortType.NATURAL)
public SortedSet<WorkflowState> getStates() {
    return states;
}

From source file:com.infinities.skyport.compute.entity.ComputeObject.java

@Override
@OneToMany(fetch = FetchType.LAZY, mappedBy = "templateBaseEntity", cascade = CascadeType.ALL)
public Disks getDisks() {
    return disks;
}

From source file:org.photovault.folder.PhotoFolder.java

@History
@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "folder_uuid", insertable = false, updatable = false)
public ObjectHistory<PhotoFolder> getHistory() {
    return history;
}

From source file:com.hmsinc.epicenter.model.health.Interaction.java

@ManyToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_PATIENT", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_INTERACTION_2")
public Patient getPatient() {
    return this.patient;
}

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<RAExtPolyString> getPolys() {
    if (polys == null) {
        polys = new HashSet<>();
    }/*  w  w w . jav a  2 s .  c  om*/
    return polys;
}

From source file:org.tonguetied.keywordmanagement.Keyword.java

/**
 * //from   w  w w  . j  a v  a 2  s.  co  m
 * @return the list of {@link Translation}s mapped to the key string 
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@Sort(type = SortType.NATURAL)
@JoinColumn(name = "KEYWORD_ID")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public SortedSet<Translation> getTranslations() {
    return translations;
}

From source file:com.anite.zebra.hivemind.om.defs.ZebraProcessDefinition.java

@ManyToOne(cascade = { CascadeType.ALL }, targetEntity = ZebraPropertyGroups.class)
@JoinColumn(name = "propertyGroupsId")
public IPropertyGroups getPropertyGroups() {
    return this.propertyGroups;
}

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

/**
 * @return the workflow/*w  w w. j a v  a  2  s.c o m*/
 */
@ManyToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_WORKFLOW", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_WORKFLOW_STATE_1")
public Workflow getWorkflow() {
    return workflow;
}