List of usage examples for org.hibernate.annotations CascadeType ALL
CascadeType ALL
To view the source code for org.hibernate.annotations CascadeType ALL.
Click Source Link
From source file:gov.nih.nci.cabig.caaers.domain.AdverseEvent.java
License:BSD License
@OneToMany(orphanRemoval = true) @JoinColumn(name = "adverse_event_id", nullable = false) @IndexColumn(name = "list_index") @Cascade(value = { CascadeType.ALL }) @Where(clause = "cause_type = 'HI'") @Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT) // it is pretty lame that this is necessary public List<BehavioralInterventionAttribution> getBehavioralInterventionAttributions() { if (behavioralInterventionAttributions == null) { behavioralInterventionAttributions = new ArrayList<BehavioralInterventionAttribution>(); }/* w w w. j a v a2s.c o m*/ return behavioralInterventionAttributions; }
From source file:gov.nih.nci.cabig.caaers.domain.AdverseEvent.java
License:BSD License
@OneToMany(orphanRemoval = true) @JoinColumn(name = "adverse_event_id", nullable = false) @IndexColumn(name = "list_index") @Cascade(value = { CascadeType.ALL }) @Where(clause = "cause_type = 'GI'") @Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT) // it is pretty lame that this is necessary public List<GeneticInterventionAttribution> getGeneticInterventionAttributions() { if (geneticInterventionAttributions == null) { geneticInterventionAttributions = new ArrayList<GeneticInterventionAttribution>(); }// w ww. j a v a2s . c o m return geneticInterventionAttributions; }
From source file:gov.nih.nci.cabig.caaers.domain.AdverseEvent.java
License:BSD License
@OneToMany(orphanRemoval = true) @JoinColumn(name = "adverse_event_id", nullable = false) @IndexColumn(name = "list_index") @Cascade(value = { CascadeType.ALL }) @Where(clause = "cause_type = 'DI'") @Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT) // it is pretty lame that this is necessary public List<DietarySupplementInterventionAttribution> getDietarySupplementInterventionAttributions() { if (dietarySupplementInterventionAttributions == null) { dietarySupplementInterventionAttributions = new ArrayList<DietarySupplementInterventionAttribution>(); }/*from w w w .ja va 2 s. c om*/ return dietarySupplementInterventionAttributions; }
From source file:gov.nih.nci.cabig.caaers.domain.AdverseEvent.java
License:BSD License
/** * Gets the adverse event term./* w ww. j a va 2 s. c o m*/ * * @return the adverse event term */ @NotNullConstraint(groups = AdverseEventGroup.class, fieldPath = "adverseEvents[].adverseEventCtcTerm") @OneToOne(fetch = FetchType.LAZY, mappedBy = "adverseEvent", orphanRemoval = true) @Cascade(value = { CascadeType.ALL }) public AbstractAdverseEventTerm getAdverseEventTerm() { return adverseEventTerm; }
From source file:gov.nih.nci.cabig.caaers.domain.AdverseEvent.java
License:BSD License
/** * Gets the outcomes.//from www. ja v a 2 s . co m * * @return the outcomes */ @OneToMany(orphanRemoval = true) @JoinColumn(name = "adverse_event_id", nullable = false) @Cascade(value = { CascadeType.ALL }) @Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT) @NotEmptyCollectionConstraint(groups = AdverseEventGroup.class, fieldPath = "adverseEvents[].outcomes") public List<Outcome> getOutcomes() { if (outcomes == null) outcomes = new ArrayList<Outcome>(); return outcomes; }
From source file:gov.nih.nci.cabig.caaers.domain.AdverseEventReportingPeriod.java
License:BSD License
/** * Gets the adverse events./*from ww w.j a v a 2s . c o m*/ * * @return the adverse events */ @OneToMany(mappedBy = "reportingPeriod", orphanRemoval = true) @Cascade(value = { CascadeType.ALL }) @OrderBy @Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT) public List<AdverseEvent> getAdverseEvents() { if (adverseEvents == null) adverseEvents = new ArrayList<AdverseEvent>(); return adverseEvents; }
From source file:gov.nih.nci.cabig.caaers.domain.AdverseEventReportingPeriod.java
License:BSD License
/** * Gets the review comments internal.//from w w w.j ava2 s. c om * * @return the review comments internal */ @OneToMany(orphanRemoval = true) @JoinColumn(name = "rp_id", nullable = true) @IndexColumn(name = "list_index", nullable = false) @Cascade(value = { CascadeType.ALL }) @Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT) public List<ReportingPeriodReviewComment> getReviewCommentsInternal() { if (reviewComments == null) reviewComments = new ArrayList<ReportingPeriodReviewComment>(); return reviewComments; }
From source file:gov.nih.nci.cabig.caaers.domain.Arm.java
License:BSD License
/** * Gets the solicited adverse events./*from www . j av a2 s. com*/ * * @return the solicited adverse events */ @OneToMany(fetch = FetchType.LAZY, orphanRemoval = true) @Cascade(value = { CascadeType.ALL }) @JoinColumn(name = "arm_id", nullable = false) @Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT) public List<SolicitedAdverseEvent> getSolicitedAdverseEvents() { return solicitedAdverseEvents; }
From source file:gov.nih.nci.cabig.caaers.domain.Ctc.java
License:BSD License
/** * Gets the categories./*from ww w . j a va2 s . c om*/ * * @return the categories */ @OneToMany(mappedBy = "ctc") @OrderBy // by ID for consistency @Cascade(value = { CascadeType.ALL }) @Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT) public List<CtcCategory> getCategories() { return categories; }
From source file:gov.nih.nci.cabig.caaers.domain.CtcCategory.java
License:BSD License
/** * Gets the terms./*w w w .j ava 2 s.co m*/ * * @return the terms */ @OneToMany(mappedBy = "category") @OrderBy @Cascade(value = { CascadeType.ALL }) @Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT) // by ID for consistency public List<CtcTerm> getTerms() { return terms; }