List of usage examples for javax.persistence CascadeType ALL
CascadeType ALL
To view the source code for javax.persistence CascadeType ALL.
Click Source Link
From source file:org.bonitasoft.engine.business.data.generator.RelationFieldAnnotator.java
public void annotateRelationField(final JDefinedClass entityClass, final RelationField field, final JFieldVar fieldVar) { JAnnotationUse relation = null;//from w ww .j av a2s . c om if (field.isCollection()) { relation = annotateMultipleReference(entityClass, field, fieldVar); } else { relation = annotateSingleReference(entityClass, field, fieldVar); } if (field.isLazy()) { relation.param("fetch", FetchType.LAZY); codeGenerator.addAnnotation(fieldVar, JsonIgnore.class); } else { relation.param("fetch", FetchType.EAGER); } if (field.getType() == Type.COMPOSITION) { relation.param("cascade", CascadeType.ALL); } else if (field.getType() == Type.AGGREGATION) { relation.param("cascade", CascadeType.MERGE); } }
From source file:at.reinisoft.domain.UserRole.java
/** * @return the rolePermissions./*from www .ja va 2 s. com*/ */ @OneToMany(mappedBy = "userRole", cascade = CascadeType.ALL) public Set<UserRolePermission> getRolePermissions() { return this.rolePermissions; }
From source file:uk.nhs.cfh.dsp.snomed.expression.model.impl.SnomedRoleGroupExpression.java
/** * Gets the role group.//from w ww.jav a 2 s. c om * * @return the role group */ @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = SnomedRoleGroupImpl.class) public SnomedRoleGroup getRoleGroup() { return roleGroup; }
From source file:org.openehr.rm.datatypes.quantity.DvInterval.java
/** * Returns upper boundary// ww w . ja v a2s . c om * * @return null if not specified */ @ManyToOne(targetEntity = DvOrdered.class, cascade = CascadeType.ALL) public T getUpper() { // return interval.getUpper(); return upper; }
From source file:org.eclipse.jubula.client.core.model.ParamNodePO.java
/** * //from w w w . j av a 2s .com * @return the object responsible for maintaining the receiver's parameter * interface as well as test data. */ @ManyToOne(cascade = CascadeType.ALL, targetEntity = TestDataCubePO.class, fetch = FetchType.EAGER) @JoinColumn(name = "FK_PARAM_INTERFACE", unique = true) private TestDataCubePO getParameterInterface() { return m_parameterInterface; }
From source file:no.abmu.questionnarie.domain.MainReportData.java
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER /* TODO FETCH */) @MapKey(name = "code") @JoinColumn(name = "mainreportdata_fk") public Map<String, PostData> getPostData() { return super.getPostData(); }
From source file:nl.enovation.addressbook.jpa.pojo.Contact.java
@OneToMany(fetch = FetchType.EAGER, mappedBy = "contact", cascade = CascadeType.ALL, orphanRemoval = true) public Set<PhoneNumberEntry> getPhoneNumbers() { return phoneNumbers; }
From source file:com.infinities.keystone4j.model.catalog.Region.java
@JsonView(Views.All.class) @OneToMany(fetch = FetchType.LAZY, mappedBy = "region", cascade = CascadeType.ALL) public Set<Endpoint> getEndpoints() { return endpoints; }
From source file:com.oakhole.sms.entity.SmsTask.java
@OneToMany(targetEntity = Sms.class, cascade = CascadeType.ALL, mappedBy = "smsTask") @Fetch(FetchMode.SUBSELECT)/*from ww w . j a v a2 s . c o m*/ @OrderBy("id asc") @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) @JsonIgnore @XmlTransient public List<Sms> getSmsList() { return smsList; }
From source file:com.doculibre.constellio.entities.ConnectorManager.java
/** * Lists the connector types provided by this connector manager. * //from w w w . ja v a2 s. co m * @return */ //FIXME Validate cascade... @OneToMany(mappedBy = "connectorManager", cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, orphanRemoval = true) public Set<ConnectorType> getConnectorTypes() { return connectorTypes; }