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.SnomedConceptImpl.java

@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = SnomedConceptImpl.class)
@JoinTable(name = "CHILDREN", joinColumns = @JoinColumn(name = "concept_id"), inverseJoinColumns = @JoinColumn(name = "child_id"))
public Collection<SnomedConcept> getChildren() {
    return children;
}

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

@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = SnomedConceptImpl.class)
@JoinTable(name = "DESCENDANTS", joinColumns = @JoinColumn(name = "concept_id"), inverseJoinColumns = @JoinColumn(name = "descendant_id"))
public Collection<SnomedConcept> getDescendants() {
    return descendants;
}

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

@OneToMany(mappedBy = "recordCollection", cascade = {
        CascadeType.ALL }, fetch = FetchType.LAZY, orphanRemoval = true)
public Set<CollectionPermission> getCollectionPermissions() {
    return collectionPermissions;
}

From source file:onl.netfishers.netshot.compliance.Rule.java

/**
 * Gets the exemptions./*from w w w  .  j av  a 2 s .com*/
 *
 * @return the exemptions
 */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "key.rule", cascade = CascadeType.ALL, orphanRemoval = true)
public Set<Exemption> getExemptions() {
    return exemptions;
}

From source file:org.opennms.netmgt.model.OnmsHwEntity.java

/**
 * Gets the hardware entity attributes.//from  ww w .  j a  va  2  s.  com
 *
 * @return the hardware entity attributes
 */
@OneToMany(mappedBy = "hwEntity", fetch = FetchType.LAZY, cascade = { CascadeType.ALL }, orphanRemoval = true)
@Sort(type = SortType.NATURAL)
@XmlElement(name = "hwEntityAttribute")
@XmlElementWrapper(name = "vendorAttributes")
public SortedSet<OnmsHwEntityAttribute> getHwEntityAttributes() {
    return m_hwAttributes;
}

From source file:edu.harvard.med.screensaver.model.screenresults.ScreenResult.java

@OneToMany(mappedBy = "screenResult", cascade = { CascadeType.ALL })
@org.hibernate.annotations.Sort(type = org.hibernate.annotations.SortType.NATURAL)
public SortedSet<AssayWell> getAssayWells() {
    return _assayWells;
}

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

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, orphanRemoval = true)
public Set<SearchResultField> getSearchResultFields() {
    return searchResultFields;
}

From source file:org.orcid.persistence.jpa.entities.ProfileEntity.java

/**
 * Returns the authorities granted to the user. Cannot return
 * <code>null</code>./* w  w w.j a  va 2  s.  c om*/
 * 
 * @return the authorities, sorted by natural key (never <code>null</code>)
 */
@Override
@OneToMany(cascade = CascadeType.ALL, mappedBy = "profileEntity")
public Collection<OrcidGrantedAuthority> getAuthorities() {
    return authorities;
}

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

@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = SnomedConceptImpl.class)
@JoinTable(name = "ANCESTORS", joinColumns = @JoinColumn(name = "concept_id"), inverseJoinColumns = @JoinColumn(name = "ancestor_id"))
public Collection<SnomedConcept> getAncestors() {
    return ancestors;
}

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

@OneToMany(mappedBy = "record", cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, orphanRemoval = true)
public Set<RecordPolicyACLEntry> getRecordPolicyACLEntries() {
    return recordPolicyACLEntries;
}