org.hibernate.test.querycache
Class AbstractQueryCacheResultTransformerTest

java.lang.Object
  extended by org.hibernate.testing.junit4.BaseUnitTestCase
      extended by org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
          extended by org.hibernate.test.querycache.AbstractQueryCacheResultTransformerTest
Direct Known Subclasses:
CriteriaQueryCacheIgnoreResultTransformerTest, HqlQueryCacheIgnoreResultTransformerTest

public abstract class AbstractQueryCacheResultTransformerTest
extends BaseCoreFunctionalTestCase


Nested Class Summary
protected  class AbstractQueryCacheResultTransformerTest.CriteriaExecutor
           
protected  class AbstractQueryCacheResultTransformerTest.HqlExecutor
           
protected  class AbstractQueryCacheResultTransformerTest.QueryExecutor
           
protected static interface AbstractQueryCacheResultTransformerTest.ResultChecker
           
 
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
AbstractQueryCacheResultTransformerTest()
           
 
Method Summary
protected  boolean areDynamicNonLazyAssociationsChecked()
           
protected  void assertCount(int expected)
           
protected  void assertDeleteCount(int expected)
           
protected  void assertEntityFetchCount(int expected)
           
protected  void assertHitCount(int expected)
           
protected  void assertInsertCount(int expected)
           
protected  void assertMissCount(int expected)
           
protected  void assertPutCount(int expected)
           
protected  void assertUpdateCount(int expected)
           
protected  void clearCache()
           
protected  void clearStatistics()
           
 void configure(Configuration cfg)
           
protected  void createData()
           
protected  void deleteData()
           
 String[] getMappings()
           
protected abstract  CacheMode getQueryCacheMode()
           
protected  void runTest(AbstractQueryCacheResultTransformerTest.HqlExecutor hqlExecutor, AbstractQueryCacheResultTransformerTest.CriteriaExecutor criteriaExecutor, AbstractQueryCacheResultTransformerTest.ResultChecker checker, boolean isSingleResult)
           
protected  void runTest(AbstractQueryCacheResultTransformerTest.QueryExecutor queryExecutor, AbstractQueryCacheResultTransformerTest.ResultChecker resultChecker, boolean isSingleResult)
           
 void testAliasToBeanDtoLiteralArgList()
           
 void testAliasToBeanDtoMultiArgList()
           
 void testAliasToBeanDtoOneArgList()
           
 void testAliasToBeanDtoWithNullAliasList()
           
 void testAliasToEntityMapMultiAggregatedPropProjectionSingleResult()
           
 void testAliasToEntityMapMultiProjectionList()
           
 void testAliasToEntityMapMultiProjectionWithNullAliasList()
           
 void testAliasToEntityMapNoProjectionList()
           
 void testAliasToEntityMapNoProjectionMultiAndNullList()
           
 void testAliasToEntityMapNoProjectionNullAndNonNullAliasList()
           
 void testAliasToEntityMapOneProjectionList()
           
 void testEntityWithAliasedJoinFetchedLazyOneToManySingleElementListHql()
           
 void testEntityWithJoinedLazyManyToOneListCriteria()
           
 void testEntityWithJoinedLazyManyToOneListHql()
           
 void testEntityWithJoinedLazyOneToManyMultiAndNullListCriteria()
           
 void testEntityWithJoinedLazyOneToManyMultiAndNullListHql()
           
 void testEntityWithJoinedLazyOneToManySingleElementListCriteria()
           
 void testEntityWithJoinedLazyOneToManySingleElementListHql()
           
 void testEntityWithJoinFetchedLazyManyToOneList()
           
 void testEntityWithJoinFetchedLazyManyToOneUsingProjectionList()
           
 void testEntityWithJoinFetchedLazyOneToManyMultiAndNullElementList()
           
 void testEntityWithLazyAssnList()
           
 void testEntityWithLazyAssnUnique()
           
 void testEntityWithNonLazyManyToOneList()
           
 void testEntityWithNonLazyOneToManyUnique()
           
 void testEntityWithSelectFetchedLazyOneToManySingleElementListCriteria()
           
 void testEntityWithUnaliasedJoinFetchedLazyOneToManySingleElementList()
           
 void testJoinWithFetchJoinListCriteria()
           
 void testJoinWithFetchJoinListHql()
           
 void testJoinWithFetchJoinWithAliasedJoinedAndOwnerProjectedListHql()
           
 void testJoinWithFetchJoinWithOwnerAndAliasedJoinedProjectedListHql()
           
 void testJoinWithFetchJoinWithOwnerAndPropProjectedList()
           
 void testJoinWithFetchJoinWithPropAndOwnerProjectedList()
           
 void testListElementsProjectionList()
           
 void testMapElementsList()
           
 void testMapEntryList()
           
 void testMapKeyList()
           
 void testMapValueList()
           
 void testMultiAggregatedPropProjectionSingleResult()
           
 void testMultiEntityProjectionAliasedList()
           
 void testMultiEntityProjectionList()
           
 void testMultiEntityProjectionUnique()
           
 void testMultiProjectionListThenApplyAliasToBean()
           
 void testMultiSelectAliasToEntityMapUsingAliasesWithFetchJoinList()
           
 void testMultiSelectNewList()
           
 void testMultiSelectNewListList()
           
 void testMultiSelectNewMapUsingAliasesList()
           
 void testMultiSelectNewMapUsingAliasesWithFetchJoinList()
           
 void testMultiSelectNewWithLiteralList()
           
 void testMultiSelectUsingImplicitJoinWithFetchJoinListHql()
           
 void testOneEntityProjectionList()
           
 void testOneEntityProjectionUnique()
           
 void testOneNonEntityProjectionList()
           
 void testOneNonEntityProjectionUnique()
           
 void testOneSelectNewAliasesList()
           
 void testOneSelectNewNoAliasesList()
           
 void testSelectNewEntityConstructorList()
           
 void testSelectNewMapUsingAliasesList()
           
 void testSingleAggregatedPropProjectionSingleResult()
           
 
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, getCacheConcurrencyStrategy, 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

AbstractQueryCacheResultTransformerTest

public AbstractQueryCacheResultTransformerTest()
Method Detail

getMappings

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

configure

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

getQueryCacheMode

protected abstract CacheMode getQueryCacheMode()

areDynamicNonLazyAssociationsChecked

protected boolean areDynamicNonLazyAssociationsChecked()

createData

protected void createData()

deleteData

protected void deleteData()

testAliasToEntityMapNoProjectionList

public void testAliasToEntityMapNoProjectionList()
                                          throws Exception
Throws:
Exception

testAliasToEntityMapNoProjectionMultiAndNullList

public void testAliasToEntityMapNoProjectionMultiAndNullList()
                                                      throws Exception
Throws:
Exception

testAliasToEntityMapNoProjectionNullAndNonNullAliasList

public void testAliasToEntityMapNoProjectionNullAndNonNullAliasList()
                                                             throws Exception
Throws:
Exception

testEntityWithNonLazyOneToManyUnique

public void testEntityWithNonLazyOneToManyUnique()
                                          throws Exception
Throws:
Exception

testEntityWithNonLazyManyToOneList

public void testEntityWithNonLazyManyToOneList()
                                        throws Exception
Throws:
Exception

testEntityWithLazyAssnUnique

public void testEntityWithLazyAssnUnique()
                                  throws Exception
Throws:
Exception

testEntityWithLazyAssnList

public void testEntityWithLazyAssnList()
                                throws Exception
Throws:
Exception

testEntityWithUnaliasedJoinFetchedLazyOneToManySingleElementList

public void testEntityWithUnaliasedJoinFetchedLazyOneToManySingleElementList()
                                                                      throws Exception
Throws:
Exception

testJoinWithFetchJoinListCriteria

public void testJoinWithFetchJoinListCriteria()
                                       throws Exception
Throws:
Exception

testJoinWithFetchJoinListHql

public void testJoinWithFetchJoinListHql()
                                  throws Exception
Throws:
Exception

testJoinWithFetchJoinWithOwnerAndPropProjectedList

public void testJoinWithFetchJoinWithOwnerAndPropProjectedList()
                                                        throws Exception
Throws:
Exception

testJoinWithFetchJoinWithPropAndOwnerProjectedList

public void testJoinWithFetchJoinWithPropAndOwnerProjectedList()
                                                        throws Exception
Throws:
Exception

testJoinWithFetchJoinWithOwnerAndAliasedJoinedProjectedListHql

public void testJoinWithFetchJoinWithOwnerAndAliasedJoinedProjectedListHql()
                                                                    throws Exception
Throws:
Exception

testJoinWithFetchJoinWithAliasedJoinedAndOwnerProjectedListHql

public void testJoinWithFetchJoinWithAliasedJoinedAndOwnerProjectedListHql()
                                                                    throws Exception
Throws:
Exception

testEntityWithAliasedJoinFetchedLazyOneToManySingleElementListHql

public void testEntityWithAliasedJoinFetchedLazyOneToManySingleElementListHql()
                                                                       throws Exception
Throws:
Exception

testEntityWithSelectFetchedLazyOneToManySingleElementListCriteria

public void testEntityWithSelectFetchedLazyOneToManySingleElementListCriteria()
                                                                       throws Exception
Throws:
Exception

testEntityWithJoinFetchedLazyOneToManyMultiAndNullElementList

public void testEntityWithJoinFetchedLazyOneToManyMultiAndNullElementList()
                                                                   throws Exception
Throws:
Exception

testEntityWithJoinFetchedLazyManyToOneList

public void testEntityWithJoinFetchedLazyManyToOneList()
                                                throws Exception
Throws:
Exception

testEntityWithJoinFetchedLazyManyToOneUsingProjectionList

public void testEntityWithJoinFetchedLazyManyToOneUsingProjectionList()
                                                               throws Exception
Throws:
Exception

testEntityWithJoinedLazyOneToManySingleElementListCriteria

public void testEntityWithJoinedLazyOneToManySingleElementListCriteria()
                                                                throws Exception
Throws:
Exception

testEntityWithJoinedLazyOneToManyMultiAndNullListCriteria

public void testEntityWithJoinedLazyOneToManyMultiAndNullListCriteria()
                                                               throws Exception
Throws:
Exception

testEntityWithJoinedLazyManyToOneListCriteria

public void testEntityWithJoinedLazyManyToOneListCriteria()
                                                   throws Exception
Throws:
Exception

testEntityWithJoinedLazyOneToManySingleElementListHql

public void testEntityWithJoinedLazyOneToManySingleElementListHql()
                                                           throws Exception
Throws:
Exception

testEntityWithJoinedLazyOneToManyMultiAndNullListHql

public void testEntityWithJoinedLazyOneToManyMultiAndNullListHql()
                                                          throws Exception
Throws:
Exception

testEntityWithJoinedLazyManyToOneListHql

public void testEntityWithJoinedLazyManyToOneListHql()
                                              throws Exception
Throws:
Exception

testAliasToEntityMapOneProjectionList

public void testAliasToEntityMapOneProjectionList()
                                           throws Exception
Throws:
Exception

testAliasToEntityMapMultiProjectionList

public void testAliasToEntityMapMultiProjectionList()
                                             throws Exception
Throws:
Exception

testAliasToEntityMapMultiProjectionWithNullAliasList

public void testAliasToEntityMapMultiProjectionWithNullAliasList()
                                                          throws Exception
Throws:
Exception

testAliasToEntityMapMultiAggregatedPropProjectionSingleResult

public void testAliasToEntityMapMultiAggregatedPropProjectionSingleResult()
                                                                   throws Exception
Throws:
Exception

testOneNonEntityProjectionUnique

public void testOneNonEntityProjectionUnique()
                                      throws Exception
Throws:
Exception

testOneNonEntityProjectionList

public void testOneNonEntityProjectionList()
                                    throws Exception
Throws:
Exception

testListElementsProjectionList

public void testListElementsProjectionList()
                                    throws Exception
Throws:
Exception

testOneEntityProjectionUnique

public void testOneEntityProjectionUnique()
                                   throws Exception
Throws:
Exception

testOneEntityProjectionList

public void testOneEntityProjectionList()
                                 throws Exception
Throws:
Exception

testMultiEntityProjectionUnique

public void testMultiEntityProjectionUnique()
                                     throws Exception
Throws:
Exception

testMultiEntityProjectionList

public void testMultiEntityProjectionList()
                                   throws Exception
Throws:
Exception

testMultiEntityProjectionAliasedList

public void testMultiEntityProjectionAliasedList()
                                          throws Exception
Throws:
Exception

testSingleAggregatedPropProjectionSingleResult

public void testSingleAggregatedPropProjectionSingleResult()
                                                    throws Exception
Throws:
Exception

testMultiAggregatedPropProjectionSingleResult

public void testMultiAggregatedPropProjectionSingleResult()
                                                   throws Exception
Throws:
Exception

testAliasToBeanDtoOneArgList

public void testAliasToBeanDtoOneArgList()
                                  throws Exception
Throws:
Exception

testAliasToBeanDtoMultiArgList

public void testAliasToBeanDtoMultiArgList()
                                    throws Exception
Throws:
Exception

testMultiProjectionListThenApplyAliasToBean

public void testMultiProjectionListThenApplyAliasToBean()
                                                 throws Exception
Throws:
Exception

testAliasToBeanDtoLiteralArgList

public void testAliasToBeanDtoLiteralArgList()
                                      throws Exception
Throws:
Exception

testAliasToBeanDtoWithNullAliasList

public void testAliasToBeanDtoWithNullAliasList()
                                         throws Exception
Throws:
Exception

testOneSelectNewNoAliasesList

public void testOneSelectNewNoAliasesList()
                                   throws Exception
Throws:
Exception

testOneSelectNewAliasesList

public void testOneSelectNewAliasesList()
                                 throws Exception
Throws:
Exception

testMultiSelectNewList

public void testMultiSelectNewList()
                            throws Exception
Throws:
Exception

testMultiSelectNewWithLiteralList

public void testMultiSelectNewWithLiteralList()
                                       throws Exception
Throws:
Exception

testMultiSelectNewListList

public void testMultiSelectNewListList()
                                throws Exception
Throws:
Exception

testMultiSelectNewMapUsingAliasesList

public void testMultiSelectNewMapUsingAliasesList()
                                           throws Exception
Throws:
Exception

testMultiSelectNewMapUsingAliasesWithFetchJoinList

public void testMultiSelectNewMapUsingAliasesWithFetchJoinList()
                                                        throws Exception
Throws:
Exception

testMultiSelectAliasToEntityMapUsingAliasesWithFetchJoinList

public void testMultiSelectAliasToEntityMapUsingAliasesWithFetchJoinList()
                                                                  throws Exception
Throws:
Exception

testMultiSelectUsingImplicitJoinWithFetchJoinListHql

public void testMultiSelectUsingImplicitJoinWithFetchJoinListHql()
                                                          throws Exception
Throws:
Exception

testSelectNewMapUsingAliasesList

public void testSelectNewMapUsingAliasesList()
                                      throws Exception
Throws:
Exception

testSelectNewEntityConstructorList

public void testSelectNewEntityConstructorList()
                                        throws Exception
Throws:
Exception

testMapKeyList

public void testMapKeyList()
                    throws Exception
Throws:
Exception

testMapValueList

public void testMapValueList()
                      throws Exception
Throws:
Exception

testMapEntryList

public void testMapEntryList()
                      throws Exception
Throws:
Exception

testMapElementsList

public void testMapElementsList()
                         throws Exception
Throws:
Exception

runTest

protected void runTest(AbstractQueryCacheResultTransformerTest.HqlExecutor hqlExecutor,
                       AbstractQueryCacheResultTransformerTest.CriteriaExecutor criteriaExecutor,
                       AbstractQueryCacheResultTransformerTest.ResultChecker checker,
                       boolean isSingleResult)
                throws Exception
Throws:
Exception

runTest

protected void runTest(AbstractQueryCacheResultTransformerTest.QueryExecutor queryExecutor,
                       AbstractQueryCacheResultTransformerTest.ResultChecker resultChecker,
                       boolean isSingleResult)
                throws Exception
Throws:
Exception

clearCache

protected void clearCache()

clearStatistics

protected void clearStatistics()

assertEntityFetchCount

protected void assertEntityFetchCount(int expected)

assertCount

protected void assertCount(int expected)

assertHitCount

protected void assertHitCount(int expected)

assertMissCount

protected void assertMissCount(int expected)

assertPutCount

protected void assertPutCount(int expected)

assertInsertCount

protected void assertInsertCount(int expected)

assertUpdateCount

protected void assertUpdateCount(int expected)

assertDeleteCount

protected void assertDeleteCount(int expected)


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