Revision 5ab2bdcf
Added by Andreas Müller over 2 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/SingleTermUpdater.java | ||
---|---|---|
26 | 26 |
* Creates a new term if a term with the same given uuid does not exist yet |
27 | 27 |
* @author a.mueller |
28 | 28 |
* @since 10.09.2010 |
29 |
* |
|
30 | 29 |
*/ |
31 | 30 |
public class SingleTermUpdater extends SchemaUpdaterStepBase { |
31 |
|
|
32 | 32 |
@SuppressWarnings("unused") |
33 | 33 |
private static final Logger logger = Logger.getLogger(SingleTermUpdater.class); |
34 | 34 |
|
35 |
/** |
|
36 |
* @Deprecated use {@link #NewInstance(String, TermType, UUID, String, String, String, String, UUID, UUID, boolean, UUID)} instead |
|
37 |
*/ |
|
38 |
@Deprecated |
|
39 |
public static final SingleTermUpdater NewInstance(List<ISchemaUpdaterStep> stepList, String stepName, UUID uuidTerm, String description, String label, String abbrev, String dtype, UUID uuidVocabulary, UUID uuidLanguage, boolean isOrdered, UUID uuidAfterTerm){ |
|
40 |
return new SingleTermUpdater(stepList, stepName, null, uuidTerm, null, null, description, label, abbrev, null, null, null, dtype, uuidVocabulary, uuidLanguage, isOrdered, uuidAfterTerm); |
|
41 |
} |
|
35 |
// **************************** FACTORY METHODS ********************************/ |
|
42 | 36 |
|
43 | 37 |
public static final SingleTermUpdater NewInstance(List<ISchemaUpdaterStep> stepList, String stepName, TermType termType, UUID uuidTerm, String idInVocabulary, String symbol, |
44 | 38 |
String description, String label, String abbrev, String dtype, UUID uuidVocabulary, UUID uuidLanguage, boolean isOrdered, UUID uuidAfterTerm){ |
... | ... | |
46 | 40 |
description, label, abbrev, null, null, null, dtype, uuidVocabulary, uuidLanguage, isOrdered, uuidAfterTerm); |
47 | 41 |
} |
48 | 42 |
|
49 |
public static final SingleTermUpdater NewReverseInstance(List<ISchemaUpdaterStep> stepList, String stepName, TermType termType, UUID uuidTerm, String idInVocabulary, String symbol,
|
|
50 |
String description, String label, String abbrev, String reverseDescription, String reverseLabel, String reverseAbbrev,
|
|
51 |
String dtype, UUID uuidVocabulary, UUID uuidLanguage, boolean isOrdered, UUID uuidAfterTerm){
|
|
52 |
return new SingleTermUpdater(stepList, stepName, termType, uuidTerm, idInVocabulary,symbol,
|
|
53 |
description, label, abbrev, reverseDescription, reverseLabel, reverseAbbrev,
|
|
54 |
dtype, uuidVocabulary, uuidLanguage, isOrdered, uuidAfterTerm);
|
|
55 |
}
|
|
43 |
public static final SingleTermUpdater NewReverseInstance(List<ISchemaUpdaterStep> stepList, String stepName, TermType termType, UUID uuidTerm, String idInVocabulary, String symbol,
|
|
44 |
String description, String label, String abbrev, String reverseDescription, String reverseLabel, String reverseAbbrev, |
|
45 |
String dtype, UUID uuidVocabulary, UUID uuidLanguage, boolean isOrdered, UUID uuidAfterTerm){ |
|
46 |
return new SingleTermUpdater(stepList, stepName, termType, uuidTerm, idInVocabulary,symbol, |
|
47 |
description, label, abbrev, reverseDescription, reverseLabel, reverseAbbrev, |
|
48 |
dtype, uuidVocabulary, uuidLanguage, isOrdered, uuidAfterTerm); |
|
49 |
} |
|
56 | 50 |
|
51 |
// *************************** VARIABLES *****************************************/ |
|
57 | 52 |
|
58 | 53 |
private final UUID uuidTerm ; |
59 | 54 |
private final String description; |
... | ... | |
74 | 69 |
private boolean transitive = false; |
75 | 70 |
private String symbol; |
76 | 71 |
|
77 |
|
|
72 |
// ***************************** CONSTRUCTOR ***************************************/ |
|
78 | 73 |
|
79 | 74 |
private SingleTermUpdater(List<ISchemaUpdaterStep> stepList, String stepName, TermType termType, UUID uuidTerm, String idInVocabulary, String symbol, |
80 | 75 |
String description, String label, String abbrev, String reverseDescription, String reverseLabel, String reverseAbbrev, |
... | ... | |
97 | 92 |
this.reverseAbbrev = reverseAbbrev; |
98 | 93 |
} |
99 | 94 |
|
95 |
// ******************************* METHODS *************************************************/ |
|
96 |
|
|
100 | 97 |
@Override |
101 | 98 |
public void invoke(ICdmDataSource datasource, IProgressMonitor monitor, |
102 | 99 |
CaseType caseType, SchemaUpdateResult result) throws SQLException { |
Also available in: Unified diff
cleanup