org.apache.ojb.broker
Class PolymorphicExtents

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.ojb.broker.PolymorphicExtents
All Implemented Interfaces:
junit.framework.Test

public class PolymorphicExtents
extends junit.framework.TestCase

This TestClass tests OJB facilities to work with polymorphism.


Field Summary
(package private)  PersistenceBroker broker
           
 
Constructor Summary
PolymorphicExtents(java.lang.String name)
          Insert the method's description here.
 
Method Summary
protected  Article createArticle(int id)
          Insert the method's description here.
static void main(java.lang.String[] args)
           
 void setUp()
          Insert the method's description here.
 void tearDown()
          Insert the method's description here.
 void testCollectionByQuery()
          TestThreadsNLocks query support for polymorphic extents
 void testCollectionRetrieval()
          try to retrieve a polymorphic collection attribute (ProductGroup.allArticlesInGroup contains items of type TestThreadsNLocks.org.apache.ojb.broker.Article which forms an extent) ProductGroup 5 contain items from table Artikel, BOOKS and CDS
 void testExtentByQuery()
          TestThreadsNLocks EXTENT lookup: a collection with ALL objects in the Article extent
 void testRetrieveObjectByIdentity()
          TestThreadsNLocks to lookup items from extent classes
 void testRetrieveReferences()
          try to load polymorphic references (OrderPosition.article is of type InterfaceArticle)
 void XXXtestSequenceManager()
          Commented out!! testing the SequenceManagement with extents.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

broker

PersistenceBroker broker
Constructor Detail

PolymorphicExtents

public PolymorphicExtents(java.lang.String name)
Insert the method's description here. Creation date: (24.12.2000 00:33:40)

Method Detail

main

public static void main(java.lang.String[] args)

createArticle

protected Article createArticle(int id)
Insert the method's description here. Creation date: (06.12.2000 22:15:33)

Parameters:
id - int

setUp

public void setUp()
           throws PBFactoryException
Insert the method's description here. Creation date: (06.12.2000 21:58:53)

Throws:
PBFactoryException

tearDown

public void tearDown()
Insert the method's description here. Creation date: (06.12.2000 21:59:14)


testCollectionByQuery

public void testCollectionByQuery()
TestThreadsNLocks query support for polymorphic extents


testCollectionRetrieval

public void testCollectionRetrieval()
try to retrieve a polymorphic collection attribute (ProductGroup.allArticlesInGroup contains items of type TestThreadsNLocks.org.apache.ojb.broker.Article which forms an extent) ProductGroup 5 contain items from table Artikel, BOOKS and CDS


testExtentByQuery

public void testExtentByQuery()
TestThreadsNLocks EXTENT lookup: a collection with ALL objects in the Article extent


testRetrieveObjectByIdentity

public void testRetrieveObjectByIdentity()
TestThreadsNLocks to lookup items from extent classes


testRetrieveReferences

public void testRetrieveReferences()
try to load polymorphic references (OrderPosition.article is of type InterfaceArticle)


XXXtestSequenceManager

public void XXXtestSequenceManager()
                            throws java.lang.Exception
Commented out!! testing the SequenceManagement with extents. This test doesn't work in versions >0.97, because you can't get a unique id for an interface, only for real objects. There many test cases for sequence manager in SequenceManagerTest

Throws:
java.lang.Exception


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14