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:edu.ku.brc.specify.datamodel.CollectingEvent.java

License:Open Source License

/**
 * //from www.j a v  a2  s .c o m
 */
@OneToMany(mappedBy = "collectingEvent")
@Cascade({ CascadeType.ALL, CascadeType.DELETE_ORPHAN })
@OrderBy("orderNumber ASC")
public Set<Collector> getCollectors() {
    return this.collectors;
}

From source file:edu.ku.brc.specify.datamodel.CollectingEvent.java

License:Open Source License

/**
 * @return the collectingEventAttrs/* ww w. j a  v a 2 s.c  o m*/
 */
@OneToMany(mappedBy = "collectingEvent")
@Cascade({ CascadeType.ALL, CascadeType.DELETE_ORPHAN })
public Set<CollectingEventAttr> getCollectingEventAttrs() {
    return collectingEventAttrs;
}

From source file:edu.ku.brc.specify.datamodel.CollectingEvent.java

License:Open Source License

@ManyToOne(cascade = { javax.persistence.CascadeType.ALL }, fetch = FetchType.LAZY)
@org.hibernate.annotations.Cascade({ org.hibernate.annotations.CascadeType.ALL,
        org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
@JoinColumn(name = "CollectingEventAttributeID")
public CollectingEventAttribute getCollectingEventAttribute() {
    return collectingEventAttribute;
}

From source file:edu.ku.brc.specify.datamodel.CollectingEvent.java

License:Open Source License

@OneToMany(mappedBy = "collectingEvent")
@org.hibernate.annotations.Cascade({ org.hibernate.annotations.CascadeType.ALL,
        org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
@OrderBy("ordinal ASC")
public Set<CollectingEventAttachment> getCollectingEventAttachments() {
    return collectingEventAttachments;
}

From source file:edu.ku.brc.specify.datamodel.CollectingTrip.java

License:Open Source License

/**
 * //from w  ww . j a v a  2  s.  com
 */
@OneToMany(mappedBy = "collectingTrip")
@Cascade({ CascadeType.ALL, CascadeType.DELETE_ORPHAN })
@OrderBy("orderNumber ASC")
public Set<FundingAgent> getFundingAgents() {
    return this.fundingAgents;
}

From source file:edu.ku.brc.specify.datamodel.Collection.java

License:Open Source License

/**
 * @return the technicalContacts//  w  w w. j  a va 2s . c  o  m
 */
@OneToMany(cascade = {
        javax.persistence.CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "collTechContact")
public Set<Agent> getTechnicalContacts() {
    return technicalContacts;
}

From source file:edu.ku.brc.specify.datamodel.Collection.java

License:Open Source License

/**
 * @return the contentContacts/*from w ww. ja v  a  2s.  c om*/
 */
@OneToMany(cascade = {
        javax.persistence.CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "collContentContact")
public Set<Agent> getContentContacts() {
    return contentContacts;
}

From source file:edu.ku.brc.specify.datamodel.Collection.java

License:Open Source License

/**
 * @return the prepTypes//from  w w  w . ja va 2  s . c  o  m
 */
@OneToMany(mappedBy = "collection")
@Cascade({ CascadeType.ALL, CascadeType.DELETE_ORPHAN })
public Set<PrepType> getPrepTypes() {
    return prepTypes;
}

From source file:edu.ku.brc.specify.datamodel.Collection.java

License:Open Source License

/**
 * @return the leftSideRelTypes/*  ww w . j  av  a  2  s  . c om*/
 */
@OneToMany(cascade = {
        javax.persistence.CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "leftSideCollection")
public Set<CollectionRelType> getLeftSideRelTypes() {
    return leftSideRelTypes;
}

From source file:edu.ku.brc.specify.datamodel.Collection.java

License:Open Source License

/**
 * @return the rightSideRelTypes/*from   w  w w .  j av a 2  s .  c o m*/
 */
//    @OneToMany(cascade = {javax.persistence.CascadeType.ALL}, fetch = FetchType.LAZY, mappedBy = "leftSideCollection")
@OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "rightSideCollection")
@Cascade({ CascadeType.ALL })
public Set<CollectionRelType> getRightSideRelTypes() {
    return rightSideRelTypes;
}