List of usage examples for javax.persistence CascadeType MERGE
CascadeType MERGE
To view the source code for javax.persistence CascadeType MERGE.
Click Source Link
From source file:com.hmsinc.epicenter.model.provider.Facility.java
/** * @return the affiliations//from w ww .j av a 2 s .co m */ @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY, targetEntity = Facility.class) @JoinTable(name = "FACILITY_AFFILIATION", joinColumns = { @JoinColumn(name = "ID_FACILITY") }, inverseJoinColumns = { @JoinColumn(name = "ID_FACILITY_AFFILIATION") }) @ForeignKey(name = "FK_FACILITY_AFFILIATION_1", inverseName = "FK_FACILITY_AFFILIATION_2") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public Set<Facility> getAffiliations() { return affiliations; }
From source file:com.denimgroup.threadfix.data.entities.Application.java
@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE }) @JoinColumn(name = "wafId") @JsonIgnore public Waf getWaf() { return waf; }
From source file:gov.nih.nci.firebird.data.Protocol.java
/** * @return sponsor organization./* w ww .ja v a 2 s . c o m*/ */ @ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH }) @Cascade(org.hibernate.annotations.CascadeType.SAVE_UPDATE) @JoinColumn(name = "sponsor_id") @ForeignKey(name = "protocol_sponsor_fkey") @NotNull public Organization getSponsor() { return sponsor; }
From source file:gov.nih.nci.firebird.data.AbstractRegistration.java
/** * @return the investigator's profile, if known. *//* w w w . jav a2 s . c o m*/ @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "investigator_profile_id") @ForeignKey(name = "registration_investigatorprofile_fkey") @Cascade({ org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.MERGE, org.hibernate.annotations.CascadeType.REFRESH }) @NotNull public InvestigatorProfile getProfile() { return profile; }
From source file:com.openlegacy.enterprise.ide.eclipse.editors.pages.details.jpa.FieldsJpaManyToOneFieldDetailsPage.java
private static String[] getCascadeItems() { List<String> list = new ArrayList<String>(); list.add(CascadeType.ALL.toString()); list.add(CascadeType.PERSIST.toString()); list.add(CascadeType.MERGE.toString()); list.add(CascadeType.REMOVE.toString()); list.add(CascadeType.REFRESH.toString()); list.add(CascadeType.DETACH.toString()); return list.toArray(new String[] {}); }
From source file:com.hmsinc.epicenter.model.provider.Facility.java
/** * @return the contacts//from ww w. j av a2 s .c o m */ @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY, targetEntity = Contact.class) @JoinTable(name = "FACILITY_CONTACT", joinColumns = { @JoinColumn(name = "ID_FACILITY") }, inverseJoinColumns = { @JoinColumn(name = "ID_CONTACT") }) @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public Set<Contact> getContacts() { return contacts; }
From source file:edu.ku.brc.specify.datamodel.SpecifyUser.java
/** * @return - //www.j a v a 2 s .co m */ @OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "specifyUser") @org.hibernate.annotations.Cascade({ org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.MERGE, org.hibernate.annotations.CascadeType.LOCK }) public Set<Agent> getAgents() { return this.agents; }
From source file:com.hmsinc.epicenter.model.provider.Facility.java
/** * @return the duas//w ww. j a va 2 s .co m */ @OneToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY, mappedBy = "facility") public Set<FacilityDUA> getDuas() { return duas; }
From source file:com.hmsinc.epicenter.model.permission.EpiCenterUser.java
/** * @return the roles/*from w ww . j av a 2 s . co m*/ */ @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.EAGER, targetEntity = EpiCenterRole.class) @JoinTable(name = "APP_USER_ROLE", joinColumns = { @JoinColumn(name = "ID_APP_USER") }, inverseJoinColumns = { @JoinColumn(name = "ID_APP_ROLE") }) @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public Set<EpiCenterRole> getRoles() { return roles; }
From source file:com.hmsinc.epicenter.model.permission.EpiCenterUser.java
/** * @return the organizations/*from w w w . ja va 2 s . co m*/ */ @ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY, mappedBy = "users", targetEntity = Organization.class) @ForeignKey(name = "FK_ORGANIZATION_USER_1", inverseName = "FK_ORGANIZATION_USER_2") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) public Set<Organization> getOrganizations() { return organizations; }