org.hibernate.test.batch
Class BatchTest

java.lang.Object
  extended by org.hibernate.testing.junit4.BaseUnitTestCase
      extended by org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
          extended by org.hibernate.test.batch.BatchTest

public class BatchTest
extends BaseCoreFunctionalTestCase

This is how to do batch processing in Hibernate. Remember to enable JDBC batch updates, or this test will take a VeryLongTime!


Nested Class Summary
 
Nested classes/interfaces inherited from class org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
BaseCoreFunctionalTestCase.RollbackWork
 
Field Summary
 
Fields inherited from class org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
DIALECT, NO_CLASSES, NO_MAPPINGS, USE_NEW_METADATA_MAPPINGS, VALIDATE_DATA_CLEANUP
 
Constructor Summary
BatchTest()
           
 
Method Summary
 void configure(Configuration cfg)
           
 void doBatchInsertUpdate(int nEntities, int nBeforeFlush)
           
 String getCacheConcurrencyStrategy()
           
 String[] getMappings()
           
 void testBatchInsertUpdate()
           
 void testBatchInsertUpdateSizeEqJdbcBatchSize()
           
 void testBatchInsertUpdateSizeGtJdbcBatchSize()
           
 void testBatchInsertUpdateSizeLtJdbcBatchSize()
           
 
Methods inherited from class org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
addMappings, addMappings, afterConfigurationBuilt, afterConfigurationBuilt, afterSessionFactoryBuilt, afterTest, applyCacheSettings, assertAllDataRemoved, beforeTest, buildConfiguration, buildServiceRegistry, cleanupCache, cleanupTest, configuration, constructConfiguration, createSchema, generateBootstrapRegistry, getAnnotatedClasses, getAnnotatedPackages, getBaseForMappings, getDialect, getXmlFiles, onFailure, openSession, openSession, overrideCacheStrategy, prepareBasicRegistryBuilder, prepareBootstrapRegistryBuilder, prepareTest, readCommittedIsolationMaintained, rebuildSessionFactory, rebuildSessionFactoryOnError, serviceRegistry, sessionFactory
 
Methods inherited from class org.hibernate.testing.junit4.BaseUnitTestCase
releaseTransactions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchTest

public BatchTest()
Method Detail

getMappings

public String[] getMappings()
Overrides:
getMappings in class BaseCoreFunctionalTestCase

getCacheConcurrencyStrategy

public String getCacheConcurrencyStrategy()
Overrides:
getCacheConcurrencyStrategy in class BaseCoreFunctionalTestCase

configure

public void configure(Configuration cfg)
Overrides:
configure in class BaseCoreFunctionalTestCase

testBatchInsertUpdate

public void testBatchInsertUpdate()

testBatchInsertUpdateSizeEqJdbcBatchSize

public void testBatchInsertUpdateSizeEqJdbcBatchSize()

testBatchInsertUpdateSizeLtJdbcBatchSize

public void testBatchInsertUpdateSizeLtJdbcBatchSize()

testBatchInsertUpdateSizeGtJdbcBatchSize

public void testBatchInsertUpdateSizeGtJdbcBatchSize()

doBatchInsertUpdate

public void doBatchInsertUpdate(int nEntities,
                                int nBeforeFlush)


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.