import org.hibernate.envers.tools.Pair;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
-import eu.etaxonomy.cdm.model.name.TaxonName;
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
import eu.etaxonomy.cdm.model.taxon.Taxon;
super(derivedUnit);
}
- public static PreservedSpecimenDTO newInstance(DerivedUnit derivedUnit, TaxonName name ){
+ public static PreservedSpecimenDTO newInstance(DerivedUnit derivedUnit){
PreservedSpecimenDTO newInstance = new PreservedSpecimenDTO(derivedUnit);
// newInstance.setTitleCache(derivedUnit.getTitleCache());
newInstance.accessionNumber = derivedUnit.getAccessionNumber();
newInstance.preferredStableUri = derivedUnit.getPreferredStableUri();
-
- newInstance.setCollectioDTo(new CollectionDTO(HibernateProxyHelper.deproxy(derivedUnit.getCollection())));
+ if (derivedUnit.getCollection() != null){
+ newInstance.setCollectioDTo(new CollectionDTO(HibernateProxyHelper.deproxy(derivedUnit.getCollection())));
+ }
newInstance.setBarcode(derivedUnit.getBarcode());
newInstance.setCatalogNumber(derivedUnit.getCatalogNumber());
newInstance.listLabel = derivedUnit.getCatalogNumber();