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:com.hmsinc.epicenter.model.permission.EpiCenterUser.java

/**
 * @return the attachments//from w ww.  j  a  va2 s  . c  om
 */
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "owner")
public Set<Attachment> getAttachments() {
    return attachments;
}

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

/**
 * The assert record associated with this node
 *
 * @return a {@link org.opennms.netmgt.model.OnmsAssetRecord} object.
 *//*w w  w  .  ja va 2  s  .c  om*/
@OneToOne(mappedBy = "node", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
public OnmsAssetRecord getAssetRecord() {
    return m_assetRecord;
}

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

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

From source file:com.medigy.persist.model.person.Person.java

@OneToMany(cascade = CascadeType.ALL, mappedBy = "person", fetch = FetchType.LAZY)
public Set<HealthCareLicense> getLicenses() {
    return licenses;
}

From source file:com.hmsinc.epicenter.model.permission.EpiCenterUser.java

/**
 * @return the subscriptions//from  ww w .  ja  v  a 2s . c  o  m
 */
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "user")
public Set<Subscription> getSubscriptions() {
    return subscriptions;
}

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

/**
 * @return changes made to this protocol.
 *//* w  w w .j a v  a 2  s .  c o m*/
@OneToMany(mappedBy = PROTOCOL_STRING, fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@Cascade({ org.hibernate.annotations.CascadeType.ALL, org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
@OrderBy("date DESC")
private List<ProtocolRevision> getRevisionHistoryInternal() {
    return revisionHistory;
}

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

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

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

/**
 * Gets the check results.//www . j  a  va 2s . c o m
 *
 * @return the check results
 */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "key.rule", cascade = CascadeType.ALL, orphanRemoval = true)
public Set<CheckResult> getCheckResults() {
    return checkResults;
}

From source file:com.hmsinc.epicenter.model.permission.EpiCenterUser.java

/**
 * @return the auditEvents//from   w  ww.ja  v  a  2  s.  c  o  m
 */
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "user")
public Set<AuditEvent> getAuditEvents() {
    return auditEvents;
}

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

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = SnomedRoleGroupImpl.class)
@JoinTable(name = "CONCEPT_ROLE_GROUPS", joinColumns = @JoinColumn(name = "concept_id"), inverseJoinColumns = @JoinColumn(name = "role_group_id"))
public Collection<SnomedRoleGroup> getRoleGroups() {
    return roleGroups;
}