Java Doc for QueryTest.java in  » Database-ORM » db-ojb » org » apache » ojb » broker » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database ORM » db ojb » org.apache.ojb.broker 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.ojb.junit.PBTestCase
   org.apache.ojb.broker.QueryTest

QueryTest
public class QueryTest extends PBTestCase (Code)
Testing the query API.
version:
   $Id: QueryTest.java,v 1.61.2.20 2005/12/21 22:31:23 tomdz Exp $



Constructor Summary
public  QueryTest(String name)
     BrokerTests constructor comment.

Method Summary
public static  voidmain(String[] args)
    
public  voidtesXNestedJoins2()
    
public  voidtestBetweenCriteria()
    
public  voidtestCriteria()
    
public  voidtestDistinct()
    
public  voidtestDistinctMultiPk()
    
public  voidtestEmptyANDed()
    
public  voidtestEmptyORed()
    
public  voidtestEqualCriteria()
    
public  voidtestExtentByInterface()
    
public  voidtestInCriteria()
    
public  voidtestInversePathExpression()
    
public  voidtestLikeCriteria()
    
public  voidtestLikeEscapedCriteria1()
    
public  voidtestLikeEscapedCriteria2()
    
public  voidtestLikeEscapedCriteria3()
    
public  voidtestMultipleJoins()
    
public  voidtestNestedJoins()
    
public  voidtestNullCriteria()
    
public  voidtestOrderByCount()
    
public  voidtestOrderByJoined()
    
public  voidtestOuterJoin()
    
public  voidtestPathExpressionForAbstractExtent()
    
public  voidtestPathExpressionForExtents1()
    
public  voidtestPathExpressionForExtents2()
    
public  voidtestPathExpressionForExtents3()
    
public  voidtestPathExpressionForExtents4()
    
public  voidtestPathExpressionForExtentsAlias()
    
public  voidtestPathExpressions()
    
public  voidtestPathExpressionsMtoN()
    
public  voidtestPathExpressionsMtoN2()
    
public  voidtestPathExpressionsMtoNDecomposed()
    
public  voidtestPrefetchedArraySingleKey()
    
public  voidtestPrefetchedCollectionOrderBy()
    
public  voidtestPrefetchedCollectionSingleKey()
    
public  voidtestPrefetchedReferencesSingleKey()
    
public  voidtestQueryCommutative12()
    
public  voidtestQueryCommutative21()
    
public  voidtestQueryMN()
    
public  voidtestQueryMN_Alias1()
    
public  voidtestQueryMN_Alias2()
    
public  voidtestQueryOrderByNonSelectColumn()
    
public  voidtestQueryRangeAllRecords()
     Run a query range test that includes all of the records that exist.
public  voidtestQueryRangeMassTest()
     Run a query range test.
public  voidtestQueryRangeOneLessThanTotal()
     Run a query range test that includes one record less than the total number of records that exist.
public  voidtestQueryRangeOneMoreThanTotal()
     Run a query range test that includes one record more than the total number of records that exist.
public  voidtestQueryZero()
    
public  voidtestReportPathExpressionAbstractExtent()
    
public  voidtestReportPathExpressionForExtents1()
    
public  voidtestReportPathExpressionForExtents2()
    
public  voidtestReportQuery()
    
public  voidtestReportQueryAlias()
    
public  voidtestReportQueryExpressionInStatement()
    
public  voidtestReportQueryExtent()
    
public  voidtestReportQueryGroupByExtents1()
     ReportQuery returning rows with summed stock and price per article group The selected class has the extents.
The query returns summed values for each row, so there may be multiple rows for one productgroup because one query for each extent is executed.
public  voidtestReportQueryGroupByExtents2()
    
public  voidtestReportQueryGroupByNonSelectColumns()
    
public  voidtestReportQueryOrderBy()
    
public  voidtestReportQueryOrderByNonSelectColumn()
    
public  voidtestReportQueryPathExpression()
    
public  voidtestReportQueryWithJdbcTypes()
    
public  voidtestReportQueryWithStartAndEnd()
    
public  voidtestSqlCriteria()
    
public  voidtestSubQuery1()
    
public  voidtestSubQuery2()
    
public  voidtestSubQuery3()
    
public  voidtestSubQuery4()
    
public  voidtestSubQueryAgainstConcreteClass()
    
public  voidtestSubQueryAgainstExtents()
     Class with extents in SubQuery.


Constructor Detail
QueryTest
public QueryTest(String name)(Code)
BrokerTests constructor comment.




Method Detail
main
public static void main(String[] args)(Code)



tesXNestedJoins2
public void tesXNestedJoins2()(Code)
Test nested joins using pathExpressions *** Fails under hsqldb because of join using multiple keys ***



testBetweenCriteria
public void testBetweenCriteria()(Code)
test Between Criteria



testCriteria
public void testCriteria()(Code)
Criteria containing other Criteria only



testDistinct
public void testDistinct()(Code)
Distinct Query



testDistinctMultiPk
public void testDistinctMultiPk()(Code)
Distinct Query



testEmptyANDed
public void testEmptyANDed() throws Exception(Code)
Add an empty criteria



testEmptyORed
public void testEmptyORed() throws Exception(Code)
Add an empty criteria



testEqualCriteria
public void testEqualCriteria()(Code)
test EqualTo Criteria



testExtentByInterface
public void testExtentByInterface()(Code)



testInCriteria
public void testInCriteria()(Code)
test In Criteria



testInversePathExpression
public void testInversePathExpression()(Code)
Read a CD and then read the ProductGroup for the CD



testLikeCriteria
public void testLikeCriteria()(Code)
test Like Criteria



testLikeEscapedCriteria1
public void testLikeEscapedCriteria1()(Code)
test escaped Like Criteria



testLikeEscapedCriteria2
public void testLikeEscapedCriteria2()(Code)
test escaped Like Criteria with escape character



testLikeEscapedCriteria3
public void testLikeEscapedCriteria3()(Code)
test escaped Like Criteria



testMultipleJoins
public void testMultipleJoins()(Code)
Test multiple non nested joins using pathExpressions



testNestedJoins
public void testNestedJoins()(Code)
Test nested joins using pathExpressions



testNullCriteria
public void testNullCriteria()(Code)
test Null Criteria



testOrderByCount
public void testOrderByCount()(Code)
test OrderBy and Count



testOrderByJoined
public void testOrderByJoined()(Code)
test OrderBy joined column



testOuterJoin
public void testOuterJoin()(Code)



testPathExpressionForAbstractExtent
public void testPathExpressionForAbstractExtent()(Code)
test PathExpression pointing to abstract class (InterfaceArticle)



testPathExpressionForExtents1
public void testPathExpressionForExtents1()(Code)
Test pathExpression and Extents



testPathExpressionForExtents2
public void testPathExpressionForExtents2()(Code)
Test pathExpression and Extents



testPathExpressionForExtents3
public void testPathExpressionForExtents3()(Code)
Test pathExpression and Extents musicians is only defined in CD



testPathExpressionForExtents4
public void testPathExpressionForExtents4()(Code)
Test pathExpression and Extents Abstract Base



testPathExpressionForExtentsAlias
public void testPathExpressionForExtentsAlias()(Code)
Test pathExpression and Extents using Alias



testPathExpressions
public void testPathExpressions()(Code)
Single Path Expression



testPathExpressionsMtoN
public void testPathExpressionsMtoN()(Code)
Multi Path Expression over nondecomposed m:n



testPathExpressionsMtoN2
public void testPathExpressionsMtoN2()(Code)
Multi Path Expression over nondecomposed m:n new test case for the 'not unique alias' problem with m:n relationship



testPathExpressionsMtoNDecomposed
public void testPathExpressionsMtoNDecomposed()(Code)
Multi Path Expression over decomposed m:n



testPrefetchedArraySingleKey
public void testPrefetchedArraySingleKey()(Code)
prefetch Articles for ProductGroupsWithArray, Does not yet work with Arrays



testPrefetchedCollectionOrderBy
public void testPrefetchedCollectionOrderBy()(Code)
orderby for prefetch Articles of ProductGroups



testPrefetchedCollectionSingleKey
public void testPrefetchedCollectionSingleKey()(Code)
prefetch Articles for ProductGroups



testPrefetchedReferencesSingleKey
public void testPrefetchedReferencesSingleKey()(Code)
prefetch ProductGroups for Articles



testQueryCommutative12
public void testQueryCommutative12() throws Exception(Code)



testQueryCommutative21
public void testQueryCommutative21()(Code)



testQueryMN
public void testQueryMN() throws Exception(Code)



testQueryMN_Alias1
public void testQueryMN_Alias1() throws Exception(Code)



testQueryMN_Alias2
public void testQueryMN_Alias2() throws Exception(Code)



testQueryOrderByNonSelectColumn
public void testQueryOrderByNonSelectColumn()(Code)
ReportQuery returning rows with some "Liquor" data ordered by productGroup.groupId



testQueryRangeAllRecords
public void testQueryRangeAllRecords()(Code)
Run a query range test that includes all of the records that exist.



testQueryRangeMassTest
public void testQueryRangeMassTest()(Code)
Run a query range test.



testQueryRangeOneLessThanTotal
public void testQueryRangeOneLessThanTotal()(Code)
Run a query range test that includes one record less than the total number of records that exist.



testQueryRangeOneMoreThanTotal
public void testQueryRangeOneMoreThanTotal()(Code)
Run a query range test that includes one record more than the total number of records that exist.



testQueryZero
public void testQueryZero()(Code)



testReportPathExpressionAbstractExtent
public void testReportPathExpressionAbstractExtent()(Code)
test PathExpression pointing to abstract class (InterfaceArticle)



testReportPathExpressionForExtents1
public void testReportPathExpressionForExtents1()(Code)
Test pathExpression and Extents



testReportPathExpressionForExtents2
public void testReportPathExpressionForExtents2()(Code)
Test pathExpression and Extents



testReportQuery
public void testReportQuery()(Code)
Simple ReportQuery returning rows with 3 columns of Person



testReportQueryAlias
public void testReportQueryAlias()(Code)
Test ReportQuery and Alias



testReportQueryExpressionInStatement
public void testReportQueryExpressionInStatement()(Code)
ReportQuery with Expression in column need to add table alias to the field (price)



testReportQueryExtent
public void testReportQueryExtent()(Code)
Simple ReportQuery returning rows with 2 columns of Person



testReportQueryGroupByExtents1
public void testReportQueryGroupByExtents1()(Code)
ReportQuery returning rows with summed stock and price per article group The selected class has the extents.
The query returns summed values for each row, so there may be multiple rows for one productgroup because one query for each extent is executed.



testReportQueryGroupByExtents2
public void testReportQueryGroupByExtents2()(Code)
ReportQuery returning rows with summed stock and price per article group The selected columns point to a class having extents.
The query produces a wrong sql, selecting only rows of the top-class



testReportQueryGroupByNonSelectColumns
public void testReportQueryGroupByNonSelectColumns()(Code)
Simple ReportQuery returning rows with max(id) of Person grouped by not selected columns



testReportQueryOrderBy
public void testReportQueryOrderBy()(Code)
ReportQuery returning rows with some "Liquor" data ordered by price



testReportQueryOrderByNonSelectColumn
public void testReportQueryOrderByNonSelectColumn()(Code)
ReportQuery returning rows with some "Liquor" data ordered by productGroup.groupId



testReportQueryPathExpression
public void testReportQueryPathExpression()(Code)
ReportQuery with pathExpression in columns



testReportQueryWithJdbcTypes
public void testReportQueryWithJdbcTypes()(Code)
Simple ReportQuery returning rows with 3 columns of Person Type of column data defined by sqltypes
See Also:   java.sql.Types



testReportQueryWithStartAndEnd
public void testReportQueryWithStartAndEnd()(Code)
Simple ReportQuery returning rows with 3 columns of Person needs SQL paging



testSqlCriteria
public void testSqlCriteria()(Code)
test sql Criteria



testSubQuery1
public void testSubQuery1()(Code)
test Subquery get all articles with price > avg(price) PROBLEM: avg(price) is NOT extent aware !!

test may fail if db does not support sub queries




testSubQuery2
public void testSubQuery2()(Code)
test Subquery get all product groups without articles

test may fail if db does not support sub queries




testSubQuery3
public void testSubQuery3()(Code)
test Subquery get all product groups with more than 10 articles, uses attribute as value ! see testSubQuery4 for a better way

test may fail if db does not support sub queries




testSubQuery4
public void testSubQuery4()(Code)
test Subquery get all product groups with more than 10 articles

test may fail if db does not support sub queries




testSubQueryAgainstConcreteClass
public void testSubQueryAgainstConcreteClass()(Code)
Concrete Class in SubQuery



testSubQueryAgainstExtents
public void testSubQueryAgainstExtents()(Code)
Class with extents in SubQuery. SubQueries are NOT extent aware ! so we have to use two queries.



Fields inherited from org.apache.ojb.junit.PBTestCase
public PersistenceBroker broker(Code)(Java Doc)

Methods inherited from org.apache.ojb.junit.PBTestCase
public String getPlatformClass()(Code)(Java Doc)
public void pbPersist(Object obj)(Code)(Java Doc)
public void setUp() throws Exception(Code)(Java Doc)
public void tearDown() throws Exception(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.