You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Tom Antony <to...@yahoo.com> on 2006/05/08 13:06:58 UTC

Utility for "Forward engineering from repository.xml"

Hi All,

Recently I started working on a project using Apache
OJB. In the course of working on this project I
developed a code generator tool which reads in the
repository.xml and generates the Java bean stub source
as well as schema definitions for tables. OJB site
mentions that there are no tools which do "Forward
generation from repository.xml". This is what I do
except that the utility is written in Java and not
XSLT. 

I am posting the sources, you just need to compile the
classes and you can start using it straight away. The
main class is RepositoryXmlProcessor (the main
method demonstrates the usage). The DDL that gets
generated has been tested with Oracle 9i.
Customisations to the schema as well as native
database types, can be accomplished by modifying the
SQLGenerator class which handles the job of generating
the schema. 

Regards,
Tom.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Utility for "Forward engineering from repository.xml"

Posted by Thomas Dudziak <to...@gmail.com>.
On 5/10/06, Armin Waibel <ar...@apache.org> wrote:

> Seems the apache server "kills" your attachment.

Yep, ZIP attachements (among others) are not allowed for Apache mailing lists.

> You could open an issue in JIRA
> http://issues.apache.org/jira/browse/OJB
> and attach the source to this issue.

Please be aware that the source code needs to be Apache 2 licensed for
us to be able to include it in OJB (see OJB's source file).

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Utility for "Forward engineering from repository.xml"

Posted by Tom Antony <to...@yahoo.com>.
Hi Armin,

I can work on the Turbine XML generation as time
permits. Will let you know once I am done.

Regards,
Tom.

--- Armin Waibel <ar...@apache.org> wrote:

> Hi Tom,
> 
> thanks for OJB tool support.
> 
> Tom Antony wrote:
> > Hi All,
> > 
> > Recently I started working on a project using
> Apache
> > OJB. In the course of working on this project I
> > developed a code generator tool which reads in the
> > repository.xml and generates the Java bean stub
> source
> > as well as schema definitions for tables. OJB site
> > mentions that there are no tools which do "Forward
> > generation from repository.xml". This is what I do
> > except that the utility is written in Java and not
> > XSLT. 
> > 
> > I am posting the sources, 
> 
> Seems the apache server "kills" your attachment.
> You could open an issue in JIRA
> http://issues.apache.org/jira/browse/OJB
> and attach the source to this issue.
> 
> 
> you just need to compile the
> > classes and you can start using it straight away.
> The
> > main class is RepositoryXmlProcessor (the main
> > method demonstrates the usage). The DDL that gets
> > generated has been tested with Oracle 9i.
> > Customisations to the schema as well as native
> > database types, can be accomplished by modifying
> the
> > SQLGenerator class which handles the job of
> generating
> > the schema. 
> 
> It would be great if your tool would create the
> Turbine XML format used 
> by ddlutils (instead of the oracle ddl)
> http://db.apache.org/ddlutils/index.html
> Then ddlutils can create DDL's for all supported
> databases (and much more).
> 
> regards,
> Armin
> 
> 
> > 
> > Regards,
> > Tom.
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> > 
> > 
> >
>
------------------------------------------------------------------------
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail:
> ojb-user-help@db.apache.org
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
> ojb-user-help@db.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Utility for "Forward engineering from repository.xml"

Posted by Armin Waibel <ar...@apache.org>.
Hi Tom,

Tom Antony wrote:
> Armin,
> 
> I have created issue OJB-112 and attached the sources
> to this issue. I have changed the sql output to Torque
> format.
> 

Many thanks for your contribution. I will try out this stuff ASAP (after 
  preparation for OJB 1.0.5). Maybe it's possible to integrate it in OJB 
via ant task. The only problem seems to be the usage of generics in your 
code which will not compile on pre JDK1.5.

regards,
Armin


> Regards,
> Tom.
> 
> --- Armin Waibel <ar...@apache.org> wrote:
> 
>> Hi Tom,
>>
>> thanks for OJB tool support.
>>
>> Tom Antony wrote:
>>> Hi All,
>>>
>>> Recently I started working on a project using
>> Apache
>>> OJB. In the course of working on this project I
>>> developed a code generator tool which reads in the
>>> repository.xml and generates the Java bean stub
>> source
>>> as well as schema definitions for tables. OJB site
>>> mentions that there are no tools which do "Forward
>>> generation from repository.xml". This is what I do
>>> except that the utility is written in Java and not
>>> XSLT. 
>>>
>>> I am posting the sources, 
>> Seems the apache server "kills" your attachment.
>> You could open an issue in JIRA
>> http://issues.apache.org/jira/browse/OJB
>> and attach the source to this issue.
>>
>>
>> you just need to compile the
>>> classes and you can start using it straight away.
>> The
>>> main class is RepositoryXmlProcessor (the main
>>> method demonstrates the usage). The DDL that gets
>>> generated has been tested with Oracle 9i.
>>> Customisations to the schema as well as native
>>> database types, can be accomplished by modifying
>> the
>>> SQLGenerator class which handles the job of
>> generating
>>> the schema. 
>> It would be great if your tool would create the
>> Turbine XML format used 
>> by ddlutils (instead of the oracle ddl)
>> http://db.apache.org/ddlutils/index.html
>> Then ddlutils can create DDL's for all supported
>> databases (and much more).
>>
>> regards,
>> Armin
>>
>>
>>> Regards,
>>> Tom.
>>>
>>> __________________________________________________
>>> Do You Yahoo!?
>>> Tired of spam?  Yahoo! Mail has the best spam
>> protection around 
>>> http://mail.yahoo.com 
>>>
>>>
>>>
> ------------------------------------------------------------------------
>>>
> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>> ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail:
>> ojb-user-help@db.apache.org
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail:
>> ojb-user-help@db.apache.org
>>
>>
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Utility for "Forward engineering from repository.xml"

Posted by Tom Antony <to...@yahoo.com>.
Armin,

I have created issue OJB-112 and attached the sources
to this issue. I have changed the sql output to Torque
format.

Regards,
Tom.

--- Armin Waibel <ar...@apache.org> wrote:

> Hi Tom,
> 
> thanks for OJB tool support.
> 
> Tom Antony wrote:
> > Hi All,
> > 
> > Recently I started working on a project using
> Apache
> > OJB. In the course of working on this project I
> > developed a code generator tool which reads in the
> > repository.xml and generates the Java bean stub
> source
> > as well as schema definitions for tables. OJB site
> > mentions that there are no tools which do "Forward
> > generation from repository.xml". This is what I do
> > except that the utility is written in Java and not
> > XSLT. 
> > 
> > I am posting the sources, 
> 
> Seems the apache server "kills" your attachment.
> You could open an issue in JIRA
> http://issues.apache.org/jira/browse/OJB
> and attach the source to this issue.
> 
> 
> you just need to compile the
> > classes and you can start using it straight away.
> The
> > main class is RepositoryXmlProcessor (the main
> > method demonstrates the usage). The DDL that gets
> > generated has been tested with Oracle 9i.
> > Customisations to the schema as well as native
> > database types, can be accomplished by modifying
> the
> > SQLGenerator class which handles the job of
> generating
> > the schema. 
> 
> It would be great if your tool would create the
> Turbine XML format used 
> by ddlutils (instead of the oracle ddl)
> http://db.apache.org/ddlutils/index.html
> Then ddlutils can create DDL's for all supported
> databases (and much more).
> 
> regards,
> Armin
> 
> 
> > 
> > Regards,
> > Tom.
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> > 
> > 
> >
>
------------------------------------------------------------------------
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail:
> ojb-user-help@db.apache.org
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
> ojb-user-help@db.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Utility for "Forward engineering from repository.xml"

Posted by Armin Waibel <ar...@apache.org>.
Hi Tom,

thanks for OJB tool support.

Tom Antony wrote:
> Hi All,
> 
> Recently I started working on a project using Apache
> OJB. In the course of working on this project I
> developed a code generator tool which reads in the
> repository.xml and generates the Java bean stub source
> as well as schema definitions for tables. OJB site
> mentions that there are no tools which do "Forward
> generation from repository.xml". This is what I do
> except that the utility is written in Java and not
> XSLT. 
> 
> I am posting the sources, 

Seems the apache server "kills" your attachment.
You could open an issue in JIRA
http://issues.apache.org/jira/browse/OJB
and attach the source to this issue.


you just need to compile the
> classes and you can start using it straight away. The
> main class is RepositoryXmlProcessor (the main
> method demonstrates the usage). The DDL that gets
> generated has been tested with Oracle 9i.
> Customisations to the schema as well as native
> database types, can be accomplished by modifying the
> SQLGenerator class which handles the job of generating
> the schema. 

It would be great if your tool would create the Turbine XML format used 
by ddlutils (instead of the oracle ddl)
http://db.apache.org/ddlutils/index.html
Then ddlutils can create DDL's for all supported databases (and much more).

regards,
Armin


> 
> Regards,
> Tom.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Utility for "Forward engineering from repository.xml"

Posted by Tom Antony <to...@yahoo.com>.
Hi,

It seems the attachments have not gone through. If
interested you can get the same from 

http://www.geocities.com/tomantony/codegenerator.zip

Regards,
Tom.

--- Tom Antony <to...@yahoo.com> wrote:

> Hi All,
> 
> Recently I started working on a project using Apache
> OJB. In the course of working on this project I
> developed a code generator tool which reads in the
> repository.xml and generates the Java bean stub
> source
> as well as schema definitions for tables. OJB site
> mentions that there are no tools which do "Forward
> generation from repository.xml". This is what I do
> except that the utility is written in Java and not
> XSLT. 
> 
> I am posting the sources, you just need to compile
> the
> classes and you can start using it straight away.
> The
> main class is RepositoryXmlProcessor (the main
> method demonstrates the usage). The DDL that gets
> generated has been tested with Oracle 9i.
> Customisations to the schema as well as native
> database types, can be accomplished by modifying the
> SQLGenerator class which handles the job of
> generating
> the schema. 
> 
> Regards,
> Tom.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail:
ojb-user-help@db.apache.org


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org