org.hibernate.test.annotations.entity
Class BasicHibernateAnnotationsTest

java.lang.Object
  extended by org.hibernate.testing.junit4.BaseUnitTestCase
      extended by org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
          extended by org.hibernate.test.annotations.entity.BasicHibernateAnnotationsTest

public class BasicHibernateAnnotationsTest
extends BaseCoreFunctionalTestCase


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
BasicHibernateAnnotationsTest()
           
 
Method Summary
protected  Class<?>[] getAnnotatedClasses()
           
protected  String[] getAnnotatedPackages()
           
 void testCache()
           
 void testCascadedDeleteOfChildEntitiesBug2()
           
 void testCascadedDeleteOfChildOneToOne()
           
 void testCompositeType()
           
 void testEntity()
           
 void testFilter()
           
 void testFilterOnCollection()
           
 void testFormula()
           
 void testImportTypeDefinitions()
           
 void testInheritFiltersFromMappedSuperclass()
          Tests the functionality of inheriting @Filter and @FilterDef annotations defined on a parent MappedSuperclass(s)
 void testNonLazy()
           
 void testParameterizedType()
           
 void testPolymorphism()
           
 void testSerialized()
           
 void testSetSimpleValueTypeNameInSecondPass()
          A custom type is used in the base class, but defined in the derived class.
 void testType()
           
 void testTypeDefNameAndDefaultForTypeAttributes()
           
 void testTypeDefWithoutNameAndDefaultForTypeAttributes()
           
 void testVersioning()
           
 
Methods inherited from class org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
addMappings, addMappings, afterConfigurationBuilt, afterConfigurationBuilt, afterSessionFactoryBuilt, afterTest, applyCacheSettings, assertAllDataRemoved, beforeTest, buildConfiguration, buildServiceRegistry, cleanupCache, cleanupTest, configuration, configure, constructConfiguration, createSchema, generateBootstrapRegistry, getBaseForMappings, getCacheConcurrencyStrategy, getDialect, getMappings, 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

BasicHibernateAnnotationsTest

public BasicHibernateAnnotationsTest()
Method Detail

testEntity

public void testEntity()
                throws Exception
Throws:
Exception

testVersioning

public void testVersioning()
                    throws Exception
Throws:
Exception

testPolymorphism

public void testPolymorphism()
                      throws Exception
Throws:
Exception

testType

public void testType()
              throws Exception
Throws:
Exception

testImportTypeDefinitions

public void testImportTypeDefinitions()
                               throws Exception
Throws:
Exception

testNonLazy

public void testNonLazy()
                 throws Exception
Throws:
Exception

testCache

public void testCache()
               throws Exception
Throws:
Exception

testFilterOnCollection

public void testFilterOnCollection()

testCascadedDeleteOfChildEntitiesBug2

public void testCascadedDeleteOfChildEntitiesBug2()

testCascadedDeleteOfChildOneToOne

public void testCascadedDeleteOfChildOneToOne()

testFilter

public void testFilter()
                throws Exception
Throws:
Exception

testInheritFiltersFromMappedSuperclass

public void testInheritFiltersFromMappedSuperclass()
                                            throws Exception
Tests the functionality of inheriting @Filter and @FilterDef annotations defined on a parent MappedSuperclass(s)

Throws:
Exception

testParameterizedType

public void testParameterizedType()
                           throws Exception
Throws:
Exception

testSerialized

public void testSerialized()
                    throws Exception
Throws:
Exception

testCompositeType

public void testCompositeType()
                       throws Exception
Throws:
Exception

testFormula

public void testFormula()
                 throws Exception
Throws:
Exception

testTypeDefNameAndDefaultForTypeAttributes

public void testTypeDefNameAndDefaultForTypeAttributes()

testTypeDefWithoutNameAndDefaultForTypeAttributes

public void testTypeDefWithoutNameAndDefaultForTypeAttributes()

testSetSimpleValueTypeNameInSecondPass

public void testSetSimpleValueTypeNameInSecondPass()
                                            throws Exception
A custom type is used in the base class, but defined in the derived class. This would have caused an exception, because the base class is processed BEFORE the derived class, and the custom type is not yet defined. However, it works now because we are setting the typeName for SimpleValue in the second pass.

Throws:
Exception

getAnnotatedClasses

protected Class<?>[] getAnnotatedClasses()
Overrides:
getAnnotatedClasses in class BaseCoreFunctionalTestCase

getAnnotatedPackages

protected String[] getAnnotatedPackages()
Overrides:
getAnnotatedPackages in class BaseCoreFunctionalTestCase


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