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 to...@apache.org on 2005/03/22 22:36:10 UTC
cvs commit: db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides xdoclet-module.xml
tomdz 2005/03/22 13:36:10
Modified: src/xdoclet/test/xdoclet/modules/ojb/tests
CollectionTagCollectionClassAttributeTests.java
src/doc/forrest/src/documentation/content/xdocs/docu/guides
xdoclet-module.xml
Log:
Updated XDoclet module documentation
Fixed comment in one of the unit tests
Revision Changes Path
1.7 +1 -1 db-ojb/src/xdoclet/test/xdoclet/modules/ojb/tests/CollectionTagCollectionClassAttributeTests.java
Index: CollectionTagCollectionClassAttributeTests.java
===================================================================
RCS file: /home/cvs/db-ojb/src/xdoclet/test/xdoclet/modules/ojb/tests/CollectionTagCollectionClassAttributeTests.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- CollectionTagCollectionClassAttributeTests.java 22 Mar 2005 21:30:39 -0000 1.6
+++ CollectionTagCollectionClassAttributeTests.java 22 Mar 2005 21:36:09 -0000 1.7
@@ -758,7 +758,7 @@
runTorqueXDoclet(TORQUE_DEST_FILE, "ojbtest"));
}
- // Test: collection-class set to ManageableMapImpl (an ojb class and sub-type of HashMap)
+ // Test: collection-class set to ManagableHashMap (an ojb class and sub-type of HashMap)
public void testCollectionClass13()
{
addClass(
1.7 +118 -22 db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/xdoclet-module.xml
Index: xdoclet-module.xml
===================================================================
RCS file: /home/cvs/db-ojb/src/doc/forrest/src/documentation/content/xdocs/docu/guides/xdoclet-module.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- xdoclet-module.xml 5 Jan 2005 19:57:20 -0000 1.6
+++ xdoclet-module.xml 22 Mar 2005 21:36:09 -0000 1.7
@@ -422,7 +422,23 @@
<strong>documentation</strong>
</dt>
<dd>
- Optionally contains documentation on the class.
+ Optionally contains documentation on the class. If no <code>table-documentation</code>
+ attribute is specified, then the value is also used for the table documentation
+ in the database schema.
+ <br/>
+ </dd>
+ <dt>
+ <strong>generate-repository-info : true (default) | false</strong>
+ </dt>
+ <dd>
+ Setting this to <code>false</code> prevents the generation of field/reference/collection
+ descriptors in the repository XML file, and also automatically enforces
+ <code>generate-table-info = false</code>.<br/>
+ Note that there is one case where the XDoclet module will still generate field
+ descriptors. If the type is referenced by a reference or collection, then
+ the corresponding foreign key fields (if 1:n collection) or primary keys (if
+ reference or m:n collection) will be automatically included in the class descriptor,
+ even if they are only defined in subtypes.
<br/>
</dd>
@@ -430,11 +446,9 @@
<strong>generate-table-info : true (default) | false</strong>
</dt>
<dd>
- This attribute controls whether the type has data. If set to <code>true</code>, the field,
- reference and collection descriptors will be present in the repository file and a torque
- table descriptor will be created in the database schema. When set to <code>false</code>,
- only the inheritance information but no field, reference or collection descriptors are
- generated in the repository file and no table will be in the database schema.
+ This attribute controls whether the type has an associated table. If set to
+ <code>true</code>, a torque table descriptor will be created in the database
+ schema. Otherwise, no table will be in the database schema for this type.
<br/>
</dd>
@@ -461,6 +475,13 @@
The name of the table used for this type. Is only used when table info is generated. If not
specified, then the short name of the type is used.
</dd>
+ <dt>
+ <strong>table-documentation</strong>
+ </dt>
+ <dd>
+ Optionally contains documentation for the table in the database schema.
+ <br/>
+ </dd>
</dl>
<p>
@@ -511,10 +532,11 @@
...
/**
- * @ojb.class table="Artikel"
+ * @ojb.class table="ARTICLE"
* proxy="dynamic"
* include-inherited="true"
* documentation="This is important documentation on the Article class."
+ * table-documentation="And this is important documentation on the ARTICLE table."
* attributes="color=blue,size=big"
*/
public class Article extends AbstractArticle implements InterfaceArticle, java.io.Serializable
@@ -538,7 +560,7 @@
<class-descriptor
class="org.apache.ojb.broker.Article"
proxy="dynamic"
- table="Artikel"
+ table="ARTICLE"
>
<documentation>This is important documentation on the Article class.</documentation>
...
@@ -607,9 +629,11 @@
<link href="#ojb.field">ojb.field</link>,
<link href="#ojb.reference">ojb.reference</link>, and
<link href="#ojb.collection">ojb.collection</link> (with
- the exception of
- <strong>indirection-table</strong> and
- <strong>remote-foreignkey</strong>), and also:
+ the exception of the attributes related to indirection tables (
+ <strong>indirection-table</strong>, <strong>remote-foreignkey</strong>,
+ <strong>indirection-table-primarykeys</strong>, <strong>indirection-table-documentation</strong>,
+ <strong>foreignkey-documentation</strong>, <strong>remote-foreignkey-documentation</strong>),
+ and also:
</p>
<dl>
<dt>
@@ -1324,8 +1348,8 @@
have the same attributes.
</p>
<p>
- Due to a bug in XDoclet, you currently cannot process <code>final</code> or <code>transient</code>
- fields.
+ Due to a bug in XDoclet, it is currently not possible to process <code>final</code> or
+ <code>transient</code> fields.
</p>
<p>
Marked fields are used for descriptor generation in the same type (if it has an
@@ -1419,7 +1443,13 @@
used.
<br/>
</dd>
-
+ <dt>
+ <strong>column-documentation</strong>
+ </dt>
+ <dd>
+ Optionally contains documentation on the column in the database schema.
+ <br/>
+ </dd>
<dt>
<strong>conversion</strong>
</dt>
@@ -1461,7 +1491,9 @@
<strong>documentation</strong>
</dt>
<dd>
- Optionally contains documentation on the field.
+ Optionally contains documentation on the field. If no <code>column-documentation</code>
+ attribute value is specified, then this value is also used for the documentation
+ of the column in the database schema.
<br/>
</dd>
@@ -1846,6 +1878,7 @@
* @ojb.field column="Auslaufartikel"
* jdbc-type="INTEGER"
* conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
+ * column-documentation="Some documentation on the column"
* id="10"
* attributes="color=green,size=small"
*/
@@ -1872,6 +1905,7 @@
<column name="Auslaufartikel"
javaName="isSelloutArticle"
type="INTEGER"
+ description="Some documentation on the column"
/>
...
</table>]]></source>
@@ -1988,7 +2022,19 @@
<link href="#ojb.class">ojb.class</link> tag.
<br/>
</dd>
-
+ <dt>
+ <strong>database-foreignkey : true (default) | false</strong>
+ </dt>
+ <dd>
+ Specifies whether a database foreignkey shall be generated for the reference. Note
+ that this attribute is only evaluated if the XDoclet module has determined that
+ a database foreignkey could be generated. You cannot force the generation with this
+ attribute, and the value of the attribute is not considered when checking if
+ database foreignkeys can be generated in case the referencing class has subtypes
+ (in which case database foreignkeys can only be generated if all subtypes map to the
+ same table or don't map to a table or the inheritance is mapped via a super-reference).
+ <br/>
+ </dd>
<dt>
<strong>documentation</strong>
</dt>
@@ -2150,7 +2196,21 @@
<strong>collection-class</strong> attribute automatically. Otherwise, you have to specify it.
<br/>
</dd>
-
+ <dt>
+ <strong>database-foreignkey : true (default) | false</strong>
+ </dt>
+ <dd>
+ Specifies whether a database foreignkey shall be generated for the collection. Note
+ that this attribute is only evaluated if the XDoclet module has determined that
+ a database foreignkey could be generated. You cannot force the generation with this
+ attribute, and the value of the attribute is not considered when checking if
+ database foreignkeys can be generated in the case of subtypes of the element type or
+ the type having the collection (if m:n collection). For 1:n collections, database
+ foreignkeys can only be generated if all subtypes of the element type map to the
+ same table or don't map to a table or the inheritance is mapped via a super-reference.
+ For m:n collections, the same applies to the class owning the collection.
+ <br/>
+ </dd>
<dt>
<strong>documentation</strong>
</dt>
@@ -2188,6 +2248,14 @@
type.
<br/>
</dd>
+ <dt>
+ <strong>foreignkey-documentation</strong>
+ </dt>
+ <dd>
+ Optionally contains documentation for the columns in the indirection table in the database schema
+ that point to this class.
+ <br/>
+ </dd>
<dt>
<strong>indirection-table</strong>
@@ -2206,6 +2274,22 @@
type (and length setting if necessary) of these primarey keys for the columns.
<br/>
</dd>
+ <dt>
+ <strong>indirection-table-documentation</strong>
+ </dt>
+ <dd>
+ Optionally contains documentation for the indirection table in the database schema.
+ <br/>
+ </dd>
+ <dt>
+ <strong>indirection-table-primarykeys : true | false (default)</strong>
+ </dt>
+ <dd>
+ Specifies that the columns in the indirection table that point to this type, are
+ primary keys of the table. If the element type has no corresponding collection,
+ then this setting is also applied to the columns pointing to the element type.
+ <br/>
+ </dd>
<dt>
<strong>orderby</strong>
@@ -2248,6 +2332,16 @@
attribute is ignored if used with 1:n collections (no indirection table specified).
<br/>
</dd>
+ <dt>
+ <strong>remote-foreignkey-documentation</strong>
+ </dt>
+ <dd>
+ Optionally contains documentation for the columns in the indirection table in the database schema
+ that point to the element type. This value can be used when the element type has no
+ corresponding collection (i.e. remote-foreignkey is specified) or if the corresponding
+ collection does not specify the <code>foreignkey-documentation</code> attribute.
+ <br/>
+ </dd>
</dl>
<p>
The same attributes as for references are written directly to the repository descriptor file (see
@@ -2449,10 +2543,12 @@
<em>Attributes:</em> All of
<link href="#ojb.field">ojb.field</link>,
<link href="#ojb.reference">ojb.reference</link>, and
- <link href="#ojb.collection">ojb.collection</link> (with
- the exception of
- <strong>indirection-table</strong> and
- <strong>remote-foreignkey</strong>), and also:
+ <link href="#ojb.collection">ojb.collection</link> with
+ the exception of the attributes related to indirection tables (
+ <strong>indirection-table</strong>, <strong>remote-foreignkey</strong>,
+ <strong>indirection-table-primarykeys</strong>, <strong>indirection-table-documentation</strong>,
+ <strong>foreignkey-documentation</strong>, <strong>remote-foreignkey-documentation</strong>),
+ and also:
</p>
<dl>
<dt>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org