Example usage for javax.persistence CascadeType ALL

List of usage examples for javax.persistence CascadeType ALL

Introduction

In this page you can find the example usage for javax.persistence CascadeType ALL.

Prototype

CascadeType ALL

To view the source code for javax.persistence CascadeType ALL.

Click Source Link

Document

Cascade all operations

Usage

From source file:com.testing26thjuly_.db123testing.SelfRelationTable.java

@JsonIgnoreProperties({ "selfRelationTableByIntCol", "selfRelationTablesForIntCol" })
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "selfRelationTableByIntCol")
public List<SelfRelationTable> getSelfRelationTablesForIntCol() {
    return this.selfRelationTablesForIntCol;
}

From source file:no.abmu.questionnaire.domain.data.SchemaDataImpl.java

/**
 * column="id"/*from w ww.  j a v a2 s  .c o m*/
 * @hibernate.map table="FINANCE_POST_DATA" cascade="all" outer-join="true" batch-size="50" lazy="false"
 * @hibernate.key column="coll_key"
 * 
 * @hibernate.index column="code" type="string"
 * @hibernate.one-to-many class="no.abmu.finances.domain.PostData"
 * @hibernate.cache usage="nonstrict-read-write"
 * @hibernate.collection-key column="coll_key"
 * @hibernate.collection-index column="code" type="string"
 * @hibernate.collection-one-to-many column="id" class="no.abmu.finances.domain.PostData"
 *
 *    hibernate.collection-cache usage="nonstrict-read-write"
 */

@OneToMany(targetEntity = FieldDataImpl.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinTable(name = "SCHEMADATA_FIELDDATA_MAP", schema = DbSchemaNameConst.QUESTIONNAIRE_DB_SCHEMA_NAME)
@MapKey(columns = { @Column(name = "code") }, targetElement = String.class)
public Map<String, FieldData> getFieldData() {
    return fieldDataMap;
}

From source file:uk.nhs.cfh.dsp.snomed.objectmodel.impl.SnomedRelationshipImpl.java

@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = SnomedConceptImpl.class)
@JoinTable(name = "Targets", joinColumns = @JoinColumn(name = "relationship_id"), inverseJoinColumns = @JoinColumn(name = "target_id"))
public SnomedConcept getTargetConcept() {
    return targetConcept;
}

From source file:com.vmware.thinapp.workpool.model.WorkpoolModel.java

@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
public Set<LeaseModel> getLeases() {
    return leases;
}

From source file:org.tsm.concharto.model.Event.java

@ManyToOne(cascade = { CascadeType.ALL })
@ForeignKey(name = "FK_EVENT_TIMEPR")
@Cascade(org.hibernate.annotations.CascadeType.DELETE)
public TimeRange getWhen() {
    return when;
}

From source file:org.photovault.replication.ObjectHistory.java

/**
 Returns all known changes in target objects's history. 
 *//*w w  w .j  a v a 2 s  . c  om*/
@OneToMany(mappedBy = "targetHistory", cascade = CascadeType.ALL, targetEntity = Change.class)
public Set<Change<T>> getChanges() {
    return this.allChanges;
}

From source file:com.infinities.keystone4j.model.identity.Group.java

@JsonView(Views.All.class)
@OneToMany(fetch = FetchType.LAZY, mappedBy = "group", cascade = CascadeType.ALL)
public Set<UserGroupMembership> getUserGroupMemberships() {
    return userGroupMemberships;
}

From source file:com.home.ln_spring.ch10.domain.ContactAudit.java

@OneToMany(mappedBy = "contact", cascade = CascadeType.ALL, orphanRemoval = true)
@NotAudited/*from   w  w  w .  j a  v  a2s.  com*/
public Set<ContactTelDetail> getContactTelDetails() {
    return contactTelDetails;
}

From source file:com.hmsinc.epicenter.model.workflow.Activity.java

/**
 * @return the investigation//from w  w w  .  j  av a 2s  .c  o  m
 */
@ManyToOne(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_INVESTIGATION", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_ACTIVITY_2")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public Investigation getInvestigation() {
    return investigation;
}

From source file:tools.xor.db.pm.Task.java

@OneToOne(mappedBy = "task", cascade = CascadeType.ALL, optional = true, orphanRemoval = true)
public Quote getQuote() {
    return quote;
}