[HHH-2566] Remove FlushMode.NEVER

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@12749 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Diego Plentz 2007-07-08 10:46:37 +00:00
parent 3ee3577314
commit 24eaebf6aa
4 changed files with 10 additions and 10 deletions

View File

@ -32,7 +32,7 @@ public interface Transaction {
/**
* Flush the associated <tt>Session</tt> and end the unit of work (unless
* we are in {@link FlushMode#NEVER}.
* we are in {@link FlushMode#MANUAL}.
* </p>
* This method will commit the underlying transaction if and only
* if the underlying transaction was initiated by this object.

View File

@ -4442,7 +4442,7 @@ public class FooBarTest extends LegacyTestCase {
s.connection().commit();
s.close();
s = openSession();
s.setFlushMode(FlushMode.NEVER);
s.setFlushMode(FlushMode.MANUAL);
l = (Location) s.find("from Location l where l.countryCode = 'AU' and l.description='foo bar'").get(0);
assertTrue( l.getCountryCode().equals("AU") );
assertTrue( l.getCity().equals("Melbourne") );
@ -4746,7 +4746,7 @@ public class FooBarTest extends LegacyTestCase {
s.close();
s = openSession();
s.setFlushMode(FlushMode.NEVER);
s.setFlushMode(FlushMode.MANUAL);
t = s.beginTransaction();
Foo foo = (Foo) s.get(Foo.class, id);
t.commit();

View File

@ -719,7 +719,7 @@ public class FumTest extends LegacyTestCase {
///////////////////////////////////////////////////////////////////////////
// Test insertions across serializations
Session s = getSessions().openSession();
s.setFlushMode(FlushMode.NEVER);
s.setFlushMode(FlushMode.MANUAL);
Simple simple = new Simple();
simple.setAddress("123 Main St. Anytown USA");
@ -751,7 +751,7 @@ public class FumTest extends LegacyTestCase {
///////////////////////////////////////////////////////////////////////////
// Test updates across serializations
s = getSessions().openSession();
s.setFlushMode(FlushMode.NEVER);
s.setFlushMode(FlushMode.MANUAL);
simple = (Simple) s.get( Simple.class, new Long(10) );
assertTrue("Not same parent instances", check.getName().equals( simple.getName() ) );
@ -773,7 +773,7 @@ public class FumTest extends LegacyTestCase {
///////////////////////////////////////////////////////////////////////////
// Test deletions across serializations
s = getSessions().openSession();
s.setFlushMode(FlushMode.NEVER);
s.setFlushMode(FlushMode.MANUAL);
simple = (Simple) s.get( Simple.class, new Long(10) );
assertTrue("Not same parent instances", check.getName().equals( simple.getName() ) );
@ -795,7 +795,7 @@ public class FumTest extends LegacyTestCase {
///////////////////////////////////////////////////////////////////////////
// Test collection actions across serializations
s = getSessions().openSession();
s.setFlushMode(FlushMode.NEVER);
s.setFlushMode(FlushMode.MANUAL);
Fum fum = new Fum( fumKey("uss-fum") );
fum.setFo( new Fum( fumKey("uss-fo") ) );
@ -824,7 +824,7 @@ public class FumTest extends LegacyTestCase {
s.close();
s = getSessions().openSession();
s.setFlushMode(FlushMode.NEVER);
s.setFlushMode(FlushMode.MANUAL);
fum = (Fum) s.load( Fum.class, fum.getId() );
assertTrue("the Fum.friends did not get saved", fum.getFriends().size() == 2);
@ -842,7 +842,7 @@ public class FumTest extends LegacyTestCase {
s.close();
s = getSessions().openSession();
s.setFlushMode(FlushMode.NEVER);
s.setFlushMode(FlushMode.MANUAL);
fum = (Fum) s.load( Fum.class, fum.getId() );
assertTrue("the Fum.friends is not empty", fum.getFriends() == null || fum.getFriends().size() == 0);
s.connection().commit();

View File

@ -325,7 +325,7 @@ public class ProxyTest extends FunctionalTestCase {
s.close();
s = openSession();
s.setFlushMode( FlushMode.NEVER );
s.setFlushMode( FlushMode.MANUAL );
t = s.beginTransaction();
// load the last container as a proxy
Container proxy = ( Container ) s.load( Container.class, lastContainerId );