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.projectforge.business.fibu.AuftragDO.java
/** * Get the position entries for this object. *//*from ww w .ja v a2 s.co m*/ @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true, mappedBy = "auftrag") //@OrderColumn(name = "number") //TODO: Kann so nicht verwendet werden, da Zhler bei 1 starten muss. Grerer Umbau von nten, um es zu ndern. @IndexColumn(name = "number", base = 1) public List<AuftragsPositionDO> getPositionen() { if (this.positionen == null) { log.debug("The list of AuftragsPositionDO is null. AuftragDO id: " + this.getId()); return Collections.emptyList(); } for (AuftragsPositionDO aPosition : this.positionen) { if (aPosition == null) { log.debug("AuftragsPositionDO is null in list. AuftragDO id: " + this.getId()); } } return this.positionen; }
From source file:com.doculibre.constellio.entities.IndexField.java
/** * Copy fields that copy content in the current index field. * /*w w w . j a v a 2 s .c o m*/ * @return */ @OneToMany(mappedBy = "indexFieldDest", cascade = { CascadeType.ALL }, orphanRemoval = true) public Set<CopyField> getCopyFieldsDest() { return copyFieldsDest; }
From source file:gov.nih.nci.firebird.data.Protocol.java
@OneToMany(mappedBy = PROTOCOL_STRING, fetch = FetchType.LAZY) @Cascade({ org.hibernate.annotations.CascadeType.ALL, org.hibernate.annotations.CascadeType.DELETE_ORPHAN }) private Set<AbstractProtocolRegistration> getRegistrationsInternal() { return registrations; }
From source file:org.eclipse.jubula.client.core.model.ObjectMappingPO.java
/** * /*from w ww. j a v a 2s . c om*/ * {@inheritDoc} */ @OneToOne(targetEntity = ObjectMappingCategoryPO.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER, optional = false) @BatchFetch(value = BatchFetchType.JOIN) public IObjectMappingCategoryPO getUnmappedLogicalCategory() { clearMappingsCache(); // may be changed outside of class return m_unmappedLogicalCategory; }
From source file:org.orcid.persistence.jpa.entities.ProfileEntity.java
/** * @return the researcherUrls/* w ww .j a v a 2 s.co m*/ */ @OneToMany(cascade = CascadeType.ALL, mappedBy = "user") @Sort(type = SortType.NATURAL) public SortedSet<ResearcherUrlEntity> getResearcherUrls() { return researcherUrls; }
From source file:com.doculibre.constellio.entities.RecordCollection.java
@OneToMany(mappedBy = "recordCollection", cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, orphanRemoval = true) public Set<SynonymList> getSynonymLists() { return synonymLists; }
From source file:org.opennms.netmgt.model.OnmsHwEntity.java
/** * Gets the children.//from www . ja va2 s .c o m * * @return the children */ @XmlElement(name = "hwEntity") @XmlElementWrapper(name = "children") @Sort(type = SortType.NATURAL, comparator = OnmsHwEntity.class) @OneToMany(mappedBy = "parent", fetch = FetchType.LAZY, cascade = { CascadeType.ALL }) public SortedSet<OnmsHwEntity> getChildren() { return m_children; }
From source file:org.eclipse.jubula.client.core.model.ExecTestCasePO.java
/** * only for Persistence (JPA / EclipseLink) * //from w w w . j a v a2s .c o m * @return Returns the compNameMap. */ @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER, targetEntity = CompNamesPairPO.class) @MapKeyColumn(name = "MK_EXECTC_COMPNAMES") @JoinColumn(name = "FK_EXECTC") @BatchFetch(value = BatchFetchType.JOIN) private Map<String, ICompNamesPairPO> getHbmCompNamesMap() { return m_compNamesMap; }
From source file:com.doculibre.constellio.entities.RecordCollection.java
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, orphanRemoval = true) @OrderColumn(name = "facetIndex") @JoinColumn(name = "recordCollection_id", nullable = false) public List<CollectionFacet> getCollectionFacets() { return collectionFacets; }
From source file:org.eclipse.jubula.client.core.model.ObjectMappingPO.java
/** * // w ww . ja v a 2s. c o m * {@inheritDoc} */ @OneToOne(targetEntity = ObjectMappingCategoryPO.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER, optional = false) @BatchFetch(value = BatchFetchType.JOIN) public IObjectMappingCategoryPO getUnmappedTechnicalCategory() { clearMappingsCache(); // may be changed outside of class return m_unmappedTechnicalCategory; }