Revision 1c4f6bb6
Added by Cherian Mathew over 10 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java | ||
---|---|---|
30 | 30 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
31 | 31 |
import eu.etaxonomy.cdm.model.common.ICdmBase; |
32 | 32 |
import eu.etaxonomy.cdm.model.common.IDefinedTerm; |
33 |
import eu.etaxonomy.cdm.model.common.ISimpleTerm; |
|
33 | 34 |
import eu.etaxonomy.cdm.model.common.Language; |
34 | 35 |
import eu.etaxonomy.cdm.model.common.MarkerType; |
35 | 36 |
import eu.etaxonomy.cdm.model.common.TermBase; |
... | ... | |
229 | 230 |
} |
230 | 231 |
return key; |
231 | 232 |
} |
233 |
|
|
234 |
/** |
|
235 |
* Construct a unique key using the CdmBase object's uuid |
|
236 |
* |
|
237 |
* @param cdmBase |
|
238 |
* @return |
|
239 |
*/ |
|
240 |
public static String getPreferenceKey(ISimpleTerm simpleTerm) { |
|
241 |
simpleTerm = (ISimpleTerm) HibernateProxyHelper.deproxy(simpleTerm); |
|
242 |
String key = simpleTerm.getClass().getName().concat(".") |
|
243 |
.concat(simpleTerm.getUuid().toString()); |
|
244 |
if (key.contains("javassist")) { |
|
245 |
StoreUtil.warn(PreferencesUtil.class, |
|
246 |
"Trying to persist a preference based on a proxy class."); |
|
247 |
} |
|
248 |
return key; |
|
249 |
} |
|
250 |
|
|
251 |
|
|
232 | 252 |
|
233 | 253 |
/** |
234 | 254 |
* Construct a unique key using the CdmBase object's uuid |
Also available in: Unified diff
FIME:3.3MC tags for code to be aligned with the 3.3 model changes related to the 'Uses' perspective