List of usage examples for org.hibernate ReplicationMode LATEST_VERSION
ReplicationMode LATEST_VERSION
To view the source code for org.hibernate ReplicationMode LATEST_VERSION.
Click Source Link
From source file:org.springframework.orm.hibernate3.HibernateTemplateTests.java
License:Apache License
@Test public void testReplicate() throws HibernateException { TestBean tb = new TestBean(); given(session.getFlushMode()).willReturn(FlushMode.AUTO); hibernateTemplate.replicate(tb, ReplicationMode.LATEST_VERSION); verify(session).replicate(tb, ReplicationMode.LATEST_VERSION); verify(session).flush();// w w w . ja va 2s . com verify(session).close(); }
From source file:org.springframework.orm.hibernate3.HibernateTemplateTests.java
License:Apache License
@Test public void testReplicateWithEntityName() throws HibernateException { TestBean tb = new TestBean(); given(session.getFlushMode()).willReturn(FlushMode.AUTO); hibernateTemplate.replicate("myEntity", tb, ReplicationMode.LATEST_VERSION); verify(session).replicate("myEntity", tb, ReplicationMode.LATEST_VERSION); verify(session).flush();/*from www . ja v a 2 s . c o m*/ verify(session).close(); }
From source file:org.springframework.orm.hibernate4.HibernateTemplateTests.java
License:Apache License
@Test public void testReplicate() { TestBean tb = new TestBean(); given(session.getFlushMode()).willReturn(FlushMode.AUTO); hibernateTemplate.replicate(tb, ReplicationMode.LATEST_VERSION); verify(session).replicate(tb, ReplicationMode.LATEST_VERSION); }
From source file:org.springframework.orm.hibernate4.HibernateTemplateTests.java
License:Apache License
@Test public void testReplicateWithEntityName() { TestBean tb = new TestBean(); given(session.getFlushMode()).willReturn(FlushMode.AUTO); hibernateTemplate.replicate("myEntity", tb, ReplicationMode.LATEST_VERSION); verify(session).replicate("myEntity", tb, ReplicationMode.LATEST_VERSION); }