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.mitre.oauth2.model.OAuth2AccessTokenEntity.java

/**
 * @return the idToken/*w w  w  .  ja v  a2s .  co m*/
 */
@OneToOne(cascade = CascadeType.ALL) // one-to-one mapping for now
@JoinColumn(name = "id_token_id")
public OAuth2AccessTokenEntity getIdToken() {
    return idToken;
}

From source file:edu.harvard.med.screensaver.model.libraries.Library.java

@ManyToMany(fetch = FetchType.LAZY, cascade = { CascadeType.ALL })
@JoinTable(name = "libraryUpdateActivity", joinColumns = @JoinColumn(name = "libraryId", nullable = false, updatable = false), inverseJoinColumns = @JoinColumn(name = "updateActivityId", nullable = false, updatable = false))
@Sort(type = SortType.NATURAL)//from   www. ja  va2s.  c  om
@ToMany(singularPropertyName = "updateActivity", hasNonconventionalMutation = true /* model testing framework doesn't understand this is a containment relationship, and so requires addUpdateActivity() method*/)
@Override
public SortedSet<AdministrativeActivity> getUpdateActivities() {
    return _updateActivities;
}

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

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

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

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

From source file:org.apromore.dao.model.ProcessModelVersion.java

@OneToMany(mappedBy = "processModelVersion", cascade = CascadeType.ALL, orphanRemoval = true)
public Set<Resource> getResources() {
    return this.resources;
}

From source file:velo.entity.Resource.java

/**
 * Get a list of Resource Admin entities assigned to the Resource
 * /*from ww  w  .j  a v a 2s  . c  om*/
 * @return A list of ResourceAdmin entities
 */
@OneToMany(cascade = CascadeType.ALL, mappedBy = "resource", fetch = FetchType.EAGER)
@OrderBy("priority")
public Set<ResourceAdmin> getResourceAdmins() {
    return resourceAdmins;
}

From source file:org.nuxeo.ecm.platform.audit.impl.LogEntryImpl.java

@Override
@OneToMany(cascade = CascadeType.ALL, targetEntity = ExtendedInfoImpl.class)
@JoinTable(name = "NXP_LOGS_MAPEXTINFOS", joinColumns = { @JoinColumn(name = "LOG_FK") }, inverseJoinColumns = {
        @JoinColumn(name = "INFO_FK") })
@org.hibernate.annotations.MapKey(columns = { @Column(name = "mapkey", nullable = false) })
public Map<String, ExtendedInfo> getExtendedInfos() {
    return (Map) extendedInfos;
    // return (Map)getExtendedInfosImpl();
}

From source file:gov.nih.nci.caarray.domain.file.CaArrayFile.java

/**
 * @return the validationResult//www  . jav a  2s .  co  m
 */
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@ForeignKey(name = "caarrayfile_validation_result_fk")
public FileValidationResult getValidationResult() {
    return this.validationResult;
}

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

@Override
@OneToMany(fetch = FetchType.LAZY, mappedBy = "projectParentInternal", cascade = CascadeType.ALL)
@Cascade(value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
@IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_ATTACHMENT)
@Fetch(FetchMode.SUBSELECT)/*from w  w w. jav a 2  s.  c om*/
protected Set<AttachmentPE> getInternalAttachments() {
    return attachments;
}

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

/**
 * @return investigational agents used in this protocol.
 *//* w w  w  .  ja  v a2  s. c  o m*/
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "protocol_protocolagent", joinColumns = @JoinColumn(name = "protocol_id"), inverseJoinColumns = @JoinColumn(name = "protocolagent_id"))
@ForeignKey(name = "protocol_fkey", inverseName = "protocolagent_fkey")
@Cascade({ org.hibernate.annotations.CascadeType.ALL })
@Sort(type = SortType.NATURAL)
public SortedSet<ProtocolAgent> getAgents() {
    return agents;
}