cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: [JIRA] Commented: (CAY-922) Convert non-type-safe enums to Java 5 enums
Date Tue, 27 Nov 2007 09:53:16 GMT
I think converting PersistenceState to enum would result in a too  
serious breakage of backwards compatibility, so I am not so sure we  
should be changing this now. Maybe in 3.0 we just start by deprecating  
the "int" based API, and introducing enum based alternative without  
removing the old methods or changing the ivars?

Andrus


On Nov 27, 2007, at 2:49 AM, Kevin Menard wrote:

> How do you want to handle this one?  I can pitch in, but I don't  
> want to be
> duplicating work that you're already doing.  At the same time, I  
> don't want
> to put the whole thing on you.
>
> -- 
> Kevin
>
> On 11/21/07 3:38 AM, "Andrus Adamchik (JIRA)" <dev@cayenne.apache.org>
> wrote:
>
>>
>>    [
>> https://issues.apache.org/cayenne/browse/CAY-922?page=com.atlassian.jira.plugi
>> n.system.issuetabpanels:comment-tabpanel#action_12604 ]
>>
>> Andrus Adamchik commented on CAY-922:
>> -------------------------------------
>>
>> Converted lifecycle events to an enum. Hopefully with Modeler  
>> support for
>> callbacks this shouldn't cause to much trouble for the existing  
>> users.
>>
>>> Convert non-type-safe enums to Java 5 enums
>>> -------------------------------------------
>>>
>>>                Key: CAY-922
>>>                URL: https://issues.apache.org/cayenne/browse/CAY-922
>>>            Project: Cayenne
>>>         Issue Type: Task
>>>         Components: Cayenne Core Library
>>>   Affects Versions: 3.0
>>>           Reporter: Kevin Menard
>>>           Assignee: Andrus Adamchik
>>>            Fix For: 3.0
>>>
>>>
>>> There are a few of these in the codebase.  The most prominent one  
>>> that comes
>>> to mind is PersistenceState.
>>> I had messed around with this before we actually converted to Java  
>>> 5 and it's
>>> actually not all that bad.  As long as end users used the public  
>>> static
>>> fields for comparisons (instead of integers), things should  
>>> generally work.
>>> Of course, it would affect method parameters and return types as  
>>> well, but
>>> those are quite easily fixed and probably par for a pre-release  
>>> software
>>> course.
>
> -- 
> Kevin Menard
> Servprise International, Inc.
> Remote reboot & power control for network equipment
> www.servprise.com              +1 508.892.3823 x308
>
>


Mime
View raw message