Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl
In directory sc8-pr-cvs1:/tmp/cvs-serv30186/hibernate/impl
Modified Files:
SessionImpl.java
Log Message:
added FlushMode API
Index: SessionImpl.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/SessionImpl.java,v
retrieving revision 1.157
retrieving revision 1.158
diff -C2 -d -r1.157 -r1.158
*** SessionImpl.java 7 Dec 2002 09:05:41 -0000 1.157
--- SessionImpl.java 15 Dec 2002 10:46:40 -0000 1.158
***************
*** 25,28 ****
--- 25,29 ----
import cirrus.hibernate.AssertionFailure;
+ import cirrus.hibernate.FlushMode;
import cirrus.hibernate.HibernateException;
import cirrus.hibernate.Interceptor;
***************
*** 74,78 ****
private boolean closed = false;
! private boolean autoFlush = true;
private boolean callAfterTransactionCompletionFromDisconnect = true;
--- 75,80 ----
private boolean closed = false;
! private FlushMode flushMode = FlushMode.AUTO;
! //private boolean autoFlush = true;
private boolean callAfterTransactionCompletionFromDisconnect = true;
***************
*** 1212,1226 ****
public void suspendFlushes() {
! log.trace("disabling flush-before-query");
! autoFlush=false;
}
public void resumeFlushes() {
! log.trace("enabling flush-before-query");
! autoFlush=true;
}
private boolean autoFlushIfRequired(Set querySpaces) throws HibernateException, SQLException {
! if ( autoFlush && dontFlushFromFind==0 ) {
/*if ( log.isTraceEnabled() ) {
--- 1214,1233 ----
public void suspendFlushes() {
! setFlushMode(FlushMode.COMMIT);
}
public void resumeFlushes() {
! setFlushMode(FlushMode.AUTO);
! }
!
! public void setFlushMode(FlushMode flushMode) {
! this.flushMode = flushMode;
! }
! public FlushMode getFlushMode() {
! return flushMode;
}
private boolean autoFlushIfRequired(Set querySpaces) throws HibernateException, SQLException {
! if ( flushMode==FlushMode.AUTO && dontFlushFromFind==0 ) {
/*if ( log.isTraceEnabled() ) {
|