2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.cdm
.persistence
.hibernate
;
11 import java
.util
.Properties
;
13 import org
.springframework
.stereotype
.Component
;
16 * This class allows to globally override id generation settings in hibernate
18 * @see: eu.etaxonomy.cdm.persistence.hibernate.TableGenerator
20 * @author a.kohlbecker
24 //TODO this class has been moved to cdmlib-persistence preliminarily. It should be moved to
25 //cdmlib-test again as it should be used only in test. Currently this is not possible because
26 //sessionFactory bean has a dependsOn relationship to this class and this creates problems in remote-webapp
27 //as the been is not available
28 //see also TableGenerator
30 class TableGeneratorGlobalOverride
{
32 public TableGeneratorGlobalOverride(){}
34 // public static final ThreadLocal<Properties> threadLocalProperties = new ThreadLocal<>();
36 public static Properties properties
;
38 public static Properties
getProperties() {
39 // return threadLocalProperties.get();
40 return TableGeneratorGlobalOverride
.properties
;
43 public void setProperties(Properties properties
) {
44 // threadLocalProperties.set(properties);
45 TableGeneratorGlobalOverride
.properties
= properties
;