Project

General

Profile

Revision cb9ebcd2

IDcb9ebcd274057ef2caf8d6fd478ee9347ca94415
Parent cc0fa0be
Child 983949ab

Added by Patrick Plitzner over 1 year ago

ref #8153 Further adapt cdmlib to model changes

  • Adjust feature node service to model changes

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/FeatureNodeServiceImpl.java
25 25
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
26 26
import eu.etaxonomy.cdm.model.common.CdmBase;
27 27
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
28
import eu.etaxonomy.cdm.model.description.Feature;
29 28
import eu.etaxonomy.cdm.model.description.FeatureNode;
30 29
import eu.etaxonomy.cdm.model.description.FeatureTree;
31 30
import eu.etaxonomy.cdm.persistence.dao.description.IFeatureNodeDao;
......
101 100

  
102 101
	 @Override
103 102
	 public UpdateResult createChildFeatureNode(FeatureNode node, DefinedTermBase term){
104
	     Feature feature = (Feature) termService.save(term);
105
	     return addChildFeatureNode(node, feature);
103
	     term = termService.save(term);
104
	     return addChildFeatureNode(node, term);
106 105
	 }
107 106

  
108 107
	 @Override
......
118 117
	 @Override
119 118
	 public UpdateResult addChildFeatureNode(UUID nodeUUID, UUID termChildUuid, int position){
120 119
	     FeatureNode node = load(nodeUUID);
121
         Feature child = HibernateProxyHelper.deproxy(termService.load(termChildUuid), Feature.class);
120
	     DefinedTermBase child = HibernateProxyHelper.deproxy(termService.load(termChildUuid), DefinedTermBase.class);
122 121
         return addChildFeatureNode(node, child, position);
123 122
	 }
124 123

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)