empire-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Venditti <benni...@web.de>
Subject Empire-db code generator | 1st patch
Date Mon, 26 Oct 2009 21:17:34 GMT
Hi there,

i have crated a eclipse-patch that contains the codegenerator with very 
basic functionality.
I have taken care of multi-column primary keys, the connection stuff as 
well as the unclosed ResultSets.

The generator is quit basic at the moment and the following will not work:
    - column specific getters/setters on specific records
    - nested table generation within the database
    - relation mapping (foreign key dependencies)
    - locking columns
    - views
    - name prefix for tables, views
    - configuration of schemaPattern, catalogName, tablePattern, this is 
hardcoded at the moment with (null, null, null) see "// TODO 01" in the 
sourcecode.

A additional configuration option was added named "outputFolder" this is 
the folder where the generated sourcode will be stored.

I'd be happy if anyone could have a look at it.

Regards
    Benjamin

Rainer Döbele schrieb:
> Hi Benni,
>
> yes I would be grateful if you could do that.
> We just have to make sure that we don't work on the same subject.
>
> The first goal should be to create a connection and generate the database and table classes.
> Thomas is using a BasicDataSource for connection pooling.
> However I don't think we need to do that. I'd rather have a simple JDBC connection like
the one we use in our samples.
>
> Further we need to find a solution for detecting the primary key column.
> We cannot assume the primary key is always a single column with the same name throughout
the db.
>
> What I also found is that ResultSets obtained for reading meta data are not always closed.
> e.g. ResultSet tables = dbMeta.getTables(...)
> should be closed in a finally block.
>
> Rather than trying to get over as much code as possible we should carefully rethink how
we can improve the overall architecture and do several small steps instead of one big one.
I am convinced this will lead to a better solution.
>
> So please let me know until when you think you can come up with the first classes to
integrate.
>
> Regards
> Rainer
>
>
> benniven@web.de wrote:
>   
>> Re: Starting with Empire-db code generator
>>
>> Hi,
>>
>> I had a look at the classes rainer provided in the repository and at
>> those of thomas. I think we can reuse a large part of thomas' code,
>> however we'll have to rewrite some things like the table generation
>> part
>> and remove some things like configuration and connection stuff (rainer
>> already provided that in the repo).
>>
>> So my suggestion is to migrate thomas' code with its functionality and
>> behavior as it is for now and adapt/rewrite it in the next steps to our
>> needs. Please let me know what you think. I'd be happy to start with
>> the
>> migration soon.
>>
>> Regards
>>     Benjamin
>>
>> Rainer Döbele schrieb:
>>     
>>> Hi,
>>>
>>> I will have a look at it this weekend.
>>> I am sorry, but I have just been very very busy recently.
>>>
>>> Regards
>>> Rainer
>>>
>>>
>>> Francis De Brabandere wrote:
>>>
>>>       
>>>> Re: Starting with Empire-db code generator
>>>>
>>>> What should be done to get this going?
>>>>
>>>> On Thu, Oct 15, 2009 at 1:09 PM, Martijn Dashorst
>>>> <martijn.dashorst@gmail.com> wrote:
>>>>
>>>>         
>>>>> On Mon, Oct 12, 2009 at 9:28 AM, Rainer Döbele <doebele@esteam.de>
>>>>>
>>>>>           
>>>> wrote:
>>>>
>>>>         
>>>>>> the current code is IMO not flexible enough and even more
>>>>>>             
>> important
>>     
>>>> it is Thomas' code and I see legal problems in just copying the
>>>>         
>> code.
>>     
>>>>> As long as Thomas has signed a CLA, wrote the code, and is allowed
>>>>>           
>> to
>>     
>>>>> license it to the ASF, there are no legal problems in copying the
>>>>> code.
>>>>>
>>>>> Martijn
>>>>>
>>>>>
>>>>>           
>>>> --
>>>> http://www.somatik.be
>>>> Microsoft gives you windows, Linux gives you the whole house.
>>>>
>>>>         
>
>   


Mime
View raw message