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:org.emonocot.model.Taxon.java

License:Open Source License

/**
 * @return a set of measurements or facts about the taxon
 *//* www.  java2  s  .com*/
@OneToMany(fetch = FetchType.LAZY, mappedBy = "taxon", orphanRemoval = true)
@Cascade({ CascadeType.ALL })
@JsonManagedReference("measurementsOrFacts-taxon")
public Set<MeasurementOrFact> getMeasurementsOrFacts() {
    return measurementsOrFacts;
}

From source file:org.tonguetied.usermanagement.User.java

License:Apache License

/**
 * @return the set of authorized permissions granted to a User
 *///from  ww  w.  j  a  v  a  2 s. com
@CollectionOfElements(fetch = FetchType.LAZY)
@Sort(type = SortType.NATURAL)
@JoinTable(name = TABLE_AUTHORITIES, joinColumns = @JoinColumn(name = "user_id"))
@Cascade(CascadeType.ALL)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@GeneratedValue(strategy = GenerationType.AUTO, generator = "authorities_generator")
@SequenceGenerator(name = "authorities_generator", sequenceName = "authorities_user_id_seq")
@ForeignKey(name = FK_AUTHORITIES)
public SortedSet<UserRight> getUserRights() {
    return userRights;
}

From source file:pl.umk.mat.zawodyweb.database.pojo.Tests.java

License:Open Source License

/**
 * Get the list of Results//from   www .  j a  va2 s .c  om
 */
// resultsPK
@OneToMany(mappedBy = "tests", cascade = javax.persistence.CascadeType.ALL)
@Cascade({ CascadeType.SAVE_UPDATE, CascadeType.DELETE_ORPHAN })
public List<Results> getResultss() {
    return this.resultss;
}

From source file:ru.runa.wfe.execution.Token.java

License:Open Source License

@OneToMany(targetEntity = Token.class, fetch = FetchType.LAZY)
@JoinColumn(name = "PARENT_ID")
@Cascade({ CascadeType.ALL, CascadeType.DELETE_ORPHAN })
public Set<Token> getChildren() {
    return children;
}

From source file:ru.runa.wfe.user.Profile.java

License:Open Source License

@OneToMany(targetEntity = BatchPresentation.class, fetch = FetchType.EAGER)
@Sort(type = SortType.UNSORTED)/*from w  w  w  .  java  2  s  . c  om*/
@JoinColumn(name = "PROFILE_ID")
@ForeignKey(name = "FK_BATCH_PRESENTATION_PROFILE")
@Index(name = "IX_BATCH_PRESENTATION_PROFILE")
@Cascade({ CascadeType.ALL, CascadeType.DELETE_ORPHAN })
public Set<BatchPresentation> getBatchPresentations() {
    return batchPresentations;
}

From source file:testapp.bean.Person.java

License:BSD License

@OneToMany(mappedBy = "person", fetch = FetchType.LAZY)
@Cascade(value = { CascadeType.ALL })
public Set<Statement> getStatements() {
    return statements;
}