List of usage examples for javax.persistence CascadeType PERSIST
CascadeType PERSIST
To view the source code for javax.persistence CascadeType PERSIST.
Click Source Link
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 w ww. j ava2 s .c o m*/ @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; }
From source file:com.eryansky.entity.base.User.java
@ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY) @JoinTable(name = "T_BASE_USER_RESOURCE", joinColumns = { @JoinColumn(name = "USER_ID") }, inverseJoinColumns = { @JoinColumn(name = "RESOURCE_ID") }) // @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE,region = CacheConstants.HIBERNATE_CACHE_BASE) public List<Resource> getResources() { return resources; }
From source file:com.anite.zebra.hivemind.om.state.AbstractZebraTaskInstance.java
@ManyToOne(targetEntity = ZebraFOE.class, cascade = { CascadeType.PERSIST, CascadeType.MERGE }) public IFOE getFOE() { return this.FOE; }
From source file:com.hmsinc.epicenter.model.permission.Organization.java
/** * @return the workflow// ww w . j a va 2 s . com */ @ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY) @JoinColumn(name = "ID_WORKFLOW", unique = false, nullable = false, insertable = true, updatable = true) @ForeignKey(name = "FK_ORGANIZATION_1") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public Workflow getWorkflow() { return workflow; }
From source file:com.hmsinc.epicenter.model.surveillance.SurveillanceSet.java
/** * @return the tasks//from w ww. ja v a 2s. c om */ @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY, mappedBy = "sets", targetEntity = SurveillanceTask.class) public Set<SurveillanceTask> getTasks() { return tasks; }
From source file:com.hmsinc.epicenter.model.workflow.Event.java
/** * @return the investigations/*from ww w . j a va 2 s . c om*/ */ @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, mappedBy = "events", targetEntity = Investigation.class) @ForeignKey(name = "FK_INVESTIGATION_EVENT_1", inverseName = "FK_INVESTIGATION_EVENT_2") // for some strange reason caching here is causing bug TRX-609 //@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public Set<Investigation> getInvestigations() { return investigations; }
From source file:gov.nih.nci.firebird.data.AbstractPersonAssociation.java
/** * @return the person/* w ww . j av a 2s . c o m*/ */ @ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH }, optional = false) @Cascade(org.hibernate.annotations.CascadeType.SAVE_UPDATE) @ForeignKey(name = "person_association_person_fkey") public Person getPerson() { return person; }
From source file:gov.nih.nci.firebird.data.ShippingDesignee.java
/** * @return the organization/* ww w. j a va 2 s. c o m*/ */ @ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH }) @Cascade(org.hibernate.annotations.CascadeType.SAVE_UPDATE) @JoinColumn(name = "organization_id") @ForeignKey(name = "shipping_designee_organization_fkey") @Valid @NotNull public Organization getOrganization() { return organization; }