You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2006/07/15 15:55:52 UTC
svn commit: r422216 [2/2] - in /db/ojb/trunk/src: test/org/apache/ojb/
test/org/apache/ojb/performance/ test/org/apache/ojb/quick-db/
xdoclet/test/xdoclet/modules/ojb/tests/
Modified: db/ojb/trunk/src/test/org/apache/ojb/repository_database.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/repository_database.xml?rev=422216&r1=422215&r2=422216&view=diff
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/repository_database.xml (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/repository_database.xml Sat Jul 15 06:55:51 2006
@@ -42,7 +42,7 @@
username="@USER_NAME@"
password="@USER_PASSWD@"
batch-mode="false"
- useAutoCommit="1"
+ useAutoCommit="2"
ignoreAutoCommitExceptions="false"
>
@@ -61,6 +61,7 @@
of cached statements per connection -->
<attribute attribute-name="ojb.maxCacheStatements" attribute-value="20"/>
+
<!-- Attributes with name prefix "pool." supported by ConnectionFactoryPooledImpl
and ConnectionFactoryDBCPImpl -->
<attribute attribute-name="pool.maxActive" attribute-value="30"/>
@@ -74,6 +75,12 @@
<attribute attribute-name="pool.numTestsPerEvictionRun" attribute-value="10"/>
<attribute attribute-name="pool.minEvictableIdleTimeMillis" attribute-value="600000"/>
+
+ <!-- Attributes with name prefix "jdbc." are passed directly to the JDBC driver. -->
+ <!-- Example setting (used by Oracle driver when Statement batching is enabled) -->
+ <attribute attribute-name="jdbc.defaultBatchValue" attribute-value="5"/>
+
+
<!-- additional attributes supported by ConnectionFactoryDBCPImpl -->
<!--
Attributes determining if ConnectionFactoryDBCPImpl
@@ -85,19 +92,17 @@
<attribute attribute-name="dbcp.maxOpenPreparedStatements" attribute-value="20"/>
<!-- Attribute determining if the Commons DBCP connection wrapper will allow
access to the underlying concrete Connection instance from the JDBC-driver
- (normally this is not allowed, like in J2EE-containers using wrappers). -->
- <attribute attribute-name="dbcp.accessToUnderlyingConnectionAllowed" attribute-value="false"/>
+ (if not specified, by default it's enabled). -->
+ <attribute attribute-name="dbcp.accessToUnderlyingConnectionAllowed" attribute-value="true"/>
<attribute attribute-name="dbcp.logAbandoned" attribute-value="false"/>
<attribute attribute-name="dbcp.removeAbandoned" attribute-value="false"/>
<attribute attribute-name="dbcp.removeAbandonedTimeout" attribute-value="300"/>
- <!-- Attributes with name prefix "jdbc." are passed directly to the JDBC driver. -->
- <!-- Example setting (used by Oracle driver when Statement batching is enabled) -->
- <attribute attribute-name="jdbc.defaultBatchValue" attribute-value="5"/>
-
</connection-factory>
+ <!-- Specify the batch strategy and the batch manager implementation, the
+ validator is used to check the 'execute batch' statement return array -->
<batch class="org.apache.ojb.broker.accesslayer.batch.BatchManagerImpl"
strategy="org.apache.ojb.broker.accesslayer.batch.BatchStrategyDefaultImpl"
limit="50"
@@ -107,21 +112,21 @@
<attribute attribute-name="batch.supportOptimisticLocking" attribute-value="false"/>
</batch>
-
+ <!-- Specify the caching strategy and the used caching implementation -->
<object-cache class="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl"
strategy="org.apache.ojb.broker.cache.CachingStrategyTwoLevelImpl"
timeout="-1"
>
- <!-- attributes only used by ObjectCacheDefaultImpl -->
+ <!-- attributes used by ObjectCacheDefaultImpl -->
<attribute attribute-name="default.useSoftReference" attribute-value="true"/>
<attribute attribute-name="default.maxEntry" attribute-value="-1"/>
- <!-- attributes only used by ObjectCacheOSCacheImpl -->
+ <!-- attributes used by ObjectCacheOSCacheImpl -->
<attribute attribute-name="oscache.flushOnPut" attribute-value="true"/>
<attribute attribute-name="oscache.cacheCapacity" attribute-value=""/>
<attribute attribute-name="oscache.cron" attribute-value=""/>
- <!-- attributes only used by ObjectCacheJCSImpl -->
+ <!-- attributes used by ObjectCacheJCSImpl -->
<attribute attribute-name="jcs.maxObjects" attribute-value=""/>
</object-cache>
Modified: db/ojb/trunk/src/test/org/apache/ojb/repository_junit.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/repository_junit.xml?rev=422216&r1=422215&r2=422216&view=diff
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/repository_junit.xml (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/repository_junit.xml Sat Jul 15 06:55:51 2006
@@ -427,7 +427,7 @@
jdbc-type="INTEGER"
/>
<field-descriptor
- name="stockDetail::isSelloutArticle"
+ name="stockDetail::selloutArticle"
column="Auslaufartikel"
jdbc-type="INTEGER"
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
@@ -843,6 +843,11 @@
column="VALUE_"
jdbc-type="INTEGER"
/>
+ <field-descriptor
+ name="someBField"
+ column="B_FIELD"
+ jdbc-type="VARCHAR"
+ />
</class-descriptor>
<!-- Definitions for org.apache.ojb.broker.ObjectRepository$C -->
@@ -1005,12 +1010,13 @@
class="org.apache.ojb.broker.ObjectRepository$F"
table="TABLE_F">
+ <!-- auto-increment of PK field is handled by base class -->
<field-descriptor
name="id"
column="ID"
jdbc-type="INTEGER"
primarykey="true"
- autoincrement="true"
+ autoincrement="false"
/>
<field-descriptor
@@ -1025,8 +1031,9 @@
column="SOMEVALUE"
jdbc-type="INTEGER"
/>
-
- <reference-descriptor name="super" class-ref="org.apache.ojb.broker.ObjectRepository$E">
+ <!-- use multiple joined table inheritance -->
+ <reference-descriptor name="super"
+ class-ref="org.apache.ojb.broker.ObjectRepository$E">
<foreignkey field-ref="eID" />
</reference-descriptor>
</class-descriptor>
@@ -1036,12 +1043,13 @@
class="org.apache.ojb.broker.ObjectRepository$G"
table="TABLE_G">
+ <!-- auto-increment of PK field is handled by base class -->
<field-descriptor
name="id"
column="ID"
jdbc-type="INTEGER"
primarykey="true"
- autoincrement="true"
+ autoincrement="false"
/>
<field-descriptor
@@ -1057,6 +1065,7 @@
jdbc-type="INTEGER"
/>
+ <!-- use multiple joined table inheritance -->
<reference-descriptor name="super"
class-ref="org.apache.ojb.broker.ObjectRepository$F">
<foreignkey field-ref="fID" />
@@ -1068,6 +1077,7 @@
class="org.apache.ojb.broker.ObjectRepository$F1"
table="TABLE_F1">
+ <!-- auto-increment of PK field is handled by base class -->
<field-descriptor
name="id"
column="ID"
@@ -1081,6 +1091,7 @@
jdbc-type="INTEGER"
/>
+ <!-- use multiple joined table inheritance -->
<reference-descriptor name="super"
class-ref="org.apache.ojb.broker.ObjectRepository$E">
<foreignkey field-ref="id" />
@@ -1105,6 +1116,7 @@
jdbc-type="INTEGER"
/>
+ <!-- use multiple joined table inheritance -->
<reference-descriptor name="super"
class-ref="org.apache.ojb.broker.ObjectRepository$F1">
<foreignkey field-ref="id" />
@@ -1501,7 +1513,7 @@
<!-- Definitions for org.apache.ojb.broker.LockedByVersion -->
<class-descriptor
class="org.apache.ojb.broker.LockedByVersion"
- table="LOCKED_BY_VERSION"
+ table="VERSIONLOCKED"
>
<field-descriptor
name="id"
@@ -1526,7 +1538,7 @@
<!-- Definitions for org.apache.ojb.broker.LockedByTimestamp -->
<class-descriptor
class="org.apache.ojb.broker.LockedByTimestamp"
- table="LOCKED_BY_TIMESTAMP"
+ table="TIMESTAMPLOCKED"
>
<field-descriptor
name="id"
@@ -1548,9 +1560,32 @@
/>
</class-descriptor>
-<!-- Definitions for org.apache.ojb.broker.ObjectWithBlob -->
+<!-- Definitions for org.apache.ojb.broker.LobObjectExt -->
+ <class-descriptor
+ class="org.apache.ojb.broker.lob.LOBTest$LobObjectExt"
+ table="BLOB_TEST"
+ >
+ <field-descriptor
+ name="id"
+ column="ID"
+ jdbc-type="INTEGER"
+ primarykey="true"
+ autoincrement="true"
+ />
+ <field-descriptor
+ name="blobArray"
+ column="BLOB_VALUE_"
+ jdbc-type="BLOB"
+ />
+ <field-descriptor
+ name="clobString"
+ column="CLOB_VALUE_"
+ jdbc-type="CLOB"
+ />
+ </class-descriptor>
+
<class-descriptor
- class="org.apache.ojb.broker.BlobTest$ObjectWithBlob"
+ class="org.apache.ojb.broker.lob.LOBTest$LobObject"
table="BLOB_TEST"
>
<field-descriptor
@@ -1572,6 +1607,7 @@
/>
</class-descriptor>
+
<!-- Definitions for broker.CharacterTest$ObjectWithCharField -->
<class-descriptor
class="org.apache.ojb.broker.CharacterTest$ObjectWithCharField"
@@ -2354,7 +2390,7 @@
<!-- tests for bidirectional association -->
<class-descriptor
- class="org.apache.ojb.broker.BidirectionalAssociationObjectA"
+ class="org.apache.ojb.broker.BidirectionalAssociationTest$ObjectA"
table="BIDIR_A"
>
<field-descriptor
@@ -2371,14 +2407,14 @@
/>
<reference-descriptor
name="relatedB"
- class-ref="org.apache.ojb.broker.BidirectionalAssociationObjectB"
+ class-ref="org.apache.ojb.broker.BidirectionalAssociationTest$ObjectB"
>
<foreignkey field-ref="fkToB"/>
</reference-descriptor>
</class-descriptor>
<class-descriptor
- class="org.apache.ojb.broker.BidirectionalAssociationObjectB"
+ class="org.apache.ojb.broker.BidirectionalAssociationTest$ObjectB"
table="BIDIR_B"
>
<field-descriptor
@@ -2395,12 +2431,62 @@
/>
<reference-descriptor
name="relatedA"
- class-ref="org.apache.ojb.broker.BidirectionalAssociationObjectA"
+ class-ref="org.apache.ojb.broker.BidirectionalAssociationTest$ObjectA"
+ >
+ <foreignkey field-ref="fkToA"/>
+ </reference-descriptor>
+ </class-descriptor>
+
+<class-descriptor
+ class="org.apache.ojb.broker.BidirectionalAssociationTest$ObjectAA"
+ table="BIDIR_A"
+ >
+ <field-descriptor
+ name="pk"
+ column="pk"
+ jdbc-type="VARCHAR"
+ primarykey="true"
+ autoincrement="true"
+ />
+ <field-descriptor
+ name="fkToB"
+ column="fk_to_B"
+ jdbc-type="VARCHAR"
+ />
+ <reference-descriptor
+ name="relatedB"
+ class-ref="org.apache.ojb.broker.BidirectionalAssociationTest$ObjectBB"
+ >
+ <foreignkey field-ref="fkToB"/>
+ </reference-descriptor>
+ </class-descriptor>
+
+ <class-descriptor
+ class="org.apache.ojb.broker.BidirectionalAssociationTest$ObjectBB"
+ table="BIDIR_B"
+ >
+ <field-descriptor
+ name="pk"
+ column="pk"
+ jdbc-type="VARCHAR"
+ primarykey="true"
+ autoincrement="true"
+ />
+ <field-descriptor
+ name="fkToA"
+ column="fk_to_A"
+ jdbc-type="VARCHAR"
+ />
+ <reference-descriptor
+ name="relatedA"
+ class-ref="org.apache.ojb.broker.BidirectionalAssociationTest$ObjectAA"
>
<foreignkey field-ref="fkToA"/>
</reference-descriptor>
</class-descriptor>
+
+
<!-- Definitions for extent org.apache.ojb.broker.InterfaceAnimal -->
<class-descriptor class="org.apache.ojb.broker.InterfaceAnimal">
<extent-class class-ref="org.apache.ojb.broker.Mammal" />
@@ -2763,7 +2849,7 @@
<field-descriptor
name="pkWithoutAutoIncrement"
- column="PK_WITHOUT_AUTO"
+ column="PK_WO_AUTO"
jdbc-type="INTEGER"
primarykey="true"
autoincrement="false"
@@ -2781,7 +2867,7 @@
<field-descriptor
name="normalWithoutAutoIncrement"
- column="NORMAL_WITHOUT_AUTO"
+ column="NORMAL_WO_AUTO"
jdbc-type="INTEGER"
primarykey="false"
autoincrement="false"
@@ -2792,7 +2878,7 @@
<!-- Field conversion test using PB-api and BigDecimal -->
<class-descriptor
class="org.apache.ojb.broker.FieldConversionTest_3$Node"
- table="FIELD_CONVERSION_NODE"
+ table="FIELDCONV_NODE"
>
<field-descriptor
name="uid"
@@ -2831,7 +2917,7 @@
<!-- Field conversion test using PB-api and BigDecimal -->
<class-descriptor
class="org.apache.ojb.broker.FieldConversionTest_3$NodeWoAutoInc"
- table="FIELD_CONVERSION_NODE_NOINC">
+ table="FIELDCONV_NOINC">
<field-descriptor
name="uid"
column="NODE_ID"
@@ -2848,7 +2934,7 @@
<class-descriptor
class="org.apache.ojb.broker.NumberAccuracyTest$NumberObject"
- table="NUMBER_ACCURACY_TEST"
+ table="NUMBER_ACCURACY"
>
<field-descriptor
name="id"
@@ -3065,13 +3151,12 @@
<field-descriptor name="description" column="DESCRIPTION" jdbc-type="VARCHAR"/>
</class-descriptor>
-
<!-- ************************************************* -->
<!-- nested fields test -->
<!-- ************************************************* -->
<class-descriptor
class="org.apache.ojb.broker.NestedFieldsTest$NestedMain"
- table="NESTED_FIELDS_TAB">
+ table="NESTED_TAB">
<field-descriptor
name="objId"
@@ -3112,7 +3197,7 @@
<class-descriptor
class="org.apache.ojb.broker.NestedFieldsTest$NestedEntry"
- table="NESTED_FIELDS_ENTRY">
+ table="NESTED_ENTRY">
<field-descriptor
name="id"
@@ -3379,6 +3464,8 @@
/>
</class-descriptor>
+
+
<class-descriptor
class="org.apache.ojb.broker.Owner"
table="Owner"
@@ -3445,119 +3532,35 @@
</field-descriptor>
</class-descriptor>
-<class-descriptor
- class="org.apache.ojb.broker.OuterClass2"
- table="OuterClass2"
->
- <field-descriptor
- name="id"
- column="id"
- jdbc-type="INTEGER"
- primarykey="true"
- autoincrement="true"
- >
- </field-descriptor>
- <field-descriptor
- name="text"
- column="text"
- jdbc-type="VARCHAR"
- length="254"
- >
- </field-descriptor>
- <collection-descriptor
- name="innerClasses"
- element-class-ref="org.apache.ojb.broker.OuterClass2$InnerClass2"
- proxy="true"
- auto-retrieve="true"
- auto-update="object"
- auto-delete="object"
- >
- <inverse-foreignkey field-ref="outerId"/>
- </collection-descriptor>
-</class-descriptor>
-<class-descriptor
- class="org.apache.ojb.broker.OuterClass2$InnerClass2"
- table="InnerClass2"
->
- <field-descriptor
- name="id"
- column="id"
- jdbc-type="INTEGER"
- primarykey="true"
- autoincrement="true"
- >
- </field-descriptor>
- <field-descriptor
- name="text"
- column="text"
- jdbc-type="VARCHAR"
- length="254"
- >
- </field-descriptor>
- <field-descriptor
- name="outerId"
- column="outerId"
- required="true"
- jdbc-type="INTEGER"
- access="anonymous"
- >
- </field-descriptor>
- <reference-descriptor
- name="OuterClass2.this"
- class-ref="org.apache.ojb.broker.OuterClass2"
- auto-retrieve="true"
- auto-update="link"
- auto-delete="link"
- >
- <foreignkey field-ref="outerId"/>
- </reference-descriptor>
- <collection-descriptor
- name="deepInnerClasses"
- element-class-ref="org.apache.ojb.broker.OuterClass2$InnerClass2$DeepInnerClass"
- proxy="true"
- auto-retrieve="true"
- auto-update="true"
- auto-delete="object"
- >
- <inverse-foreignkey field-ref="innerId"/>
- </collection-descriptor>
-</class-descriptor>
-<class-descriptor
- class="org.apache.ojb.broker.OuterClass2$InnerClass2$DeepInnerClass"
- table="DeepInnerClass"
->
- <field-descriptor
- name="id"
- column="id"
- jdbc-type="INTEGER"
- primarykey="true"
- autoincrement="true"
- >
- </field-descriptor>
- <field-descriptor
- name="text"
- column="text"
- jdbc-type="VARCHAR"
- length="254"
- >
- </field-descriptor>
- <field-descriptor
- name="innerId"
- column="innerId"
- required="true"
- jdbc-type="INTEGER"
- access="anonymous"
- >
- </field-descriptor>
- <reference-descriptor
- name="InnerClass2.this"
- class-ref="org.apache.ojb.broker.OuterClass2$InnerClass2"
- auto-retrieve="true"
- auto-update="link"
- auto-delete="link"
+
+ <class-descriptor
+ class="org.apache.ojb.broker.JdbcJavaObjectTest$Container"
+ table="CONTAINER_TBL"
>
- <foreignkey field-ref="innerId"/>
- </reference-descriptor>
-</class-descriptor>
+ <field-descriptor
+ name="id"
+ column="ID_"
+ jdbc-type="INTEGER"
+ primarykey="true"
+ autoincrement="true"
+ />
+ <field-descriptor
+ name="name"
+ column="NAME"
+ jdbc-type="VARCHAR"
+ />
+
+ <field-descriptor
+ name="target"
+ column="TARGET"
+ jdbc-type="JAVA_OBJECT"
+ />
+
+ <field-descriptor
+ name="editor"
+ column="EDITOR"
+ jdbc-type="JAVA_OBJECT"
+ />
+ </class-descriptor>
<!-- Mapping of classes used in junit tests and tutorials ends here -->
Modified: db/ojb/trunk/src/test/org/apache/ojb/repository_junit_inheritance.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/repository_junit_inheritance.xml?rev=422216&r1=422215&r2=422216&view=diff
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/repository_junit_inheritance.xml (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/repository_junit_inheritance.xml Sat Jul 15 06:55:51 2006
@@ -22,7 +22,7 @@
<!-- =================================================== -->
<class-descriptor
class="org.apache.ojb.broker.InheritanceMultipleTableTest$Entity"
- table="INHERITANCE_ENTITY"
+ table="INH_ENTITY"
>
<field-descriptor
name="id"
@@ -41,7 +41,7 @@
<class-descriptor
class="org.apache.ojb.broker.InheritanceMultipleTableTest$Company"
- table="INHERITANCE_COMPANY"
+ table="INH_COMPANY"
>
<field-descriptor
name="id"
@@ -86,7 +86,7 @@
<class-descriptor
class="org.apache.ojb.broker.InheritanceMultipleTableTest$Employee"
- table="INHERITANCE_EMPLOYEE"
+ table="INH_EMPLOYEE"
>
<!-- This is the base class of the object hierarchy,
so we use autoincrement for one PK field. The other
@@ -129,14 +129,15 @@
<class-descriptor
class="org.apache.ojb.broker.InheritanceMultipleTableTest$Executive"
- table="INHERITANCE_EXECUTIVE"
+ table="INH_EXECUTIVE"
>
+ <!-- auto-increment of PK field is handled by base class -->
<field-descriptor
name="id"
column="OBJ_ID"
jdbc-type="INTEGER"
primarykey="true"
- autoincrement="true"
+ autoincrement="false"
/>
<field-descriptor
name="id_2"
@@ -163,6 +164,7 @@
access="anonymous"
/>
+ <!-- use multiple joined table inheritance -->
<reference-descriptor name="super"
class-ref="org.apache.ojb.broker.InheritanceMultipleTableTest$Employee"
>
@@ -183,14 +185,15 @@
<class-descriptor
class="org.apache.ojb.broker.InheritanceMultipleTableTest$Manager"
- table="INHERITANCE_MANAGER"
+ table="INH_MANAGER"
>
+ <!-- auto-increment of PK field is handled by base class -->
<field-descriptor
name="id"
column="OBJ_ID"
jdbc-type="INTEGER"
primarykey="true"
- autoincrement="true"
+ autoincrement="false"
/>
<field-descriptor
name="id_2"
@@ -206,11 +209,11 @@
jdbc-type="INTEGER"
/>
+ <!-- use multiple joined table inheritance -->
<reference-descriptor name="super"
class-ref="org.apache.ojb.broker.InheritanceMultipleTableTest$Executive"
>
- <foreignkey field-ref="id" />
- <foreignkey field-ref="id_2" />
+ <!-- not needed to define the FK point to the PK fields, OJB automatically assign them -->
</reference-descriptor>
<collection-descriptor
@@ -228,14 +231,15 @@
<class-descriptor
class="org.apache.ojb.broker.InheritanceMultipleTableTest$Shareholder"
- table="INHERITANCE_SHAREHOLDER"
+ table="INH_SHAREHOLDER"
>
+ <!-- auto-increment of PK field is handled by base class -->
<field-descriptor
name="id"
column="OBJ_ID"
jdbc-type="INTEGER"
primarykey="true"
- autoincrement="true"
+ autoincrement="false"
/>
<field-descriptor
name="id_2"
@@ -251,18 +255,18 @@
jdbc-type="INTEGER"
/>
+ <!-- use multiple joined table inheritance -->
<reference-descriptor name="super"
class-ref="org.apache.ojb.broker.InheritanceMultipleTableTest$Manager"
>
- <foreignkey field-ref="id" />
- <foreignkey field-ref="id_2" />
+ <!-- not needed to define the FK point to the PK fields, OJB automatically assign them -->
</reference-descriptor>
</class-descriptor>
<class-descriptor
class="org.apache.ojb.broker.InheritanceMultipleTableTest$Consortium"
- table="INHERITANCE_CONSORTIUM"
+ table="INH_CONSORTIUM"
>
<field-descriptor
name="id"
@@ -299,12 +303,11 @@
>
<inverse-foreignkey field-ref="consortiumKey"/>
</collection-descriptor>
-
</class-descriptor>
<class-descriptor
class="org.apache.ojb.broker.InheritanceMultipleTableTest$Address"
- table="INHERITANCE_ADDRESS"
+ table="INH_ADDRESS"
>
<field-descriptor
name="id"
@@ -324,7 +327,7 @@
<class-descriptor
class="org.apache.ojb.broker.InheritanceMultipleTableTest$Animal"
- table="INHERITANCE_ANIMAL"
+ table="INH_ANIMAL"
>
<field-descriptor
name="id"
@@ -371,20 +374,23 @@
<class-descriptor
class="org.apache.ojb.broker.InheritanceMultipleTableTest$Dog"
- table="INHERITANCE_DOG"
+ table="INH_DOG"
>
+ <!-- auto-increment of PK field is handled by base class -->
<field-descriptor
name="id"
column="OBJ_ID"
jdbc-type="INTEGER"
primarykey="true"
- autoincrement="true"
+ autoincrement="false"
/>
<field-descriptor
name="legs"
column="LEGS"
jdbc-type="INTEGER"
/>
+
+ <!-- use multiple joined table inheritance -->
<reference-descriptor name="super"
class-ref="org.apache.ojb.broker.InheritanceMultipleTableTest$Animal"
>
@@ -394,20 +400,23 @@
<class-descriptor
class="org.apache.ojb.broker.InheritanceMultipleTableTest$Food"
- table="INHERITANCE_FOOD"
+ table="INH_FOOD"
>
+ <!-- auto-increment of PK field is handled by base class -->
<field-descriptor
name="id"
column="OBJ_ID"
jdbc-type="INTEGER"
primarykey="true"
- autoincrement="true"
+ autoincrement="false"
/>
<field-descriptor
name="fkAnimal"
column="FK_ANIMAL"
jdbc-type="INTEGER"
/>
+
+ <!-- use multiple joined table inheritance -->
<reference-descriptor name="super"
class-ref="org.apache.ojb.broker.InheritanceMultipleTableTest$Entity"
>
@@ -722,7 +731,6 @@
column="NAME"
jdbc-type="VARCHAR"
/>
-
</class-descriptor>
<class-descriptor
Modified: db/ojb/trunk/src/test/org/apache/ojb/repository_junit_odmg.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/repository_junit_odmg.xml?rev=422216&r1=422215&r2=422216&view=diff
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/repository_junit_odmg.xml (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/repository_junit_odmg.xml Sat Jul 15 06:55:51 2006
@@ -193,6 +193,7 @@
auto-delete="none"
>
<inverse-foreignkey field-ref="fatherId"/>
+ <orderby name="id" sort="ASC"/>
</collection-descriptor>
</class-descriptor>
@@ -239,7 +240,7 @@
<class-descriptor
class="org.apache.ojb.odmg.shared.DetailFKinPK"
- table="MDTEST_DETAIL_FKINPK"
+ table="MDTEST_FKINPK"
>
<field-descriptor
name="masterId"
@@ -274,7 +275,7 @@
<class-descriptor
class="org.apache.ojb.odmg.shared.DetailFKnoPK"
- table="MDTEST_DETAIL_FKNOPK"
+ table="MDTEST_FKNOPK"
>
<field-descriptor
name="detailId"
@@ -574,7 +575,7 @@
note, we do not use autoincrement -->
<class-descriptor
class="org.apache.ojb.odmg.FieldConversionTest_4$Node"
- table="FIELD_CONVERSION_NODE"
+ table="FIELDCONV_NODE"
>
<field-descriptor
name="uid"
@@ -751,7 +752,7 @@
-->
<class-descriptor
class="org.apache.ojb.odmg.CollectionsTest$CollectibleA"
- table="COL_COLLECTIBLE_A">
+ table="COLLECTIBLE_A">
<field-descriptor
name="colId"
@@ -791,7 +792,7 @@
<class-descriptor
class="org.apache.ojb.odmg.CollectionsTest$CollectibleB"
- table="COL_COLLECTIBLE_B">
+ table="COLLECTIBLE_B">
<field-descriptor
name="colId"
@@ -831,7 +832,7 @@
<class-descriptor
class="org.apache.ojb.odmg.CollectionsTest$CollectibleC"
- table="COL_COLLECTIBLE_C">
+ table="COLLECTIBLE_C">
<field-descriptor
name="colId"
@@ -1370,7 +1371,7 @@
<!-- =================================================== -->
<class-descriptor
class="org.apache.ojb.odmg.InheritanceMultipleTableTest$Employee"
- table="INHERITANCE_EMPLOYEE"
+ table="INH_EMPLOYEE"
>
<field-descriptor
name="id"
@@ -1424,7 +1425,7 @@
<collection-descriptor
name="carrels"
element-class-ref="org.apache.ojb.odmg.InheritanceMultipleTableTest$Address"
- indirection-table="INHERITANCE_EMPLOYEE_ADDRESS"
+ indirection-table="INH_EMPL_ADDR"
proxy="false"
auto-retrieve="true"
auto-update="none"
@@ -1438,14 +1439,15 @@
<class-descriptor
class="org.apache.ojb.odmg.InheritanceMultipleTableTest$Executive"
- table="INHERITANCE_EXECUTIVE"
+ table="INH_EXECUTIVE"
>
+ <!-- auto-increment of PK field is handled by base class -->
<field-descriptor
name="id"
column="OBJ_ID"
jdbc-type="INTEGER"
primarykey="true"
- autoincrement="true"
+ autoincrement="false"
/>
<field-descriptor
name="id_2"
@@ -1473,6 +1475,7 @@
access="anonymous"
/>
+ <!-- use multiple joined table inheritance -->
<reference-descriptor name="super"
class-ref="org.apache.ojb.odmg.InheritanceMultipleTableTest$Employee">
<foreignkey field-ref="id"/>
@@ -1493,14 +1496,15 @@
<class-descriptor
class="org.apache.ojb.odmg.InheritanceMultipleTableTest$Manager"
- table="INHERITANCE_MANAGER"
+ table="INH_MANAGER"
>
+ <!-- auto-increment of PK field is handled by base class -->
<field-descriptor
name="id"
column="OBJ_ID"
jdbc-type="INTEGER"
primarykey="true"
- autoincrement="true"
+ autoincrement="false"
/>
<field-descriptor
name="id_2"
@@ -1510,6 +1514,7 @@
autoincrement="false"
/>
+ <!-- use multiple joined table inheritance -->
<reference-descriptor name="super"
class-ref="org.apache.ojb.odmg.InheritanceMultipleTableTest$Executive">
<foreignkey field-ref="id"/>
@@ -1531,7 +1536,7 @@
<class-descriptor
class="org.apache.ojb.odmg.InheritanceMultipleTableTest$Address"
- table="INHERITANCE_ADDRESS"
+ table="INH_ADDRESS"
>
<field-descriptor
name="id"
@@ -1561,7 +1566,7 @@
<collection-descriptor
name="employees"
element-class-ref="org.apache.ojb.odmg.InheritanceMultipleTableTest$Employee"
- indirection-table="INHERITANCE_EMPLOYEE_ADDRESS"
+ indirection-table="INH_EMPL_ADDR"
proxy="false"
auto-retrieve="true"
auto-update="none"
@@ -1779,6 +1784,7 @@
auto-update="none"
auto-delete="none"
>
+ <orderby name="fkBook" sort="ASC"/>
<inverse-foreignkey field-ref="fkBook"/>
</collection-descriptor>
@@ -1957,7 +1963,7 @@
auto-delete="none"
>
<foreignkey field-ref="detailFk"/>
- <attribute attribute-name="fk" attribute-value="true"/>
+ <!--<attribute attribute-name="constraint" attribute-value="true"/>-->
</reference-descriptor>
<collection-descriptor
@@ -1975,7 +1981,7 @@
name="distributors"
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
element-class-ref="org.apache.ojb.odmg.CircularTest$Distributor"
- indirection-table="CT_SHOP_DISTRIBUTOR"
+ indirection-table="CT_SHOP_DIST"
proxy="false"
auto-retrieve="true"
auto-update="none"
@@ -2009,7 +2015,7 @@
name="shops"
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
element-class-ref="org.apache.ojb.odmg.CircularTest$Shop"
- indirection-table="CT_SHOP_DISTRIBUTOR"
+ indirection-table="CT_SHOP_DIST"
proxy="false"
auto-retrieve="true"
auto-update="none"
@@ -2059,7 +2065,7 @@
auto-delete="none"
>
<foreignkey field-ref="shopFk"/>
- <attribute attribute-name="fk" attribute-value="true"/>
+ <!--<attribute attribute-name="constraint" attribute-value="true"/>-->
</reference-descriptor>
<collection-descriptor
@@ -2071,7 +2077,7 @@
auto-delete="none"
>
<inverse-foreignkey field-ref="subProductFK"/>
- <attribute attribute-name="fk" attribute-value="true"/>
+ <!--<attribute attribute-name="constraint" attribute-value="true"/>-->
</collection-descriptor>
</class-descriptor>
@@ -2146,7 +2152,7 @@
auto-delete="none"
>
<foreignkey field-ref="fkId"/>
- <attribute attribute-name="fk" attribute-value="true"/>
+ <!--<attribute attribute-name="constraint" attribute-value="true"/>-->
</reference-descriptor>
</class-descriptor>
@@ -2181,9 +2187,10 @@
proxy="false"
auto-retrieve="true"
auto-update="none"
- auto-delete="none">
+ auto-delete="none"
+ >
<foreignkey field-ref="fkId"/>
- <attribute attribute-name="fk" attribute-value="true"/>
+ <!--<attribute attribute-name="constraint" attribute-value="true"/>-->
</reference-descriptor>
</class-descriptor>
@@ -2238,7 +2245,7 @@
auto-delete="none"
>
<foreignkey field-ref="fkId"/>
- <attribute attribute-name="fk" attribute-value="true"/>
+ <!--<attribute attribute-name="constraint" attribute-value="true"/>-->
</reference-descriptor>
</class-descriptor>
@@ -2282,7 +2289,7 @@
<class-descriptor
class="org.apache.ojb.odmg.LockingTest$LockObject"
- table="LOCKED_BY_VERSION"
+ table="VERSIONLOCKED"
>
<field-descriptor
name="id"
@@ -2300,7 +2307,7 @@
<class-descriptor
class="org.apache.ojb.odmg.LockingTest$LockObjectOpt"
- table="LOCKED_BY_VERSION"
+ table="VERSIONLOCKED"
>
<field-descriptor
name="id"
@@ -2369,8 +2376,51 @@
auto-update="none"
auto-delete="none">
<foreignkey field-ref="fkToA"/>
- <attribute attribute-name="fk" attribute-value="true"/>
+ <!--<attribute attribute-name="constraint" attribute-value="true"/>-->
</reference-descriptor>
+</class-descriptor>
+
+<class-descriptor
+ class="org.apache.ojb.odmg.UserTestCases$A"
+ table="UTC_A">
+
+ <field-descriptor
+ name="id"
+ column="ID_"
+ jdbc-type="INTEGER"
+ primarykey="true"
+ autoincrement="false"/>
+
+ <field-descriptor
+ name="name"
+ column="NAME"
+ jdbc-type="VARCHAR"/>
+
+ <collection-descriptor
+ name="items"
+ element-class-ref="org.apache.ojb.odmg.UserTestCases$B"
+ auto-retrieve="true"
+ auto-update="none"
+ auto-delete="none">
+ <inverse-foreignkey field-ref="id"/>
+ </collection-descriptor>
+</class-descriptor>
+
+<class-descriptor
+ class="org.apache.ojb.odmg.UserTestCases$B"
+ table="UTC_B">
+
+ <field-descriptor
+ name="id"
+ column="ID_"
+ jdbc-type="INTEGER"
+ primarykey="true"
+ autoincrement="false"/>
+
+ <field-descriptor
+ name="description"
+ column="DESCRIPTION"
+ jdbc-type="VARCHAR"/>
</class-descriptor>
<!-- Mapping of classes used in junit tests and tutorials ends here -->
Modified: db/ojb/trunk/src/test/org/apache/ojb/repository_junit_reference.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/repository_junit_reference.xml?rev=422216&r1=422215&r2=422216&view=diff
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/repository_junit_reference.xml (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/repository_junit_reference.xml Sat Jul 15 06:55:51 2006
@@ -844,7 +844,7 @@
-->
<class-descriptor
class="org.apache.ojb.broker.CollectionTest$CollectibleBase"
- table="COL_COLLECTIBLE_BASE">
+ table="COLLECTIBLE_BASE">
<!-- extent-class class-ref="org.apache.ojb.broker.CollectionTest$CollectibleB" / -->
<field-descriptor
name="colId"
@@ -870,7 +870,7 @@
<class-descriptor
class="org.apache.ojb.broker.CollectionTest$CollectibleB"
- table="COL_COLLECTIBLE_B">
+ table="COLLECTIBLE_B">
<!-- extent-class class-ref="org.apache.ojb.broker.CollectionTest$CollectibleC" / -->
@@ -897,7 +897,7 @@
<class-descriptor
class="org.apache.ojb.broker.CollectionTest$CollectibleC"
- table="COL_COLLECTIBLE_C">
+ table="COLLECTIBLE_C">
<!-- extent-class class-ref="org.apache.ojb.broker.CollectionTest$CollectibleCC" / -->
<!-- extent-class class-ref="org.apache.ojb.broker.CollectionTest$CollectibleC2" / -->
<field-descriptor
@@ -940,7 +940,7 @@
<class-descriptor
class="org.apache.ojb.broker.CollectionTest$CollectibleCC"
- table="COL_COLLECTIBLE_CC">
+ table="COLLECTIBLE_CC">
<field-descriptor
name="colId"
@@ -982,7 +982,7 @@
<class-descriptor
class="org.apache.ojb.broker.CollectionTest$CollectibleC2"
- table="COL_COLLECTIBLE_C2">
+ table="COLLECTIBLE_C2">
<field-descriptor
name="colId"
@@ -1025,7 +1025,7 @@
<class-descriptor
class="org.apache.ojb.broker.CollectionTest$CollectibleD"
- table="COL_COLLECTIBLE_D">
+ table="COLLECTIBLE_D">
<field-descriptor
name="colId"
@@ -1057,7 +1057,7 @@
<class-descriptor
class="org.apache.ojb.broker.CollectionTest$CollectibleDD"
- table="COL_COLLECTIBLE_D">
+ table="COLLECTIBLE_D">
<field-descriptor
name="colId"
@@ -1102,6 +1102,9 @@
<class-descriptor class="org.apache.ojb.broker.CollectionTest$BookShelfItem">
<extent-class class-ref="org.apache.ojb.broker.CollectionTest$Book"/>
<extent-class class-ref="org.apache.ojb.broker.CollectionTest$DVD"/>
+ <!-- This class isn't a subclass of Book or DVD or a implementation of
+ BookShelfItem, anyway it's possible to declare it as extent (but not recommended) -->
+ <extent-class class-ref="org.apache.ojb.broker.CollectionTest$Candie"/>
</class-descriptor>
<class-descriptor
@@ -1143,6 +1146,12 @@
/>
<field-descriptor
+ name="name"
+ column="NAME"
+ jdbc-type="VARCHAR"
+ />
+
+ <field-descriptor
name="shelfFk"
column="BOOKSHELF_FK"
jdbc-type="INTEGER"
@@ -1174,6 +1183,55 @@
/>
<field-descriptor
+ name="name"
+ column="NAME"
+ jdbc-type="VARCHAR"
+ />
+
+ <field-descriptor
+ name="shelfFk"
+ column="BOOKSHELF_FK"
+ jdbc-type="INTEGER"
+ access="anonymous"
+ />
+ <reference-descriptor
+ name="shelf"
+ class-ref="org.apache.ojb.broker.CollectionTest$BookShelf"
+ auto-retrieve="true"
+ auto-update="false"
+ auto-delete="false"
+ proxy="true"
+ >
+ <foreignkey field-ref="shelfFk"/>
+ </reference-descriptor>
+
+ </class-descriptor>
+
+ <class-descriptor
+ class="org.apache.ojb.broker.CollectionTest$Candie"
+ table="COL_CANDIES"
+ >
+ <field-descriptor
+ name="pk"
+ column="PK"
+ jdbc-type="INTEGER"
+ primarykey="true"
+ autoincrement="true"
+ />
+
+ <field-descriptor
+ name="name"
+ column="NAME"
+ jdbc-type="VARCHAR"
+ />
+
+ <field-descriptor
+ name="ingredients"
+ column="INGREDIENTS"
+ jdbc-type="VARCHAR"
+ />
+
+ <field-descriptor
name="shelfFk"
column="BOOKSHELF_FK"
jdbc-type="INTEGER"
@@ -1384,7 +1442,7 @@
<class-descriptor
class="org.apache.ojb.broker.MultithreadedReadTest$AddressImpl"
- table="READTEST_ADDRESS"
+ table="READTEST_ADDR"
proxy="dynamic"
>
<field-descriptor
@@ -1422,7 +1480,7 @@
<class-descriptor
class="org.apache.ojb.broker.MultithreadedReadTest$AddressTypeImpl"
- table="READTEST_ADDRESS_TYPE"
+ table="READTEST_ADDR_TYPE"
proxy="dynamic"
>
<field-descriptor
@@ -1738,7 +1796,7 @@
<class-descriptor
class="org.apache.ojb.broker.CollectionTest2$Project"
- table="COL_2_PROJECT"
+ table="COL2_PRJ"
>
<field-descriptor
@@ -1767,6 +1825,17 @@
</collection-descriptor>
<collection-descriptor
+ name="subProject_2s"
+ element-class-ref="org.apache.ojb.broker.CollectionTest2$SubProject_2"
+ proxy="false"
+ auto-retrieve="false"
+ auto-update="none"
+ auto-delete="none"
+ >
+ <inverse-foreignkey field-ref="id"/>
+ </collection-descriptor>
+
+ <collection-descriptor
name="developers"
element-class-ref="org.apache.ojb.broker.CollectionTest2$Developer"
proxy="false"
@@ -1780,7 +1849,7 @@
<class-descriptor
class="org.apache.ojb.broker.CollectionTest2$SubProject"
- table="COL_2_SUB_PROJECT"
+ table="COL2_SUBPRJ"
>
<field-descriptor
@@ -1817,8 +1886,54 @@
</class-descriptor>
<class-descriptor
+ class="org.apache.ojb.broker.CollectionTest2$SubProject_2"
+ table="COL2_SUBPRJ2"
+ >
+
+ <field-descriptor
+ name="id"
+ column="SUB_ID"
+ jdbc-type="INTEGER"
+ primarykey="true"
+ autoincrement="false"
+ />
+
+ <field-descriptor
+ name="date"
+ column="SUB_DATE"
+ jdbc-type="TIMESTAMP"
+ primarykey="true"
+ autoincrement="false"
+ />
+
+ <field-descriptor
+ name="name"
+ column="NAME"
+ jdbc-type="VARCHAR"
+ />
+
+ <field-descriptor
+ name="projectId"
+ column="FK_PRO_ID"
+ jdbc-type="INTEGER"
+ access="anonymous"
+ />
+
+ <reference-descriptor
+ name="project"
+ class-ref="org.apache.ojb.broker.CollectionTest2$Project"
+ auto-retrieve="false"
+ auto-update="none"
+ auto-delete="none"
+ proxy="false"
+ >
+ <foreignkey field-ref="projectId"/>
+ </reference-descriptor>
+ </class-descriptor>
+
+ <class-descriptor
class="org.apache.ojb.broker.CollectionTest2$Developer"
- table="COL_2_DEVELOPER"
+ table="COL2_DEV"
>
<field-descriptor
@@ -1842,9 +1957,10 @@
/>
</class-descriptor>
+
<class-descriptor
class="org.apache.ojb.broker.CollectionTest2$SubProjectSelfRef"
- table="COL_2_SUB_PROJECT_SELF"
+ table="COL2_SUBPRJ_SELF"
>
<field-descriptor
@@ -1893,7 +2009,7 @@
<class-descriptor
class="org.apache.ojb.broker.CollectionTest2$DeveloperSelf"
- table="COL_2_DEVELOPER_SELF"
+ table="COL2_DEV_SELF"
>
<field-descriptor
Modified: db/ojb/trunk/src/test/org/apache/ojb/web.xml
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/test/org/apache/ojb/web.xml?rev=422216&r1=422215&r2=422216&view=diff
==============================================================================
--- db/ojb/trunk/src/test/org/apache/ojb/web.xml (original)
+++ db/ojb/trunk/src/test/org/apache/ojb/web.xml Sat Jul 15 06:55:51 2006
@@ -15,25 +15,32 @@
* limitations under the License.
*/
-->
-<!DOCTYPE web-app
- PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
-<web-app>
-
- <display-name>OJB ODMG Lock Server</display-name>
+ <display-name>OJB Lock-Server</display-name>
<description>
- OJB ODMG Lock Server
+ The OJB locking server servlet
</description>
<servlet>
<servlet-name>lockserver</servlet-name>
- <servlet-class>org.apache.ojb.odmg.locking.LockServerServlet</servlet-class>
+ <servlet-class>org.apache.ojb.broker.locking.LockManagerServlet</servlet-class>
<init-param>
- <param-name>debug</param-name>
- <param-value>0</param-value>
+ <param-name>lockManager</param-name>
+ <param-value>org.apache.ojb.broker.locking.LockManagerInMemoryImpl</param-value>
</init-param>
-
+ <init-param>
+ <param-name>lockTimeout</param-name>
+ <!-- set lock timeout to 10 minutes (setting in [ms]) -->
+ <param-value>600000</param-value>
+ </init-param>
+ <init-param>
+ <param-name>blockTimeout</param-name>
+ <param-value>1000</param-value>
+ </init-param>
<!--load-on-startup>1</load-on-startup-->
</servlet>
@@ -50,6 +57,4 @@
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
-
-
</web-app>
Modified: db/ojb/trunk/src/xdoclet/test/xdoclet/modules/ojb/tests/TestRowReader.java
URL: http://svn.apache.org/viewvc/db/ojb/trunk/src/xdoclet/test/xdoclet/modules/ojb/tests/TestRowReader.java?rev=422216&r1=422215&r2=422216&view=diff
==============================================================================
--- db/ojb/trunk/src/xdoclet/test/xdoclet/modules/ojb/tests/TestRowReader.java (original)
+++ db/ojb/trunk/src/xdoclet/test/xdoclet/modules/ojb/tests/TestRowReader.java Sat Jul 15 06:55:51 2006
@@ -19,6 +19,7 @@
import org.apache.ojb.broker.accesslayer.ResultSetAndStatement;
import org.apache.ojb.broker.accesslayer.RowReader;
+import org.apache.ojb.broker.metadata.FieldDescriptor;
/**
* Row reader class used in some of the unit tests.
@@ -41,6 +42,10 @@
}
public void refreshObject(Object instance, Map row)
+ {
+ }
+
+ public void readValuesFrom(ResultSetAndStatement rs, Map row, FieldDescriptor[] fields)
{
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org