You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by Jeff Butler <je...@gmail.com> on 2005/12/11 06:56:09 UTC

[ANNOUNCE] Abator - a Java Code Generator for iBATIS

I am very pleased to announce that a new Java code generator for iBATIS
is now available - Abator.

Abator generates SqlMaps, Java domain classes, and (optionally) Java DAO
classes.  It uses Database Metadata as input, and is highly customizable.
Abator runs as a Eclipse plugin (Eclipse 3.0 and higher).  It is intended to
be run iteratively as your project and database mature, so it will not
overwrite any hand coded changes you make to any of the generated files.

The core code generation functionality of Abator does not require Eclipse,
and can be run as a standalone JAR - I'll post some instructions about how
to do that if anyone is interested.  As a standalone JAR, Abator only
generates code - it does not try to save the results, or try to merge the
generated code with any already existing files.

I have tested Abator extensively with DB2 and MySql, but not other
databases.  I would sincerely appreciate any feedback related to other
databases, or about its core functionality.

This is release 0.5.0 of Abator, and it is classified as an Alpha level
release.  I anticipate that public testing could reveal some issues, so I
have refrained from calling it 1.0.0 yet.  But I feel confident that the
code is "ready for prime time" - I have been using it on a project for some
time with good results.

Check it out here:

http://ibatis.apache.org/abator.html

Enjoy...
Jeff Butler

Re: [ANNOUNCE] Abator - a Java Code Generator for iBATIS

Posted by Larry Meadors <lm...@apache.org>.
Right on, Jeff!

I look forward to seeing it in action.

Larry


On 12/10/05, Jeff Butler <je...@gmail.com> wrote:
> I am very pleased to announce that a new Java code generator for iBATIS is
> now available - Abator.
>
> Abator generates SqlMaps, Java domain classes, and (optionally) Java DAO
> classes.  It uses Database Metadata as input, and is highly customizable.
> Abator runs as a Eclipse plugin (Eclipse 3.0 and higher).  It is intended to
> be run iteratively as your project and database mature, so it will not
> overwrite any hand coded changes you make to any of the generated files.
>
> The core code generation functionality of Abator does not require Eclipse,
> and can be run as a standalone JAR - I'll post some instructions about how
> to do that if anyone is interested.  As a standalone JAR, Abator only
> generates code - it does not try to save the results, or try to merge the
> generated code with any already existing files.
>
> I have tested Abator extensively with DB2 and MySql, but not other
> databases.  I would sincerely appreciate any feedback related to other
> databases, or about its core functionality.
>
> This is release 0.5.0 of Abator, and it is classified as an Alpha level
> release.  I anticipate that public testing could reveal some issues, so I
> have refrained from calling it 1.0.0 yet.  But I feel confident that the
> code is "ready for prime time" - I have been using it on a project for some
> time with good results.
>
> Check it out here:
>
> http://ibatis.apache.org/abator.html
>
> Enjoy...
> Jeff Butler
>

Re: [ANNOUNCE] Abator - a Java Code Generator for iBATIS

Posted by Jeff Butler <je...@gmail.com>.
Hi Denis -

Sorry for your trouble.  All unexpected errors should be logged in the
regular Eclipse logging system.  You can see it in Eclipse by opening the
"Error Log" view.  Or, look in the .metadata>.log directory in your
workspace.  Let me know what you find - and maybe this should start a new
thread.

Jeff Butler


On 12/11/05, Denis Vladimirov <de...@gmail.com> wrote:
>
> Hi Jeff,
> I have just installed the Abator plugin.
> When I am trying to run it I get the following error "/ by zero" and there
> is no any stacktrace.
> Does it have a log file I could look at ?
> Do you know what the problem is?
> Is my config file correct?
> I am running it in the Eclipse 3.1.
> Here is my config file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE abatorConfiguration PUBLIC "-//Apache Software Foundation//DTD
> Abator for iBATIS Configuration 1.0//EN"
>   "http://ibatis.apache.org/dtd/abator-config_1_0.dtd">
>
> <abatorConfiguration>
>   <abatorContext id="OracleTables">
>     <jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
>         connectionURL="jdbc:oracle:thin:@10.0.0.44:1521:uodev01"
>         userId="denis"
>         password="denis">
>       <classPathEntry location="C:/Apps/Oracle/10g/jdbc/lib/ojdbc14.jar"
> />
>     </jdbcConnection>
>
>     <javaTypeResolver >
>       <property name="forceBigDecimals" value="false" />  <!-- default is
> false -->
>     </javaTypeResolver>
>
>     <javaModelGenerator targetPackage="test.model" targetProject="vlad">
>       <property name="enableSubPackages" value="true" /> <!-- default is
> false -->
>       <property name="trimStrings" value="true" /> <!-- default is false
> -->
>     </javaModelGenerator>
>
>     <sqlMapGenerator targetPackage="test.xml"  targetProject="vlad">
>       <property name="enableSubPackages" value="true" /> <!-- default is
> false -->
>     </sqlMapGenerator>
>
>     <daoGenerator type="IBATIS" targetPackage=" test.dao"
> targetProject="vlad">
>       <property name="enableSubPackages" value="true" /> <!-- default is
> false -->
>     </daoGenerator>
>
>     <table schema="denis" tableName="PARAMETERS"
> domainObjectName="Parameter" >
>       <property name="useActualColumnNames" value="true"/> <!-- default is
> false -->
>
>     </table>
>
>   </abatorContext>
> </abatorConfiguration>
>
>
>
> Thanks
> Denis
>

Re: [ANNOUNCE] Abator - a Java Code Generator for iBATIS

Posted by Denis Vladimirov <de...@gmail.com>.
Hi Jeff,
I have just installed the Abator plugin.
When I am trying to run it I get the following error "/ by zero" and there
is no any stacktrace.
Does it have a log file I could look at ?
Do you know what the problem is?
Is my config file correct?
I am running it in the Eclipse 3.1.
Here is my config file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE abatorConfiguration PUBLIC "-//Apache Software Foundation//DTD
Abator for iBATIS Configuration 1.0//EN"
  "http://ibatis.apache.org/dtd/abator-config_1_0.dtd">

<abatorConfiguration>
  <abatorContext id="OracleTables">
    <jdbcConnection driverClass="oracle.jdbc.driver.OracleDriver"
        connectionURL="jdbc:oracle:thin:@10.0.0.44:1521:uodev01"
        userId="denis"
        password="denis">
      <classPathEntry location="C:/Apps/Oracle/10g/jdbc/lib/ojdbc14.jar" />
    </jdbcConnection>

    <javaTypeResolver >
      <property name="forceBigDecimals" value="false" />  <!-- default is
false -->
    </javaTypeResolver>

    <javaModelGenerator targetPackage="test.model" targetProject="vlad">
      <property name="enableSubPackages" value="true" /> <!-- default is
false -->
      <property name="trimStrings" value="true" /> <!-- default is false -->
    </javaModelGenerator>

    <sqlMapGenerator targetPackage="test.xml"  targetProject="vlad">
      <property name="enableSubPackages" value="true" /> <!-- default is
false -->
    </sqlMapGenerator>

    <daoGenerator type="IBATIS" targetPackage="test.dao"
targetProject="vlad">
      <property name="enableSubPackages" value="true" /> <!-- default is
false -->
    </daoGenerator>

    <table schema="denis" tableName="PARAMETERS"
domainObjectName="Parameter" >
      <property name="useActualColumnNames" value="true"/> <!-- default is
false -->

    </table>

  </abatorContext>
</abatorConfiguration>



Thanks
Denis

Re: [ANNOUNCE] Abator - a Java Code Generator for iBATIS

Posted by Olivier Ziller <ol...@gmail.com>.
hi Jeff,

this looks great : i've just tested it with a simple mysql example and 
it's working fine. I think your work will be a major argument for using 
iBatis (when we have to deal with hibernate evangelists)

i will try to use it in my project (mysql and oracle with blobs) as soon 
as the current release will be stable enough.

i've just a question regarding key class... Don't you think it will be 
useful that the object class can automatically instanciate the 
corresponding primary key object? it will be useful when you're working 
on an object and want to delete it.

regarding the auto-generated code it would also be useful to add a 
custom comment at the start of each file (license for example)... 
nevertheless it's a detail.

sorry for my english i try to make my best...

thank you!

Jeff Butler a écrit :
> I am very pleased to announce that a new Java code generator for 
> iBATIS is now available - Abator.
>  
> Abator generates SqlMaps, Java domain classes, and (optionally) Java 
> DAO classes.  It uses Database Metadata as input, and is highly 
> customizable.  Abator runs as a Eclipse plugin (Eclipse 3.0 and 
> higher).  It is intended to be run iteratively as your project and 
> database mature, so it will not overwrite any hand coded changes you 
> make to any of the generated files.
>  
> The core code generation functionality of Abator does not require 
> Eclipse, and can be run as a standalone JAR - I'll post some 
> instructions about how to do that if anyone is interested.  As a 
> standalone JAR, Abator only generates code - it does not try to save 
> the results, or try to merge the generated code with any already 
> existing files.
>  
> I have tested Abator extensively with DB2 and MySql, but not other 
> databases.  I would sincerely appreciate any feedback related to other 
> databases, or about its core functionality.
>  
> This is release 0.5.0 of Abator, and it is classified as an Alpha 
> level release.  I anticipate that public testing could reveal some 
> issues, so I have refrained from calling it 1.0.0 yet.  But I feel 
> confident that the code is "ready for prime time" - I have been using 
> it on a project for some time with good results.
>  
> Check it out here:
>  
> http://ibatis.apache.org/abator.html
>  
> Enjoy...
> Jeff Butler
>  

Re: [ANNOUNCE] Abator - a Java Code Generator for iBATIS

Posted by Aitor Imaz <ai...@gmail.com>.
I've tried it with a simple table and it works really well. The 
documentation is also concise but pretty complete. I like the fact that 
you can regenerate code and still keep your changes untouched. I'll 
investigate it further when I have more time but I think it has a lot 
of potential.

Thanks Jeff. Good work!

Aitor


Re: [ANNOUNCE] Abator - a Java Code Generator for iBATIS

Posted by Jeff Butler <je...@gmail.com>.
I'm afraid there's not much to see.  The configuration file is the most
interesting thing to look at, here's a link to that page in the
documentation:

http://svn.apache.org/repos/asf/ibatis/trunk/java/mapper/mapper2/tools/abator/org.apache.ibatis.abator.doc/html/gettingstarted/xmlconfig.html

Abator.Net would be cool!  I think the core generation function could come
over pretty easily.  The issue would be the merge functions where we don't
overwrite hand coded additions to the files.  For these functions I use JDOM
for  XML files and Eclipse for Java files.  If there's some equivalent
functions in the .Net world (to "parse" these files and manipulated them in
a symantically correct way), then it would work.  My guess is that the XML
merge would be pretty simple in .Net, but I have no idea about a C# merge.
I'd love to talk about it further...

Jeff Butler


On 12/11/05, Ron Grabowski <ro...@yahoo.com> wrote:
>
> Could you post a screen shot to the abator.html page so we can have
> some instant gratification?
>
> Any ideas on if Abator can/will generate files for IBatisNet?
>
> Thanks,
> Ron
>
> --- Jeff Butler <je...@gmail.com> wrote:
>
> > I am very pleased to announce that a new Java code generator for
> > iBATIS
> > is now available - Abator.
> >
> > Abator generates SqlMaps, Java domain classes, and (optionally) Java
> > DAO
> > classes.  It uses Database Metadata as input, and is highly
> > customizable.
> > Abator runs as a Eclipse plugin (Eclipse 3.0 and higher).  It is
> > intended to
> > be run iteratively as your project and database mature, so it will
> > not
> > overwrite any hand coded changes you make to any of the generated
> > files.
> >
> > The core code generation functionality of Abator does not require
> > Eclipse,
> > and can be run as a standalone JAR - I'll post some instructions
> > about how
> > to do that if anyone is interested.  As a standalone JAR, Abator only
> > generates code - it does not try to save the results, or try to merge
> > the
> > generated code with any already existing files.
> >
> > I have tested Abator extensively with DB2 and MySql, but not other
> > databases.  I would sincerely appreciate any feedback related to
> > other
> > databases, or about its core functionality.
> >
> > This is release 0.5.0 of Abator, and it is classified as an Alpha
> > level
> > release.  I anticipate that public testing could reveal some issues,
> > so I
> > have refrained from calling it 1.0.0 yet.  But I feel confident that
> > the
> > code is "ready for prime time" - I have been using it on a project
> > for some
> > time with good results.
> >
> > Check it out here:
> >
> > http://ibatis.apache.org/abator.html
> >
> > Enjoy...
> > Jeff Butler
> >
>
>

Re: [ANNOUNCE] Abator - a Java Code Generator for iBATIS

Posted by Ron Grabowski <ro...@yahoo.com>.
Could you post a screen shot to the abator.html page so we can have
some instant gratification?

Any ideas on if Abator can/will generate files for IBatisNet?

Thanks,
Ron

--- Jeff Butler <je...@gmail.com> wrote:

> I am very pleased to announce that a new Java code generator for
> iBATIS
> is now available - Abator.
> 
> Abator generates SqlMaps, Java domain classes, and (optionally) Java
> DAO
> classes.  It uses Database Metadata as input, and is highly
> customizable.
> Abator runs as a Eclipse plugin (Eclipse 3.0 and higher).  It is
> intended to
> be run iteratively as your project and database mature, so it will
> not
> overwrite any hand coded changes you make to any of the generated
> files.
> 
> The core code generation functionality of Abator does not require
> Eclipse,
> and can be run as a standalone JAR - I'll post some instructions
> about how
> to do that if anyone is interested.  As a standalone JAR, Abator only
> generates code - it does not try to save the results, or try to merge
> the
> generated code with any already existing files.
> 
> I have tested Abator extensively with DB2 and MySql, but not other
> databases.  I would sincerely appreciate any feedback related to
> other
> databases, or about its core functionality.
> 
> This is release 0.5.0 of Abator, and it is classified as an Alpha
> level
> release.  I anticipate that public testing could reveal some issues,
> so I
> have refrained from calling it 1.0.0 yet.  But I feel confident that
> the
> code is "ready for prime time" - I have been using it on a project
> for some
> time with good results.
> 
> Check it out here:
> 
> http://ibatis.apache.org/abator.html
> 
> Enjoy...
> Jeff Butler
>