Replace deprecated methods and constructors of entity delegator classes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Replace deprecated methods and constructors of entity delegator classes

mrisaliti@libero.it
Hi to all,

I have created a document in confluence (http://docs.ofbiz.org/display/OFBTECH/Replace+deprecated+methods+and+constructors+of+entity+delegator+classes) about replace all the deprecated methods and constructors of entity delegator.
I would like to start working on this conversions.
Is it exactly that we don't want to replace for example all the findByPrimaryKey methods to findOne but only some of this ?
Is it why it needs a lot of stuff to replace ?
It's seems to me that could be better also to convert this methods not actually declared as deprecated.
I'm thinking that at the end we will use only findOne and findList methods.

Let me know your thought.

Thanks in advance
Marco


Reply | Threaded
Open this post in threaded view
|

Re: Replace deprecated methods and constructors of entity delegator classes

David E Jones

The goal of the deprecation effort was to reduce the size of the  
GenericDelegator API, not to replace all old methods, some of which  
are nice to have around as they are more convenient.

Of course, others may have different opinions, so I hope to see more  
on this thread.

-David


On Sep 25, 2008, at 8:26 AM, [hidden email] wrote:

> Hi to all,
>
> I have created a document in confluence (http://docs.ofbiz.org/display/OFBTECH/Replace+deprecated+methods+and+constructors+of+entity+delegator+classes 
> ) about replace all the deprecated methods and constructors of  
> entity delegator.
> I would like to start working on this conversions.
> Is it exactly that we don't want to replace for example all the  
> findByPrimaryKey methods to findOne but only some of this ?
> Is it why it needs a lot of stuff to replace ?
> It's seems to me that could be better also to convert this methods  
> not actually declared as deprecated.
> I'm thinking that at the end we will use only findOne and findList  
> methods.
>
> Let me know your thought.
>
> Thanks in advance
> Marco
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Replace deprecated methods and constructors of entity delegator classes

Adrian Crum
If we do any deprecated code cleanup, I'd like to see it happen in the
framework first - as part of the preparation for framework release.

-Adrian

David E Jones wrote:

>
> The goal of the deprecation effort was to reduce the size of the
> GenericDelegator API, not to replace all old methods, some of which are
> nice to have around as they are more convenient.
>
> Of course, others may have different opinions, so I hope to see more on
> this thread.
>
> -David
>
>
> On Sep 25, 2008, at 8:26 AM, [hidden email] wrote:
>
>> Hi to all,
>>
>> I have created a document in confluence
>> (http://docs.ofbiz.org/display/OFBTECH/Replace+deprecated+methods+and+constructors+of+entity+delegator+classes)
>> about replace all the deprecated methods and constructors of entity
>> delegator.
>> I would like to start working on this conversions.
>> Is it exactly that we don't want to replace for example all the
>> findByPrimaryKey methods to findOne but only some of this ?
>> Is it why it needs a lot of stuff to replace ?
>> It's seems to me that could be better also to convert this methods not
>> actually declared as deprecated.
>> I'm thinking that at the end we will use only findOne and findList
>> methods.
>>
>> Let me know your thought.
>>
>> Thanks in advance
>> Marco
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Replace deprecated methods and constructors of entity delegator classes

David E Jones

The cleanup that was done before in the GenericDelegator was just  
this: cleanup (by deprecation) first in the framework and then based  
on that cleanup the apps that use those methods.

I think what Marco is proposing is deprecating more GenericDelegator  
methods than were done in the first pass. My opinion on it is that  
enough have been deprecated to accomplish the goal of simplifying the  
GenericDelegator API by leaving only flexible methods (findOne for  
example) and popular methods (certain variations of findByPrimaryKey  
for example).

-David


On Sep 25, 2008, at 10:31 AM, Adrian Crum wrote:

> If we do any deprecated code cleanup, I'd like to see it happen in  
> the framework first - as part of the preparation for framework  
> release.
>
> -Adrian
>
> David E Jones wrote:
>> The goal of the deprecation effort was to reduce the size of the  
>> GenericDelegator API, not to replace all old methods, some of which  
>> are nice to have around as they are more convenient.
>> Of course, others may have different opinions, so I hope to see  
>> more on this thread.
>> -David
>> On Sep 25, 2008, at 8:26 AM, [hidden email] wrote:
>>> Hi to all,
>>>
>>> I have created a document in confluence (http://docs.ofbiz.org/display/OFBTECH/Replace+deprecated+methods+and+constructors+of+entity+delegator+classes 
>>> ) about replace all the deprecated methods and constructors of  
>>> entity delegator.
>>> I would like to start working on this conversions.
>>> Is it exactly that we don't want to replace for example all the  
>>> findByPrimaryKey methods to findOne but only some of this ?
>>> Is it why it needs a lot of stuff to replace ?
>>> It's seems to me that could be better also to convert this methods  
>>> not actually declared as deprecated.
>>> I'm thinking that at the end we will use only findOne and findList  
>>> methods.
>>>
>>> Let me know your thought.
>>>
>>> Thanks in advance
>>> Marco
>>>
>>>

Reply | Threaded
Open this post in threaded view
|

Re: Replace deprecated methods and constructors of entity delegator classes

risalitim@gmail.com
Hi to all,

I proposed to deprecating more GenericDelegator methods but it can be done
also on the next framework release (not mandatory to be done now in the
first framework release) .

As now all the findByOr methods are deprecated and replaced by findList
method in the future we can deprecate findPrimaryKey methods to be replaced
by findOne and deprecate findByAnd methods to be replaced by findList.

At the end we will have only findOne and findList methods.

One more thing is that is not so easy to identify if a specific deprecated
method is still in use in the sources instead if we deprecate all the
methods variants it will more easier.

I would like to know if in the future framework releases we will support
only findOne and findList methods so I can work in the meantime to replace
all the findByAnd and findByPrimaryKey to the new methods.

Thanks
Marco


2008/9/25 [hidden email] <[hidden email]>

>
>
> Inizio messaggio inoltrato:
>
> *Da: *David E Jones <[hidden email]>
> *Data: *25 settembre 2008 18:36:24 GMT+02:00
> *A: *[hidden email]
> *Oggetto: **Re: Replace deprecated methods and constructors of entity
> delegator classes*
> *Rispondi a: *[hidden email]
>
>
> The cleanup that was done before in the GenericDelegator was just this:
> cleanup (by deprecation) first in the framework and then based on that
> cleanup the apps that use those methods.
>
> I think what Marco is proposing is deprecating more GenericDelegator
> methods than were done in the first pass. My opinion on it is that enough
> have been deprecated to accomplish the goal of simplifying the
> GenericDelegator API by leaving only flexible methods (findOne for example)
> and popular methods (certain variations of findByPrimaryKey for example).
>
> -David
>
>
> On Sep 25, 2008, at 10:31 AM, Adrian Crum wrote:
>
> If we do any deprecated code cleanup, I'd like to see it happen in the
> framework first - as part of the preparation for framework release.
>
>
> -Adrian
>
>
> David E Jones wrote:
>
> The goal of the deprecation effort was to reduce the size of the
> GenericDelegator API, not to replace all old methods, some of which are nice
> to have around as they are more convenient.
>
> Of course, others may have different opinions, so I hope to see more on
> this thread.
>
> -David
>
> On Sep 25, 2008, at 8:26 AM, [hidden email] wrote:
>
> Hi to all,
>
>
> I have created a document in confluence (
> http://docs.ofbiz.org/display/OFBTECH/Replace+deprecated+methods+and+constructors+of+entity+delegator+classes)
> about replace all the deprecated methods and constructors of entity
> delegator.
>
> I would like to start working on this conversions.
>
> Is it exactly that we don't want to replace for example all the
> findByPrimaryKey methods to findOne but only some of this ?
>
> Is it why it needs a lot of stuff to replace ?
>
> It's seems to me that could be better also to convert this methods not
> actually declared as deprecated.
>
> I'm thinking that at the end we will use only findOne and findList methods.
>
>
> Let me know your thought.
>
>
> Thanks in advance
>
> Marco
>
>
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Replace deprecated methods and constructors of entity delegator classes

David E Jones

Marco,

Please re-read what I wrote before, especially that part about the  
goal of these chances.

No, we don't want to get rid of the more commonly used methods like  
these variations of findByAnd and findByPrimaryKey.

-David


On Sep 26, 2008, at 1:04 AM, Marco Risaliti wrote:

> Hi to all,
>
> I proposed to deprecating more GenericDelegator methods but it can  
> be done
> also on the next framework release (not mandatory to be done now in  
> the
> first framework release) .
>
> As now all the findByOr methods are deprecated and replaced by  
> findList
> method in the future we can deprecate findPrimaryKey methods to be  
> replaced
> by findOne and deprecate findByAnd methods to be replaced by findList.
>
> At the end we will have only findOne and findList methods.
>
> One more thing is that is not so easy to identify if a specific  
> deprecated
> method is still in use in the sources instead if we deprecate all the
> methods variants it will more easier.
>
> I would like to know if in the future framework releases we will  
> support
> only findOne and findList methods so I can work in the meantime to  
> replace
> all the findByAnd and findByPrimaryKey to the new methods.
>
> Thanks
> Marco
>
>
> 2008/9/25 [hidden email] <[hidden email]>
>
>>
>>
>> Inizio messaggio inoltrato:
>>
>> *Da: *David E Jones <[hidden email]>
>> *Data: *25 settembre 2008 18:36:24 GMT+02:00
>> *A: *[hidden email]
>> *Oggetto: **Re: Replace deprecated methods and constructors of entity
>> delegator classes*
>> *Rispondi a: *[hidden email]
>>
>>
>> The cleanup that was done before in the GenericDelegator was just  
>> this:
>> cleanup (by deprecation) first in the framework and then based on  
>> that
>> cleanup the apps that use those methods.
>>
>> I think what Marco is proposing is deprecating more GenericDelegator
>> methods than were done in the first pass. My opinion on it is that  
>> enough
>> have been deprecated to accomplish the goal of simplifying the
>> GenericDelegator API by leaving only flexible methods (findOne for  
>> example)
>> and popular methods (certain variations of findByPrimaryKey for  
>> example).
>>
>> -David
>>
>>
>> On Sep 25, 2008, at 10:31 AM, Adrian Crum wrote:
>>
>> If we do any deprecated code cleanup, I'd like to see it happen in  
>> the
>> framework first - as part of the preparation for framework release.
>>
>>
>> -Adrian
>>
>>
>> David E Jones wrote:
>>
>> The goal of the deprecation effort was to reduce the size of the
>> GenericDelegator API, not to replace all old methods, some of which  
>> are nice
>> to have around as they are more convenient.
>>
>> Of course, others may have different opinions, so I hope to see  
>> more on
>> this thread.
>>
>> -David
>>
>> On Sep 25, 2008, at 8:26 AM, [hidden email] wrote:
>>
>> Hi to all,
>>
>>
>> I have created a document in confluence (
>> http://docs.ofbiz.org/display/OFBTECH/Replace+deprecated+methods+and+constructors+of+entity+delegator+classes)
>> about replace all the deprecated methods and constructors of entity
>> delegator.
>>
>> I would like to start working on this conversions.
>>
>> Is it exactly that we don't want to replace for example all the
>> findByPrimaryKey methods to findOne but only some of this ?
>>
>> Is it why it needs a lot of stuff to replace ?
>>
>> It's seems to me that could be better also to convert this methods  
>> not
>> actually declared as deprecated.
>>
>> I'm thinking that at the end we will use only findOne and findList  
>> methods.
>>
>>
>> Let me know your thought.
>>
>>
>> Thanks in advance
>>
>> Marco
>>
>>
>>
>>
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Replace deprecated methods and constructors of entity delegator classes

risalitim@gmail.com
Ok, no problem I will untouched it.

Thanks
Marco

Il giorno 27/set/08, alle ore 05:12, David E Jones ha scritto:

>
> Marco,
>
> Please re-read what I wrote before, especially that part about the  
> goal of these chances.
>
> No, we don't want to get rid of the more commonly used methods like  
> these variations of findByAnd and findByPrimaryKey.
>
> -David
>
>
> On Sep 26, 2008, at 1:04 AM, Marco Risaliti wrote:
>
>> Hi to all,
>>
>> I proposed to deprecating more GenericDelegator methods but it can  
>> be done
>> also on the next framework release (not mandatory to be done now in  
>> the
>> first framework release) .
>>
>> As now all the findByOr methods are deprecated and replaced by  
>> findList
>> method in the future we can deprecate findPrimaryKey methods to be  
>> replaced
>> by findOne and deprecate findByAnd methods to be replaced by  
>> findList.
>>
>> At the end we will have only findOne and findList methods.
>>
>> One more thing is that is not so easy to identify if a specific  
>> deprecated
>> method is still in use in the sources instead if we deprecate all the
>> methods variants it will more easier.
>>
>> I would like to know if in the future framework releases we will  
>> support
>> only findOne and findList methods so I can work in the meantime to  
>> replace
>> all the findByAnd and findByPrimaryKey to the new methods.
>>
>> Thanks
>> Marco
>>
>>
>> 2008/9/25 [hidden email] <[hidden email]>
>>
>>>
>>>
>>> Inizio messaggio inoltrato:
>>>
>>> *Da: *David E Jones <[hidden email]>
>>> *Data: *25 settembre 2008 18:36:24 GMT+02:00
>>> *A: *[hidden email]
>>> *Oggetto: **Re: Replace deprecated methods and constructors of  
>>> entity
>>> delegator classes*
>>> *Rispondi a: *[hidden email]
>>>
>>>
>>> The cleanup that was done before in the GenericDelegator was just  
>>> this:
>>> cleanup (by deprecation) first in the framework and then based on  
>>> that
>>> cleanup the apps that use those methods.
>>>
>>> I think what Marco is proposing is deprecating more GenericDelegator
>>> methods than were done in the first pass. My opinion on it is that  
>>> enough
>>> have been deprecated to accomplish the goal of simplifying the
>>> GenericDelegator API by leaving only flexible methods (findOne for  
>>> example)
>>> and popular methods (certain variations of findByPrimaryKey for  
>>> example).
>>>
>>> -David
>>>
>>>
>>> On Sep 25, 2008, at 10:31 AM, Adrian Crum wrote:
>>>
>>> If we do any deprecated code cleanup, I'd like to see it happen in  
>>> the
>>> framework first - as part of the preparation for framework release.
>>>
>>>
>>> -Adrian
>>>
>>>
>>> David E Jones wrote:
>>>
>>> The goal of the deprecation effort was to reduce the size of the
>>> GenericDelegator API, not to replace all old methods, some of  
>>> which are nice
>>> to have around as they are more convenient.
>>>
>>> Of course, others may have different opinions, so I hope to see  
>>> more on
>>> this thread.
>>>
>>> -David
>>>
>>> On Sep 25, 2008, at 8:26 AM, [hidden email] wrote:
>>>
>>> Hi to all,
>>>
>>>
>>> I have created a document in confluence (
>>> http://docs.ofbiz.org/display/OFBTECH/Replace+deprecated+methods+and+constructors+of+entity+delegator+classes)
>>> about replace all the deprecated methods and constructors of entity
>>> delegator.
>>>
>>> I would like to start working on this conversions.
>>>
>>> Is it exactly that we don't want to replace for example all the
>>> findByPrimaryKey methods to findOne but only some of this ?
>>>
>>> Is it why it needs a lot of stuff to replace ?
>>>
>>> It's seems to me that could be better also to convert this methods  
>>> not
>>> actually declared as deprecated.
>>>
>>> I'm thinking that at the end we will use only findOne and findList  
>>> methods.
>>>
>>>
>>> Let me know your thought.
>>>
>>>
>>> Thanks in advance
>>>
>>> Marco
>>>
>>>
>>>
>>>
>>>
>>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Replace deprecated methods and constructors of entity delegator classes

Jacques Le Roux
Administrator
In reply to this post by risalitim@gmail.com
From: "Marco Risaliti" <[hidden email]>
> One more thing is that is not so easy to identify if a specific deprecated
> method is still in use in the sources instead if we deprecate all the
> methods variants it will more easier.

Maybe we could solve this concern by removing all deprecated methods which are now not in use (replaced) ?
I know this is not the definition of deprecated, and of course this could not be appreciated by people still using them (when
upgrading).
But with some advices in code (mostly already existing I presume) is it really a tough work ?

Jacques