Revision 696be488
Added by Andreas Müller almost 6 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dto/UuidAndTitleCache.java | ||
---|---|---|
19 | 19 |
/** |
20 | 20 |
* @author n.hoffmann |
21 | 21 |
* @since Aug 14, 2009 |
22 |
* @version 1.0 |
|
23 | 22 |
*/ |
24 | 23 |
|
25 | 24 |
|
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/EntityReference.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
import org.apache.commons.lang.builder.HashCodeBuilder; |
14 | 14 |
|
15 |
/** |
|
16 |
* @author a.kohlbecker |
|
17 |
*/ |
|
15 | 18 |
public class EntityReference { |
16 | 19 |
UUID uuid; |
17 | 20 |
String label; |
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/TypedEntityReference.java | ||
---|---|---|
19 | 19 |
*/ |
20 | 20 |
public class TypedEntityReference<T> extends EntityReference { |
21 | 21 |
|
22 |
|
|
23 |
private Class<T> type; |
|
24 |
|
|
22 | 25 |
/** |
23 | 26 |
* @param uuid |
24 | 27 |
* @param label |
... | ... | |
33 | 36 |
this.type = type; |
34 | 37 |
} |
35 | 38 |
|
36 |
/** |
|
37 |
* @return the type |
|
38 |
*/ |
|
39 | 39 |
public Class<T> getType() { |
40 | 40 |
return type; |
41 | 41 |
} |
42 |
|
|
43 |
/** |
|
44 |
* @param type the type to set |
|
45 |
*/ |
|
46 | 42 |
public void setType(Class<T> type) { |
47 | 43 |
this.type = type; |
48 | 44 |
} |
49 | 45 |
|
50 |
private Class<T> type; |
|
51 |
|
|
52 |
|
|
53 |
|
|
54 | 46 |
/** |
55 | 47 |
* {@inheritDoc} |
56 | 48 |
*/ |
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/name/TypeDesignationSetManager.java | ||
---|---|---|
48 | 48 |
* The TypeDesignationSetManager also provides string representations of the whole ordered set of all |
49 | 49 |
* {@link TypeDesignationBase TypeDesignations} and of the TypeDesignationWorkingSets: |
50 | 50 |
* <ul> |
51 |
* <li>{@link #print()})
|
|
51 |
* <li>{@link #print()} |
|
52 | 52 |
* <li>{@link #getOrderdTypeDesignationWorkingSets()} ... {@link TypeDesignationWorkingSet#getRepresentation()} |
53 | 53 |
* </ul> |
54 | 54 |
* Prior using the representations you need to trigger their generation by calling {@link #buildString()} |
... | ... | |
90 | 90 |
|
91 | 91 |
final NullTypeDesignationStatus NULL_STATUS = new NullTypeDesignationStatus(); |
92 | 92 |
|
93 |
private List<String> probelms = new ArrayList<>();
|
|
93 |
private List<String> problems = new ArrayList<>();
|
|
94 | 94 |
|
95 | 95 |
private boolean printCitation = false; |
96 | 96 |
|
... | ... | |
140 | 140 |
|
141 | 141 |
|
142 | 142 |
/** |
143 |
* |
|
144 |
* @param containgEntity |
|
145 | 143 |
* @param byBaseEntityByTypeStatus |
146 | 144 |
* @param td |
147 | 145 |
*/ |
... | ... | |
164 | 162 |
typedesignationWorkingSet = byBaseEntityByTypeStatus.get(baseEntityReference); |
165 | 163 |
typedesignationWorkingSet.insert(status, typeDesignationEntityReference); |
166 | 164 |
} catch (DataIntegrityException e){ |
167 |
probelms.add(e.getMessage());
|
|
165 |
problems.add(e.getMessage());
|
|
168 | 166 |
} |
169 | 167 |
} |
170 | 168 |
|
... | ... | |
346 | 344 |
} |
347 | 345 |
|
348 | 346 |
/** |
349 |
* FIXME use the validation framework validators and to store the validation problems!!!
|
|
347 |
* FIXME use the validation framework validators to store the validation problems!!! |
|
350 | 348 |
* |
351 | 349 |
* @return |
352 | 350 |
* @throws RegistrationValidationException |
... | ... | |
653 | 651 |
status = NULL_STATUS; |
654 | 652 |
} |
655 | 653 |
if(!containsKey(status)){ |
656 |
put(status, new ArrayList<EntityReference>());
|
|
654 |
put(status, new ArrayList<>()); |
|
657 | 655 |
} |
658 | 656 |
get(status).add(typeDesignationEntityReference); |
659 | 657 |
} |
Also available in: Unified diff
cleanup