Revision 903cecc9
Added by Cherian Mathew over 9 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/molecular/Amplification.java | ||
---|---|---|
44 | 44 |
* a given {@link #getDnaSample() DNA Sample} . The part of the DNA being replicated is defined by the |
45 | 45 |
* {@link Amplification#getDnaMarker() marker} (also called locus) - implemented in CDM as a {@link DefinedTerm} |
46 | 46 |
* of term type {@link TermType#DnaMarker}. |
47 |
*
|
|
47 |
* |
|
48 | 48 |
* <BR> |
49 | 49 |
* To execute the replication {@link Primer primers} (short DNA fractions) are |
50 | 50 |
* used. They may work in both directions of the DNA part therefore we do have a |
51 | 51 |
* {@link #getForwardPrimer() forward primer} and a {@link #getReversePrimer() reverse primer}. |
52 | 52 |
* Most (or all?) amplifications require a {@link #getPurification() purification process}. Additionally |
53 | 53 |
* some use {@link #getCloning()} for replication. |
54 |
*
|
|
54 |
* |
|
55 | 55 |
* <H3>Quality control</H3> |
56 | 56 |
* <BR> |
57 | 57 |
* For quality control the resulting product (PCR) is tested using a chromatographic method called |
58 | 58 |
* electrophoresis. The parameters (voltage, ladder used, running time, and gel concentration) used |
59 | 59 |
* for this electrophoresis as well as the resulting |
60 |
* {@link #getGelPhoto() photo} are also relevant for an amplification.
|
|
61 |
*
|
|
60 |
* {@link #getGelPhoto() photo} are also relevant for an amplification. |
|
61 |
* |
|
62 | 62 |
* We have 2 classes to store the core data for an amplification: {@link Amplification} and {@link AmplificationResult}. |
63 | 63 |
* <BR> |
64 | 64 |
* In {@link Amplification} we store all data that is equal for an amplification event which includes amplification |
65 | 65 |
* of many {@link DnaSample dna samples}. Those data which are relevant only for a specific dna sample are |
66 | 66 |
* stored in {@link AmplificationResult}. Theoretically this includes data on the resulting PCR. However, as the |
67 | 67 |
* PCR itself is not persistent we do not store further information on it in the CDM and do not handle |
68 |
* {@link AmplificationResult} as a {@link DerivedUnit}.
|
|
68 |
* {@link AmplificationResult} as a {@link DerivedUnit}. |
|
69 | 69 |
* <BR> |
70 | 70 |
* This may change in future: http://dev.e-taxonomy.eu/trac/ticket/3717. |
71 | 71 |
* <BR> |
... | ... | |
109 | 109 |
@XmlIDREF |
110 | 110 |
@XmlSchemaType(name = "IDREF") |
111 | 111 |
@ManyToOne(fetch=FetchType.LAZY) |
112 |
@Cascade({CascadeType.SAVE_UPDATE}) |
|
112 |
@Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE})
|
|
113 | 113 |
private Primer forwardPrimer; |
114 | 114 |
|
115 | 115 |
/** @see #getReversePrimer()*/ |
... | ... | |
117 | 117 |
@XmlIDREF |
118 | 118 |
@XmlSchemaType(name = "IDREF") |
119 | 119 |
@ManyToOne(fetch=FetchType.LAZY) |
120 |
@Cascade({CascadeType.SAVE_UPDATE}) |
|
120 |
@Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE})
|
|
121 | 121 |
private Primer reversePrimer; |
122 | 122 |
|
123 | 123 |
|
... | ... | |
125 | 125 |
@XmlIDREF |
126 | 126 |
@XmlSchemaType(name = "IDREF") |
127 | 127 |
@ManyToOne(fetch=FetchType.LAZY) |
128 |
@Cascade({CascadeType.SAVE_UPDATE}) |
|
128 |
@Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE})
|
|
129 | 129 |
private MaterialOrMethodEvent purification; |
130 |
|
|
130 |
|
|
131 | 131 |
@XmlElement(name = "Institution") |
132 | 132 |
@XmlIDREF |
133 | 133 |
@XmlSchemaType(name = "IDREF") |
134 | 134 |
@ManyToOne(fetch = FetchType.LAZY) |
135 | 135 |
@IndexedEmbedded |
136 |
@Cascade(CascadeType.SAVE_UPDATE)
|
|
136 |
@Cascade({CascadeType.SAVE_UPDATE,CascadeType.MERGE})
|
|
137 | 137 |
@JoinColumn(name="institution_id") |
138 | 138 |
private Institution institution; |
139 | 139 |
|
... | ... | |
160 | 160 |
@Field(analyze = Analyze.NO) |
161 | 161 |
@NumericField |
162 | 162 |
private Double gelConcentration; |
163 |
|
|
163 |
|
|
164 | 164 |
//automatically created |
165 | 165 |
private String labelCache; |
166 | 166 |
|
... | ... | |
236 | 236 |
public void setPurification(MaterialOrMethodEvent purification) { |
237 | 237 |
this.purification = purification; |
238 | 238 |
} |
239 |
|
|
239 |
|
|
240 | 240 |
/** |
241 | 241 |
* The institution in which the amplification event took place. |
242 | 242 |
* Usually the {@link Amplification#getActor()} should be a person |
... | ... | |
322 | 322 |
public void setLadderUsed(String ladderUsed) { |
323 | 323 |
this.ladderUsed = ladderUsed; |
324 | 324 |
} |
325 |
|
|
326 |
|
|
327 |
|
|
325 |
|
|
326 |
|
|
327 |
|
|
328 | 328 |
/** |
329 | 329 |
* Returns the labelCache |
330 | 330 |
* @return |
... | ... | |
336 | 336 |
|
337 | 337 |
/** |
338 | 338 |
* This method pushes the {@link Amplification#labelCache label cache} update. |
339 |
* The cache is otherwise updated during persist in CacheStrategyUpdater.
|
|
339 |
* The cache is otherwise updated during persist in CacheStrategyUpdater. |
|
340 | 340 |
*/ |
341 | 341 |
public void updateCache(){ |
342 | 342 |
//retrieve data |
... | ... | |
347 | 347 |
|
348 | 348 |
//assemble string |
349 | 349 |
String designation = CdmUtils.concat("_", new String[]{institutionName, staffName, dnaMarkerString, dateString}); |
350 |
|
|
350 |
|
|
351 | 351 |
this.labelCache = StringUtils.isBlank(designation) ? "<Amplification:" + getUuid() + ">" : designation ; |
352 | 352 |
} |
353 |
|
|
353 |
|
|
354 | 354 |
|
355 | 355 |
|
356 | 356 |
// ********************** CLONE ***********************************/ |
... | ... | |
368 | 368 |
try{ |
369 | 369 |
Amplification result = (Amplification)super.clone(); |
370 | 370 |
|
371 |
//don't change marker, forwardPrimer, reversePrimer,
|
|
371 |
//don't change marker, forwardPrimer, reversePrimer, |
|
372 | 372 |
//purifiaction, ladderUsed, electrophoresisVoltage, |
373 | 373 |
//gelRunningTime, gelConcentration |
374 | 374 |
return result; |
Also available in: Unified diff
added Cascade.MERGE to all fields with annotation Cascade.SAVE_UPDATE