Example usage for org.hibernate.annotations CascadeType ALL

List of usage examples for org.hibernate.annotations CascadeType ALL

Introduction

In this page you can find the example usage for org.hibernate.annotations CascadeType ALL.

Prototype

CascadeType ALL

To view the source code for org.hibernate.annotations CascadeType ALL.

Click Source Link

Document

Includes all types listed here.

Usage

From source file:gov.nih.nci.cabig.caaers.domain.ExpeditedAdverseEventReport.java

License:BSD License

/**
 * Gets the participant history./* www.jav  a  2s  . c o  m*/
 *
 * @return the participant history
 */
@OneToOne(mappedBy = "report", fetch = FetchType.LAZY, orphanRemoval = true)
@Cascade(value = { CascadeType.ALL })
public ParticipantHistory getParticipantHistory() {
    if (participantHistory == null)
        setParticipantHistory(new ParticipantHistory());
    return participantHistory;
}

From source file:gov.nih.nci.cabig.caaers.domain.ExternalAdverseEventReportingPeriod.java

License:BSD License

@OneToMany(mappedBy = "externalAdverseEventReportingPeriod", orphanRemoval = true)
@Cascade(value = { CascadeType.ALL })
@OrderBy//from   w w w .  j  a  v  a2 s.  c  o m
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
public List<ExternalAdverseEvent> getExternalAdverseEvents() {
    return externalAdverseEvents;
}

From source file:gov.nih.nci.cabig.caaers.domain.InvestigationalNewDrug.java

License:BSD License

/**
 * Gets the iND holder./*from   w ww  .ja  v  a 2s  .  c  o m*/
 *
 * @return the iND holder
 */
@OneToOne(mappedBy = "investigationalNewDrug", fetch = FetchType.EAGER)
@Cascade({ CascadeType.ALL })
public INDHolder getINDHolder() {
    return iNDHolder;
}

From source file:gov.nih.nci.cabig.caaers.domain.Investigator.java

License:BSD License

/**
 * Gets the site investigators internal.
 *
 * @return the site investigators internal
 *//*w  ww. j a v  a2s .c o m*/
@OneToMany(mappedBy = "investigator", fetch = FetchType.LAZY, orphanRemoval = true)
@Cascade(value = { CascadeType.ALL })
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
public List<SiteInvestigator> getSiteInvestigatorsInternal() {
    return lazyListHelper.getInternalList(SiteInvestigator.class);
}

From source file:gov.nih.nci.cabig.caaers.domain.LabCategory.java

License:BSD License

/**
 * Gets the terms.//from  ww w .  ja v a2 s . c om
 *
 * @return the terms
 */
@OneToMany(mappedBy = "category")
@Cascade(value = { CascadeType.ALL })
@OrderBy
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
// by ID for consistency
public List<LabTerm> getTerms() {
    return terms;
}

From source file:gov.nih.nci.cabig.caaers.domain.ReconciliationReport.java

License:BSD License

@OneToMany(mappedBy = "reconciliationReport", orphanRemoval = true)
@Cascade(value = { CascadeType.ALL })
@OrderBy//  w w w.  j  a  v a2s .  c o m
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
public List<ReconciledAdverseEvent> getReconciledAdverseEvents() {
    return reconciledAdverseEvents;
}

From source file:gov.nih.nci.cabig.caaers.domain.report.PlannedNotification.java

License:BSD License

/**
 * Gets the recipients./*from  w w w. j a va  2  s. c o  m*/
 *
 * @return the recipients
 */
@OneToMany(orphanRemoval = true)
@JoinColumn(name = "plnf_id", nullable = false)
@Cascade(value = { CascadeType.ALL })
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
public List<Recipient> getRecipients() {

    return recipients;
}

From source file:gov.nih.nci.cabig.caaers.domain.report.PlannedNotification.java

License:BSD License

/**
 * Gets the attachments./*  w ww  .j  a  va 2s. c o m*/
 *
 * @return the attachments
 */
@OneToMany(orphanRemoval = true)
@JoinColumn(name = "plnf_id", nullable = false)
@Cascade(value = { CascadeType.ALL })
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
public List<NotificationAttachment> getAttachments() {
    return attachments;
}

From source file:gov.nih.nci.cabig.caaers.domain.report.Report.java

License:BSD License

/**
 * Gets the scheduled notifications./*from ww  w  .ja  v a2  s. c  om*/
 *
 * @return the scheduled notifications
 */
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "rpsh_id", nullable = false)
@Cascade(value = { CascadeType.ALL })
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
public List<ScheduledNotification> getScheduledNotifications() {
    return notifications;
}

From source file:gov.nih.nci.cabig.caaers.domain.report.Report.java

License:BSD License

/**
 * Gets the report deliveries./*  ww w  . j a va2  s  . c  o m*/
 *
 * @return the report deliveries
 */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "report", orphanRemoval = true)
@Cascade(value = { CascadeType.ALL })
@Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT)
public List<ReportDelivery> getReportDeliveries() {
    return deliveries;
}