Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.test.hql
Class ASTParserLoadingTest  view ASTParserLoadingTest download ASTParserLoadingTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.hibernate.test.TestCase
              extended byorg.hibernate.test.hql.ASTParserLoadingTest
All Implemented Interfaces:
junit.framework.Test

public class ASTParserLoadingTest
extends org.hibernate.test.TestCase

Tests the integration of the new AST parser into the loading of query results using the Hibernate persisters and loaders.

Also used to test the syntax of the resulting sql against the underlying database, specifically for functionality not supported by the classic parser.


Field Summary
private  java.util.List createdAnimalIds
           
 
Fields inherited from class org.hibernate.test.TestCase
SKIP_LOG
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
ASTParserLoadingTest(java.lang.String name)
           
 
Method Summary
private  void assertResultSize(java.lang.String hql, int size)
           
protected  void configure(org.hibernate.cfg.Configuration cfg)
           
private  void createTestBaseData()
           
private  void destroyTestBaseData()
           
private  Human genSimpleHuman(java.lang.String fName, java.lang.String lName)
           
protected  java.lang.String[] getMappings()
           
private  org.hibernate.Query getSelectNewQuery(org.hibernate.Session session)
           
static junit.framework.Test suite()
           
 void testAggregation()
           
 void testAliases()
           
 void testArithmetic()
           
 void testCast()
           
 void testCastInSelect()
           
 void testCoalesce()
           
 void testCollectionFetching()
           
 void testCollectionFetchWithDistinctionAndLimit()
           
 void testCollectionJoinsInSubselect()
           
 void testComponentOrderBy()
           
 void testDecimalLiterals()
           
 void testDynamicInstantiationQueries()
           
 void testEJBQLFunctions()
           
 void testEntityFetching()
           
 void testEntityPropertySelect()
           
 void testExtract()
           
 void testFetchInSubqueryFails()
           
 void testFromOnly()
           
 void testIllegalMixedTransformerQueries()
           
 void testImplicitJoin()
           
 void testImplicitPolymorphism()
           
 void testIndexParams()
           
 void testInitProxy()
           
 void testIntegerLiterals()
           
 void testInvalidFetchSemantics()
           
 void testJoinFetchCollectionOfValues()
           
 void testManyToManyFilter()
           
 void testMultipleBagFetchesFail()
           
 void testNakedComponentPropertyRef()
           
 void testNakedEntityAssociationReference()
           
 void testNakedImplicitJoins()
           
 void testNakedMapIndex()
           
 void testNakedPropertyRef()
           
 void testNestedCollectionFetch()
           
 void testOneToManyFilter()
           
 void testOrdinalParameters()
           
 void testParameterMixing()
           
 void testProjectionQueries()
           
 void testQueryMetadataRetrievalWithFetching()
           
 void testResultTransformerEntityQueries()
           
 void testResultTransformerScalarQueries()
           
 void testSelectClauseCase()
           
 void testSelectClauseImplicitJoin()
           
 void testSelectClauseImplicitJoinWithIterate()
           
 void testSelectClauseSubselect()
           
 void testSelectExpressions()
           
 void testSimpleSelect()
           
 void testStandardFunctions()
           
 void testStr()
           
 void testSubselectBetween()
           
 void testSuperclassPropertyReferenceAfterCollectionIndexedAccess()
           
 void testWhere()
           
 
Methods inherited from class org.hibernate.test.TestCase
afterSessionFactoryBuilt, appliesTo, assertClassAssignability, assertElementTypeAssignability, dialectIsCaseSensitive, dialectSupportsEmptyInList, dropAfterFailure, fullTestName, getBaseForMappings, getCacheConcurrencyStrategy, getCfg, getDialect, getExtraProperties, getSessions, openSession, openSession, overrideCacheStrategy, readCommittedIsolationMaintained, recreateSchema, reportSkip, reportSkip, runTest, setCfg, setUp, sfi
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

createdAnimalIds

private java.util.List createdAnimalIds
Constructor Detail

ASTParserLoadingTest

public ASTParserLoadingTest(java.lang.String name)
Method Detail

suite

public static junit.framework.Test suite()

getMappings

protected java.lang.String[] getMappings()

configure

protected void configure(org.hibernate.cfg.Configuration cfg)

testMultipleBagFetchesFail

public void testMultipleBagFetchesFail()

testCollectionJoinsInSubselect

public void testCollectionJoinsInSubselect()

testCollectionFetchWithDistinctionAndLimit

public void testCollectionFetchWithDistinctionAndLimit()

testFetchInSubqueryFails

public void testFetchInSubqueryFails()

testQueryMetadataRetrievalWithFetching

public void testQueryMetadataRetrievalWithFetching()

testSuperclassPropertyReferenceAfterCollectionIndexedAccess

public void testSuperclassPropertyReferenceAfterCollectionIndexedAccess()

testJoinFetchCollectionOfValues

public void testJoinFetchCollectionOfValues()

testIntegerLiterals

public void testIntegerLiterals()

testDecimalLiterals

public void testDecimalLiterals()

testNakedPropertyRef

public void testNakedPropertyRef()

testNakedComponentPropertyRef

public void testNakedComponentPropertyRef()

testNakedImplicitJoins

public void testNakedImplicitJoins()

testNakedEntityAssociationReference

public void testNakedEntityAssociationReference()

testNakedMapIndex

public void testNakedMapIndex()
                       throws java.lang.Exception

testInvalidFetchSemantics

public void testInvalidFetchSemantics()

testArithmetic

public void testArithmetic()

testNestedCollectionFetch

public void testNestedCollectionFetch()

testSelectClauseSubselect

public void testSelectClauseSubselect()

testInitProxy

public void testInitProxy()

testSelectClauseImplicitJoin

public void testSelectClauseImplicitJoin()

testSelectClauseImplicitJoinWithIterate

public void testSelectClauseImplicitJoinWithIterate()

testComponentOrderBy

public void testComponentOrderBy()

genSimpleHuman

private Human genSimpleHuman(java.lang.String fName,
                             java.lang.String lName)

testCastInSelect

public void testCastInSelect()

testAliases

public void testAliases()

testParameterMixing

public void testParameterMixing()

testOrdinalParameters

public void testOrdinalParameters()

testIndexParams

public void testIndexParams()

testAggregation

public void testAggregation()

testSelectClauseCase

public void testSelectClauseCase()

testImplicitPolymorphism

public void testImplicitPolymorphism()

testCoalesce

public void testCoalesce()

testStr

public void testStr()

testCast

public void testCast()

testExtract

public void testExtract()

testOneToManyFilter

public void testOneToManyFilter()
                         throws java.lang.Throwable

testManyToManyFilter

public void testManyToManyFilter()
                          throws java.lang.Throwable

testSelectExpressions

public void testSelectExpressions()

createTestBaseData

private void createTestBaseData()

destroyTestBaseData

private void destroyTestBaseData()

testImplicitJoin

public void testImplicitJoin()
                      throws java.lang.Exception

testFromOnly

public void testFromOnly()
                  throws java.lang.Exception

testSimpleSelect

public void testSimpleSelect()
                      throws java.lang.Exception

testEntityPropertySelect

public void testEntityPropertySelect()
                              throws java.lang.Exception

testWhere

public void testWhere()
               throws java.lang.Exception

testEntityFetching

public void testEntityFetching()
                        throws java.lang.Exception

testCollectionFetching

public void testCollectionFetching()
                            throws java.lang.Exception

testProjectionQueries

public void testProjectionQueries()
                           throws java.lang.Exception

testStandardFunctions

public void testStandardFunctions()
                           throws java.lang.Exception

testDynamicInstantiationQueries

public void testDynamicInstantiationQueries()
                                     throws java.lang.Exception

testIllegalMixedTransformerQueries

public void testIllegalMixedTransformerQueries()

getSelectNewQuery

private org.hibernate.Query getSelectNewQuery(org.hibernate.Session session)

testResultTransformerScalarQueries

public void testResultTransformerScalarQueries()
                                        throws java.lang.Exception

testResultTransformerEntityQueries

public void testResultTransformerEntityQueries()
                                        throws java.lang.Exception

testEJBQLFunctions

public void testEJBQLFunctions()
                        throws java.lang.Exception

testSubselectBetween

public void testSubselectBetween()

assertResultSize

private void assertResultSize(java.lang.String hql,
                              int size)