org.hibernate.test.annotations.query
Class QueryAndSQLTest
java.lang.Object
org.hibernate.testing.junit4.BaseUnitTestCase
org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
org.hibernate.test.annotations.query.QueryAndSQLTest
public class QueryAndSQLTest
- extends BaseCoreFunctionalTestCase
Test named queries
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, getBaseForMappings, getCacheConcurrencyStrategy, getDialect, getMappings, onFailure, openSession, openSession, overrideCacheStrategy, prepareBasicRegistryBuilder, prepareBootstrapRegistryBuilder, prepareTest, readCommittedIsolationMaintained, rebuildSessionFactory, rebuildSessionFactoryOnError, serviceRegistry, sessionFactory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QueryAndSQLTest
public QueryAndSQLTest()
testNativeQueryWithFormulaAttribute
public void testNativeQueryWithFormulaAttribute()
testNativeQueryWithFormulaAttributeWithoutAlias
public void testNativeQueryWithFormulaAttributeWithoutAlias()
testPackageQueries
public void testPackageQueries()
throws Exception
- Throws:
Exception
testClassQueries
public void testClassQueries()
throws Exception
- Throws:
Exception
testSQLQuery
public void testSQLQuery()
testImportQueryFromMappedSuperclass
public void testImportQueryFromMappedSuperclass()
- We are testing 2 things here:
1. The query 'night.olderThan' is defined in a MappedSuperClass - Darkness.
We are verifying that queries defined in a MappedSuperClass are processed.
2. There are 2 Entity classes that extend from Darkness - Night and Twilight.
We are verifying that this does not cause any issues.eg. Double processing of the
MappedSuperClass
testSQLQueryWithManyToOne
public void testSQLQueryWithManyToOne()
testImplicitNativeQuery
public void testImplicitNativeQuery()
throws Exception
- Throws:
Exception
testNativeQueryAndCompositePKAndComponents
public void testNativeQueryAndCompositePKAndComponents()
throws Exception
- Throws:
Exception
testDiscriminator
public void testDiscriminator()
throws Exception
- Throws:
Exception
testCache
public void testCache()
throws Exception
- Throws:
Exception
testEntitySQLOverriding
public void testEntitySQLOverriding()
testCollectionSQLOverriding
public void testCollectionSQLOverriding()
getAnnotatedClasses
protected Class[] getAnnotatedClasses()
- Overrides:
getAnnotatedClasses
in class BaseCoreFunctionalTestCase
getAnnotatedPackages
protected String[] getAnnotatedPackages()
- Overrides:
getAnnotatedPackages
in class BaseCoreFunctionalTestCase
getXmlFiles
protected String[] getXmlFiles()
- Overrides:
getXmlFiles
in class BaseCoreFunctionalTestCase
configure
protected void configure(Configuration cfg)
- Overrides:
configure
in class BaseCoreFunctionalTestCase
Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.