The following comment has been added to this issue:

     Author: Ming Fai
    Created: Mon, 6 Jan 2003 12:52 PM
       Body:
just notice this:
The "precision" and "scale" extensions only apply to fields of the following types: 

java.math.BigDecimal 
java.math.BigInteger 

so, it's not that important and you may change the issue to MINOR in priority
---------------------------------------------------------------------
View the issue:

  http://opensource.atlassian.com/projects/xdoclet/secure/ViewIssue.jspa?key=XDT-233


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XDT-233
    Summary: Enhance support of TJDO tag
       Type: Improvement

     Status: Assigned
   Priority: Major

 Time Spent: Unknown
   Estimate: 0 minutes

    Project: XDoclet
  Component: JDO Module
   Versions:
             1.2 Beta 3

   Assignee: xdoclet-devel (Use for new issues)
   Reporter: Ming Fai

    Created: Mon, 6 Jan 2003 12:39 PM
    Updated: Mon, 6 Jan 2003 12:39 PM

Description:
i guess the tjdo team enhanced the vendor extension after you've initially created the 
tjdo task. 

according to the tjdo metadata extension docs:
Database column attributes: 
<extension vendor-name="triactive" key="length" value="length-specification"> 
<extension vendor-name="triactive" key="precision" value="integer"> 
<extension vendor-name="triactive" key="scale" value="integer"> 
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/tjdo/tjdo/docs/metadata_dtd.html

currently, only length is supported in the tjdo task. it's pretty easy to add support 
for the other two. I've attached the code as follow, please check:

(base on 
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/xdoclet/xdoclet/modules/tjdo/src/xdoclet/modules/triactive/jdo/TJDOSubTask.java?rev=1.1&content-type=text/vnd.viewcvs-markup)

my addition is denoted by //NEW BEGIN and //NEW END. there are two pieces of new code.

protected Collection getFieldExtensions() throws XDocletException
    {
        Collection extensions = new ArrayList();
        XDoc doc = getCurrentField().getDoc();

        if (doc.hasTag("tjdo.field")) {
            XTag tag = doc.getTag("tjdo.field");
            String columnLength = tag.getAttributeValue("column-length");
            //NEW BEGIN
            String columnPrecision = tag.getAttributeValue("column-precision");
                        String columnScale = tag.getAttributeValue("column-scale");    
        
            //NEW END
            
            String collectionField = tag.getAttributeValue("collection-field");
            String mapField = tag.getAttributeValue("map-field");

            if (columnLength != null) {
                extensions.add(new VendorExtension(getVendorName(), "length", "max " + 
columnLength));
            }
            // NEW BEGIN
            if (columnLength != null) {
                extensions.add(new VendorExtension(getVendorName(), "precision", 
columnPrecision));
            }
            if (columnLength != null) {
                extensions.add(new VendorExtension(getVendorName(), "scale", 
columnScale));
            }
            // NEW END


            if (collectionField != null) {
                extensions.add(new VendorExtension(getVendorName(), 
"collection-field", collectionField));
            }
            if (mapField != null) {
                extensions.add(new VendorExtension(getVendorName(), "map-field", 
mapField));
            }
        }

        return extensions;
    }

maybe there are other new stuff. I only came across the above two fields. let me check 
on them later.

btw. thx for maintaining the code. 

regards,
mingfai






---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/xdoclet/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to