Revision 815a9015
Added by Katja Luther about 6 years ago
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/common/CdmIoBase.java | ||
---|---|---|
16 | 16 |
|
17 | 17 |
import org.apache.commons.lang.StringUtils; |
18 | 18 |
import org.apache.log4j.Logger; |
19 |
import org.hibernate.SessionFactory; |
|
20 |
import org.springframework.beans.factory.annotation.Autowired; |
|
21 | 19 |
import org.springframework.transaction.PlatformTransactionManager; |
22 | 20 |
import org.springframework.transaction.TransactionDefinition; |
23 | 21 |
import org.springframework.transaction.TransactionStatus; |
... | ... | |
116 | 114 |
return 1; |
117 | 115 |
} |
118 | 116 |
|
119 |
@Autowired |
|
120 |
private SessionFactory sessionFactory; |
|
117 |
// @Autowired
|
|
118 |
// private SessionFactory sessionFactory;
|
|
121 | 119 |
|
122 |
/** |
|
123 |
* flush the current session |
|
124 |
*/ |
|
125 |
//TODO move into super class CdmApplicationDefaultConfiguration#flush() ? |
|
126 |
public void flush() { |
|
127 |
sessionFactory.getCurrentSession().flush(); |
|
128 |
} |
|
120 |
// /**
|
|
121 |
// * flush the current session
|
|
122 |
// */
|
|
123 |
// //TODO move into super class CdmApplicationDefaultConfiguration#flush() ?
|
|
124 |
// public void flush() {
|
|
125 |
// sessionFactory.getCurrentSession().flush();
|
|
126 |
// }
|
|
129 | 127 |
|
130 | 128 |
@Override |
131 | 129 |
//TODO seems to be exact duplicate of CdmApplicationDefaultConfiguration#startTransaction(), remove duplicate |
Also available in: Unified diff
adapted deleteResult