Revision aa52b6f0
Added by Andreas Kohlbecker over 3 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/DerivedUnitDTO.java | ||
---|---|---|
88 | 88 |
// return newInstance; |
89 | 89 |
// } |
90 | 90 |
|
91 |
/** |
|
92 |
* Constructs a new DerivedUnitDTO. All derivatives of the passed <code>DerivedUnit entity</code> will be collected and |
|
93 |
* added as DerivedUnitDTO to the {@link SpecimenOrObservationBaseDTO#getDerivates() derivative DTOs}. |
|
94 |
* |
|
95 |
* @param entity |
|
96 |
* The entity to create the dto for |
|
97 |
* |
|
98 |
* @return <code>null</code> or the new DerivedUnitDTO |
|
99 |
*/ |
|
91 | 100 |
public static DerivedUnitDTO fromEntity(DerivedUnit entity){ |
92 | 101 |
return fromEntity(entity, null); |
93 | 102 |
} |
94 | 103 |
/** |
95 |
|
|
96 | 104 |
* @param entity |
97 | 105 |
* The entity to create the dto for |
98 | 106 |
* @param individualsAssociations |
... | ... | |
100 | 108 |
* action, since individualsAssociations are not accessible from the DerivedUnit side. A service level method call is needed to |
101 | 109 |
* retrieve them, so it would be required to access the OccurrenceServiceImpl from inside of this DTO factory method, which is |
102 | 110 |
* bad OO design. The other option is implemented here, requires all calling Objects to pass the IndividualsAssociations as parameter. |
103 |
* @return |
|
104 |
* |
|
111 |
* @return <code>null</code> or the new DerivedUnitDTO |
|
105 | 112 |
* @deprecated see comment on the parameter <code>individualsAssociations</code> |
106 | 113 |
*/ |
107 | 114 |
@Deprecated |
Also available in: Unified diff
ref #9257 comments including questions on missing filtering in the DrivedUnitDTO construction