private Class<T> type;
- /**
- * @deprecated use factory method instead, should only be used by in DTO sub-class constructors
- */
- @Deprecated
protected TypedEntityReference(Class<T> type, UUID uuid, String label) {
super(uuid, label);
this.type = type;
}
- /**
- * @deprecated use factory method instead, should only be used by in DTO sub-class constructors
- */
- @Deprecated
protected TypedEntityReference(T entity) {
this.type = (Class<T>) entity.getClass();
this.uuid = entity.getUuid();
@Override
public Collection<SpecimenOrObservationBaseDTO> findRootUnitDTOs(UUID unitUUID) {
-
SpecimenOrObservationBase<?> entity = load(unitUUID);
SpecimenOrObservationBaseDTO derivedUnitDTO = SpecimenOrObservationDTOFactory.fromEntity(entity);
Collection<SpecimenOrObservationBaseDTO> rootUnitDTOs = new ArrayList<>();
return new CollectionDTO(entity);
}
- /**
- * @deprecated use factory instead
- */
- @Deprecated
- public CollectionDTO(Collection collection) {
+ private CollectionDTO(Collection collection) {
this(collection, new HashSet<>());
}
this.derivatives.addAll(derivatives);
updateTreeDependantData(derivatives);
}
-
-
/**
* To be overwritten by implementing classes to