Revision eac82784
Added by Andreas Müller about 5 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/IdentifiableEntity.java | ||
---|---|---|
82 | 82 |
"credits", |
83 | 83 |
"extensions", |
84 | 84 |
"identifiers", |
85 |
"rights", |
|
86 |
"sources" |
|
85 |
"rights" |
|
87 | 86 |
}) |
88 | 87 |
@Audited |
89 | 88 |
@MappedSuperclass |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/common/SourcedEntityBase.java | ||
---|---|---|
39 | 39 |
*/ |
40 | 40 |
@XmlAccessorType(XmlAccessType.FIELD) |
41 | 41 |
@XmlType(name = "SourcedEntityBase", propOrder = { |
42 |
|
|
42 |
"sources" |
|
43 | 43 |
}) |
44 | 44 |
@XmlRootElement(name = "SourcedEntityBase") |
45 | 45 |
@MappedSuperclass |
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/TypeDesignationBase.java | ||
---|---|---|
55 | 55 |
*/ |
56 | 56 |
@XmlRootElement(name = "TypeDesignationBase") |
57 | 57 |
@XmlType(name = "TypeDesignationBase", propOrder = { |
58 |
"typifiedNames", |
|
59 |
"notDesignated", |
|
60 | 58 |
"typeStatus", |
59 |
"notDesignated", |
|
60 |
"typifiedNames", |
|
61 |
"citation", |
|
62 |
"citationMicroReference", |
|
61 | 63 |
"registrations", |
62 | 64 |
}) |
63 | 65 |
@XmlSeeAlso({ |
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/NameServiceImpl.java | ||
---|---|---|
57 | 57 |
import eu.etaxonomy.cdm.model.common.ReferencedEntityBase; |
58 | 58 |
import eu.etaxonomy.cdm.model.common.RelationshipBase; |
59 | 59 |
import eu.etaxonomy.cdm.model.common.RelationshipBase.Direction; |
60 |
import eu.etaxonomy.cdm.model.common.SourcedEntityBase; |
|
60 | 61 |
import eu.etaxonomy.cdm.model.description.DescriptionElementSource; |
61 | 62 |
import eu.etaxonomy.cdm.model.name.HomotypicalGroup; |
62 | 63 |
import eu.etaxonomy.cdm.model.name.HybridRelationship; |
... | ... | |
76 | 77 |
import eu.etaxonomy.cdm.persistence.dao.common.ICdmGenericDao; |
77 | 78 |
import eu.etaxonomy.cdm.persistence.dao.common.IOrderedTermVocabularyDao; |
78 | 79 |
import eu.etaxonomy.cdm.persistence.dao.common.IReferencedEntityDao; |
80 |
import eu.etaxonomy.cdm.persistence.dao.common.ISourcedEntityDao; |
|
79 | 81 |
import eu.etaxonomy.cdm.persistence.dao.common.ITermVocabularyDao; |
80 | 82 |
import eu.etaxonomy.cdm.persistence.dao.name.IHomotypicalGroupDao; |
81 | 83 |
import eu.etaxonomy.cdm.persistence.dao.name.INomenclaturalStatusDao; |
... | ... | |
105 | 107 |
@Qualifier("refEntDao") |
106 | 108 |
protected IReferencedEntityDao<ReferencedEntityBase> referencedEntityDao; |
107 | 109 |
@Autowired |
110 |
@Qualifier("sourcedEntityDao") |
|
111 |
protected ISourcedEntityDao<SourcedEntityBase<?>> sourcedEntityDao; |
|
112 |
@Autowired |
|
108 | 113 |
private INomenclaturalStatusDao nomStatusDao; |
109 | 114 |
@Autowired |
110 | 115 |
private ITypeDesignationDao typeDesignationDao; |
... | ... | |
195 | 200 |
@Transactional |
196 | 201 |
public DeleteResult deleteTypeDesignation(TaxonName name, TypeDesignationBase<?> typeDesignation){ |
197 | 202 |
if(typeDesignation != null && typeDesignation .isPersited()){ |
198 |
typeDesignation = HibernateProxyHelper.deproxy(referencedEntityDao.load(typeDesignation.getUuid()), TypeDesignationBase.class);
|
|
203 |
typeDesignation = HibernateProxyHelper.deproxy(sourcedEntityDao.load(typeDesignation.getUuid()), TypeDesignationBase.class);
|
|
199 | 204 |
} |
200 | 205 |
|
201 | 206 |
DeleteResult result = new DeleteResult(); |
... | ... | |
229 | 234 |
@Transactional(readOnly = false) |
230 | 235 |
public DeleteResult deleteTypeDesignation(UUID nameUuid, UUID typeDesignationUuid){ |
231 | 236 |
TaxonName nameBase = load(nameUuid); |
232 |
TypeDesignationBase<?> typeDesignation = HibernateProxyHelper.deproxy(referencedEntityDao.load(typeDesignationUuid), TypeDesignationBase.class);
|
|
237 |
TypeDesignationBase<?> typeDesignation = HibernateProxyHelper.deproxy(sourcedEntityDao.load(typeDesignationUuid), TypeDesignationBase.class);
|
|
233 | 238 |
return deleteTypeDesignation(nameBase, typeDesignation); |
234 | 239 |
} |
235 | 240 |
|
cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/utility/DerivedUnitConverterIntegrationTest.java | ||
---|---|---|
117 | 117 |
"specimenTypeDesignations.annotations", |
118 | 118 |
"specimenTypeDesignations.markers", |
119 | 119 |
"specimenTypeDesignations.registrations", |
120 |
"specimenTypeDesignations.sources", |
|
120 | 121 |
// |
121 | 122 |
"derivedFrom.originals.gatheringEvent.$", |
122 | 123 |
"derivedFrom.originals.gatheringEvent.country", |
cdmlib-test/src/main/resources/dbscripts/001-cdm.h2.sql | ||
---|---|---|
5258 | 5258 |
REVTYPE TINYINT |
5259 | 5259 |
); |
5260 | 5260 |
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TYPEDESIGNATIONBASE_MARKER_AUD; |
5261 |
CREATE CACHED TABLE PUBLIC.TYPEDESIGNATIONBASE_ORIGINALSOURCEBASE( |
|
5262 |
TYPEDESIGNATIONBASE_ID INTEGER NOT NULL, |
|
5263 |
SOURCES_ID INTEGER NOT NULL |
|
5264 |
); |
|
5265 |
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAME_ORIGINALSOURCEBASE; |
|
5266 |
CREATE CACHED TABLE PUBLIC.TYPEDESIGNATIONBASE_ORIGINALSOURCEBASE_AUD( |
|
5267 |
REV INTEGER NOT NULL, |
|
5268 |
TYPEDESIGNATIONBASE_ID INTEGER NOT NULL, |
|
5269 |
SOURCES_ID INTEGER NOT NULL, |
|
5270 |
REVTYPE TINYINT |
|
5271 |
); |
|
5272 |
-- 0 +/- SELECT COUNT(*) FROM PUBLIC.TAXONNAME_ORIGINALSOURCEBASE_AUD; |
|
5273 |
|
|
5261 | 5274 |
CREATE CACHED TABLE PUBLIC.USERACCOUNT( |
5262 | 5275 |
ID INTEGER NOT NULL, |
5263 | 5276 |
CREATED TIMESTAMP, |
Also available in: Unified diff
ref #8017 add sources to TypeDesignationBase (cont.)