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:ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE.java

@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "entity")
@Cascade(value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_PROPERTIES)
@Fetch(FetchMode.SUBSELECT)/*  w w  w  .  j ava 2s. c  om*/
private Set<SamplePropertyPE> getSampleProperties() {
    return properties;
}

From source file:gov.nih.nci.firebird.data.Person.java

@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name = "external_data_id")
@ForeignKey(name = "person_external_data_fkey")
public AbstractExternalData getExternalData() {
    return externalData;
}

From source file:uk.nhs.cfh.dsp.snomed.expression.model.impl.AbstractExpressionWithFocusConcepts.java

/**
 * Gets the role group expressions./*  w  w w  . j  a v a2  s  .c o m*/
 *
 * @return the role group expressions
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = SnomedRoleGroupImpl.class)
@JoinTable(name = "EFC_ROLEGROUP_EXPRESSIONS", joinColumns = @JoinColumn(name = "uuid"), inverseJoinColumns = @JoinColumn(name = "rg_exp_uuid"))
public Collection<SnomedRoleGroupExpression> getRoleGroupExpressions() {
    return roleGroupExpressions;
}

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

/**
 * @return the orders/*from w  w  w  .  j a va 2 s.com*/
 */

@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@JoinColumn(name = "CUSTOMERNUMBER")
@JsonManagedReference
public Set<Orders> getOrders() {
    return orders;
}

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

@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "entity")
@Cascade(value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_PROPERTIES)
@Fetch(FetchMode.SUBSELECT)//w  w w  .  j a v  a 2 s.  c o m
private Set<ExperimentPropertyPE> getExperimentProperties() {
    return properties;
}

From source file:org.akaza.openclinica.domain.rule.RuleSetRuleBean.java

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@Fetch(value = FetchMode.SUBSELECT)/*from   w ww .  ja va  2  s  .com*/
@JoinColumn(name = "rule_set_rule_id", nullable = false)
public List<RuleActionBean> getActions() {
    return actions;
}

From source file:org.projectforge.plugins.teamcal.event.TeamEventDO.java

/**
 * @return the attendees//w  w  w  .  java  2  s  .c  o  m
 */
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "team_event_fk", insertable = true, updatable = true)
@Sort(type = SortType.NATURAL)
public SortedSet<TeamEventAttendeeDO> getAttendees() {
    return attendees;
}

From source file:com.doculibre.constellio.entities.Record.java

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, orphanRemoval = true)
@JoinTable(name = "Record_ContentMetas", joinColumns = {
        @JoinColumn(name = "record_id") }, inverseJoinColumns = { @JoinColumn(name = "meta_id") })
@OrderColumn/*from  w  w w  .  j av  a2 s . c o m*/
public List<RecordMeta> getContentMetas() {
    return contentMetas;
}

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

@OneToOne(cascade = { CascadeType.ALL })
@ForeignKey(name = "FK_EVENT_EVENTSEARCHTEXT")
public EventSearchText getEventSearchText() {
    return eventSearchText;
}

From source file:com.evolveum.midpoint.repo.sql.data.common.container.RAssignment.java

@Where(clause = RAssignmentReference.REFERENCE_TYPE + "= 0")
@OneToMany(mappedBy = RAssignmentReference.F_OWNER, orphanRemoval = true)
@org.hibernate.annotations.ForeignKey(name = "none")
@Cascade({ org.hibernate.annotations.CascadeType.ALL })
//@JoinTable(foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
@JaxbPath(itemPath = { @JaxbName(localPart = "metadata"), @JaxbName(localPart = "createApproverRef") })
public Set<RAssignmentReference> getCreateApproverRef() {
    if (createApproverRef == null) {
        createApproverRef = new HashSet<>();
    }// w ww . j  av a2  s . c om
    return createApproverRef;
}