List of usage examples for org.hibernate.annotations CascadeType DELETE
CascadeType DELETE
To view the source code for org.hibernate.annotations CascadeType DELETE.
Click Source Link
From source file:gov.nih.nci.cabig.caaers.domain.Organization.java
License:BSD License
/** * Gets the report definitions./*w ww . ja va 2 s . c om*/ * * @return the report definitions */ @OneToMany(mappedBy = "organization", fetch = FetchType.LAZY, orphanRemoval = true) @Cascade(value = { CascadeType.DELETE }) @Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT) public List<ReportDefinition> getReportDefinitions() { return reportDefinitions; }
From source file:gov.nih.nci.cabig.caaers.domain.Participant.java
License:BSD License
/** * Gets the assignments.// w ww. j ava 2s. c o m * * @return the assignments */ @OneToMany(mappedBy = "participant", fetch = FetchType.LAZY, orphanRemoval = true) @OrderBy // order by ID for testing consistency @Cascade(value = { CascadeType.DELETE, CascadeType.MERGE, CascadeType.SAVE_UPDATE, CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.REMOVE }) @UniqueObjectInCollection(message = "Duplicate Assignement found in Assignments list") @Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT) public List<StudyParticipantAssignment> getAssignments() { return assignments; }
From source file:gov.nih.nci.cabig.caaers.domain.Participant.java
License:BSD License
@Override @OneToMany(orphanRemoval = true)/* w ww . j av a2s .c o m*/ @Cascade({ CascadeType.DELETE, CascadeType.MERGE, CascadeType.SAVE_UPDATE, CascadeType.PERSIST, CascadeType.REFRESH, CascadeType.REMOVE }) @JoinColumn(name = "participant_id") @UniqueObjectInCollection(message = "Duplicate Identifier found in Identifiers list") @Fetch(value = org.hibernate.annotations.FetchMode.SUBSELECT) public List<Identifier> getIdentifiers() { return lazyListHelper.getInternalList(Identifier.class); }
From source file:org.emonocot.model.Concept.java
License:Open Source License
/** * @return the annotations/*from w w w. ja va 2s . com*/ */ @OneToMany(fetch = FetchType.LAZY, orphanRemoval = true) @JoinColumn(name = "annotatedObjId") @Where(clause = "annotatedObjType = 'Concept'") @Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE }) @JsonIgnore public Set<Annotation> getAnnotations() { return annotations; }
From source file:org.emonocot.model.Concept.java
License:Open Source License
/** * @return the comments/* w w w . j av a2s.c o m*/ */ @OneToMany(fetch = FetchType.LAZY, orphanRemoval = true) @JoinColumn(name = "commentPage_id") @OrderBy("created DESC") @Where(clause = "commentPage_type = 'Concept'") @Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE }) @JsonIgnore public List<Comment> getComments() { return comments; }
From source file:org.emonocot.model.Description.java
License:Open Source License
/** * @return the annotations//from w w w.j a v a 2 s .co m */ @OneToMany(fetch = FetchType.LAZY, orphanRemoval = true) @JoinColumn(name = "annotatedObjId") @Where(clause = "annotatedObjType = 'Description'") @Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE }) @JsonIgnore public Set<Annotation> getAnnotations() { return annotations; }
From source file:org.emonocot.model.Distribution.java
License:Open Source License
/** * @return the annotations// w w w .ja va 2 s. c o m */ @OneToMany(fetch = FetchType.LAZY, orphanRemoval = true) @JoinColumn(name = "annotatedObjId") @Where(clause = "annotatedObjType = 'Distribution'") @Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE }) @JsonIgnore public Set<Annotation> getAnnotations() { return annotations; }
From source file:org.emonocot.model.IdentificationKey.java
License:Open Source License
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true) @JoinColumn(name = "annotatedObjId") @Where(clause = "annotatedObjType = 'IdentificationKey'") @Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE }) @JsonIgnore// w w w.ja v a2 s. c om public Set<Annotation> getAnnotations() { return annotations; }
From source file:org.emonocot.model.IdentificationKey.java
License:Open Source License
/** * @return the comments/* www .j a va2 s. co m*/ */ @OneToMany(fetch = FetchType.LAZY, orphanRemoval = true) @JoinColumn(name = "commentPage_id") @OrderBy("created DESC") @Where(clause = "commentPage_type = 'IdentificationKey'") @Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE }) @JsonIgnore public List<Comment> getComments() { return comments; }
From source file:org.emonocot.model.Identifier.java
License:Open Source License
/** * @return the annotations//w ww .j av a 2 s . com */ @OneToMany(fetch = FetchType.LAZY, orphanRemoval = true) @JoinColumn(name = "annotatedObjId") @Where(clause = "annotatedObjType = 'Identifier'") @Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE }) @JsonIgnore public Set<Annotation> getAnnotations() { return annotations; }