[OS-JIRA] Created: (CAY-79) Improvements to Ant cgen task; new ClassGenerator functions

From: jir..bjectstyle.org
Date: Thu Jan 22 2004 - 12:18:45 EST

  • Next message: Mike Kienenberger: "Optimistic locking xml syntax"

    Message:

      A new issue has been created in JIRA.

    ---------------------------------------------------------------------
    View the issue:

      http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-79

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-79
        Summary: Improvements to Ant cgen task; new ClassGenerator functions
           Type: Improvement

         Status: Assigned
       Priority: Minor

        Project: Cayenne
     Components:
                 Cayenne Core Library
       Versions:
                 1.1 [DEV]

       Assignee: Andrus Adamchik
       Reporter: Mike Kienenberger

        Created: Thu, 22 Jan 2004 12:17 PM
        Updated: Thu, 22 Jan 2004 12:17 PM

    Description:
    Here's my patches to improve the operation of the ant cgen task.

    The patches add support for filenamePrefix, filenameSuffix, and entity task parameters. If those are ok, I'll look into patching the cgen documentation.

    The default filenames generated are now

    filenamePrefix + className + filenameSuffix

    instead of

    className + ".java"

    and they default to

            protected String filenamePrefix = "";
            protected String filenameSuffix = ".java";

    If an entity parameter is specified, only the ObjEntity.getName() that matches the parameter is used. It'd probably be even nicer to use some kind of wildcard matching, but I figured this was good enough as a start.

    I changed the error reporting for the cgen task to output the message from the original exception in addition to "Error generating classes."

    I have also added three new functions to the ClassGenerator:

    String capitalizeString(String aString)
    String uncapitalizeString(String aString)
    String stripPackageName(String aString)

    These are actually forwards to NameConverter which seems like the proper place for them.

    I changed getCappedProp() to use NameConverter.capitalizeString()(since I just copied the getCappedProp code to create capitalizeString).

    I also fixed a typo in the NameConverter.javaToUnderscored() javadoc.

    These patches are against today's cvs head.

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

    If you think it was sent incorrectly contact one of the administrators:
       http://objectstyle.org/jira/secure/Administrators.jspa

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



    This archive was generated by hypermail 2.0.0 : Thu Jan 22 2004 - 12:18:46 EST