Example usage for org.hibernate.annotations CascadeType DELETE

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

Introduction

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

Prototype

CascadeType DELETE

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

Click Source Link

Document

Corresponds to the Hibernate native DELETE action.

Usage

From source file:org.emonocot.model.Image.java

License:Open Source License

@Override
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Image'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore/*from  w w w  .  ja  v a2  s .c  om*/
public Set<Annotation> getAnnotations() {
    return annotations;
}

From source file:org.emonocot.model.Image.java

License:Open Source License

@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "commentPage_id")
@OrderBy("created DESC")
@Where(clause = "commentPage_type = 'Image'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore//from w  w w .j a v a  2 s .  c  o m
public List<Comment> getComments() {
    return comments;
}

From source file:org.emonocot.model.MeasurementOrFact.java

License:Open Source License

@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'MeasurementOrFact'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore//from   w w w  .  j  a  va 2 s . c o  m
public Set<Annotation> getAnnotations() {
    return annotations;
}

From source file:org.emonocot.model.PhylogeneticTree.java

License:Open Source License

@Override
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'PhylogeneticTree'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore// w w w  .jav a  2  s. co m
public Set<Annotation> getAnnotations() {
    return annotations;
}

From source file:org.emonocot.model.PhylogeneticTree.java

License:Open Source License

@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "commentPage_id")
@OrderBy("created DESC")
@Where(clause = "commentPage_type = 'PhylogeneticTree'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore/* ww w  .j  a  va2s .c  o  m*/
public List<Comment> getComments() {
    return comments;
}

From source file:org.emonocot.model.Place.java

License:Open Source License

@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Place'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore//w  w  w .j a  va2  s.c o  m
public Set<Annotation> getAnnotations() {
    return annotations;
}

From source file:org.emonocot.model.Reference.java

License:Open Source License

/**
 * @return the annotations/*from w ww.  j  a v  a  2s .  c  o  m*/
 */
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Reference'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}

From source file:org.emonocot.model.registry.Organisation.java

License:Open Source License

/**
 * @return the jobs/* w w w  .  ja va 2s . c om*/
 */
@JsonIgnore
@OneToMany(fetch = FetchType.LAZY, mappedBy = "organisation")
@Cascade(CascadeType.DELETE)
@OrderBy("lastHarvested DESC")
public Set<Resource> getResources() {
    return resources;
}

From source file:org.emonocot.model.registry.Organisation.java

License:Open Source License

@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Organisation'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore//from  www. j  a va  2  s. c  o m
public Set<Annotation> getAnnotations() {
    return annotations;
}

From source file:org.emonocot.model.Taxon.java

License:Open Source License

/**
 * @return the annotations/*from  ww w .  j a va  2s  .  co  m*/
 */
@OneToMany(fetch = FetchType.LAZY, orphanRemoval = true)
@JoinColumn(name = "annotatedObjId")
@Where(clause = "annotatedObjType = 'Taxon'")
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.MERGE, CascadeType.DELETE })
@JsonIgnore
public Set<Annotation> getAnnotations() {
    return annotations;
}