Example usage for javax.persistence CascadeType MERGE

List of usage examples for javax.persistence CascadeType MERGE

Introduction

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

Prototype

CascadeType MERGE

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

Click Source Link

Document

Cascade merge operation

Usage

From source file:com.anite.zebra.hivemind.om.state.AbstractZebraTaskInstance.java

/**
 * @return/*from ww  w.j a  va2  s.c  o m*/
 */
@ManyToOne(targetEntity = ZebraProcessInstance.class, cascade = { CascadeType.MERGE, CascadeType.PERSIST })
public IProcessInstance getProcessInstance() {
    return this.processInstance;
}

From source file:com.hmsinc.epicenter.model.surveillance.SurveillanceSet.java

/**
 * @return the attributes/*from   w  w w  . j  av  a2 s. c o m*/
 */
@ManyToMany(cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, fetch = FetchType.LAZY, targetEntity = Attribute.class)
@JoinTable(name = "SURVEILLANCE_SET_ATTRIB", joinColumns = {
        @JoinColumn(name = "ID_SURVEILLANCE_SET") }, inverseJoinColumns = {
                @JoinColumn(name = "ID_ATTRIBUTE") })
@ForeignKey(name = "FK_SURVEILLANCE_SET_ATTRIB_1", inverseName = "FK_SURVEILLANCE_SET_ATTRIB_2")
public Set<Attribute> getAttributes() {
    return attributes;
}

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

/**
 * @return the state/*from w w  w .ja v a2s .  c  o m*/
 */
@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_WORKFLOW_STATE", unique = false, nullable = false, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_INVESTIGATION_1")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public WorkflowState getState() {
    return state;
}

From source file:edu.harvard.med.screensaver.model.AttachedFile.java

@ManyToOne(fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST, CascadeType.MERGE })
@JoinColumn(name = "screensaverUserId", nullable = true, updatable = false)
@org.hibernate.annotations.ForeignKey(name = "fk_attached_file_to_screening_room_user")
@org.hibernate.annotations.LazyToOne(value = org.hibernate.annotations.LazyToOneOption.PROXY)
@ToOne(hasNonconventionalSetterMethod = true /* mutually-exclusive parenting relationships */)
public ScreeningRoomUser getScreeningRoomUser() {
    return _screeningRoomUser;
}

From source file:example.app.model.Contact.java

@ManyToOne(fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE })
@JoinColumn(name = "phone_number_id")
public PhoneNumber getPhoneNumber() {
    return phoneNumber;
}

From source file:com.hmsinc.epicenter.model.surveillance.SurveillanceTask.java

/**
 * @return the sets//from  ww w .  j  a  v  a2  s  .co m
 */
@ManyToMany(cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, fetch = FetchType.LAZY, targetEntity = SurveillanceSet.class)
@JoinTable(name = "SURVEILLANCE_TASK_SET", joinColumns = {
        @JoinColumn(name = "ID_SURVEILLANCE_TASK") }, inverseJoinColumns = {
                @JoinColumn(name = "ID_SURVEILLANCE_SET") })
@ForeignKey(name = "FK_SURVEILLANCE_TASK_SET_1", inverseName = "FK_SURVEILLANCE_TASK_SET_2")
public Set<SurveillanceSet> getSets() {
    return sets;
}

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

/**
 * @return the assignedTo/* w w w .  j  a v  a2s  . c o m*/
 */
@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST }, fetch = FetchType.LAZY)
@JoinColumn(name = "ID_APP_USER_ASSIGNED_TO", unique = false, nullable = true, insertable = true, updatable = true)
@org.hibernate.annotations.ForeignKey(name = "FK_INVESTIGATION_2")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public EpiCenterUser getAssignedTo() {
    return assignedTo;
}

From source file:edu.harvard.med.screensaver.model.AttachedFile.java

@ManyToOne(fetch = FetchType.LAZY, cascade = { CascadeType.PERSIST, CascadeType.MERGE })
@JoinColumn(name = "reagentId", nullable = true, updatable = false)
@org.hibernate.annotations.Immutable/*from www. j  av  a2 s.  com*/
@org.hibernate.annotations.ForeignKey(name = "fk_attached_file_to_reagent")
@org.hibernate.annotations.LazyToOne(value = org.hibernate.annotations.LazyToOneOption.PROXY)
@ToOne(hasNonconventionalSetterMethod = true /* mutually-exclusive parenting relationships */)
public Reagent getReagent() {
    return _reagent;
}

From source file:com.eryansky.entity.base.Organ.java

@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
@JoinColumn(name = "PARENT_ID")
public Organ getParentOrgan() {
    return parentOrgan;
}

From source file:com.hmsinc.epicenter.model.health.Interaction.java

@ManyToMany(cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, fetch = FetchType.LAZY, targetEntity = Classification.class)
@JoinTable(name = "INTERACTION_CLASSIFICATION", joinColumns = {
        @JoinColumn(name = "ID_INTERACTION") }, inverseJoinColumns = {
                @JoinColumn(name = "ID_CLASSIFICATION") })
@ForeignKey(name = "FK_INTERACTION_CLASS_1")
public Set<Classification> getClassifications() {
    return this.classifications;
}