You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "mrisaliti@libero.it" <mr...@libero.it> on 2008/09/25 16:26:57 UTC

Replace deprecated methods and constructors of entity delegator classes

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



Re: Replace deprecated methods and constructors of entity delegator classes

Posted by "risalitim@gmail.com" <ri...@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 risalitim@gmail.com <ri...@gmail.com>
>>
>>>
>>>
>>> Inizio messaggio inoltrato:
>>>
>>> *Da: *David E Jones <jo...@hotwaxmedia.com>
>>> *Data: *25 settembre 2008 18:36:24 GMT+02:00
>>> *A: *dev@ofbiz.apache.org
>>> *Oggetto: **Re: Replace deprecated methods and constructors of  
>>> entity
>>> delegator classes*
>>> *Rispondi a: *dev@ofbiz.apache.org
>>>
>>>
>>> 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, mrisaliti@libero.it 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
>>>
>>>
>>>
>>>
>>>
>>>
>


Re: Replace deprecated methods and constructors of entity delegator classes

Posted by David E Jones <jo...@hotwaxmedia.com>.
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 risalitim@gmail.com <ri...@gmail.com>
>
>>
>>
>> Inizio messaggio inoltrato:
>>
>> *Da: *David E Jones <jo...@hotwaxmedia.com>
>> *Data: *25 settembre 2008 18:36:24 GMT+02:00
>> *A: *dev@ofbiz.apache.org
>> *Oggetto: **Re: Replace deprecated methods and constructors of entity
>> delegator classes*
>> *Rispondi a: *dev@ofbiz.apache.org
>>
>>
>> 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, mrisaliti@libero.it 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
>>
>>
>>
>>
>>
>>


Re: Replace deprecated methods and constructors of entity delegator classes

Posted by Jacques Le Roux <ja...@les7arts.com>.
From: "Marco Risaliti" <ri...@gmail.com>
> 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 


Re: Replace deprecated methods and constructors of entity delegator classes

Posted by Marco Risaliti <ri...@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 risalitim@gmail.com <ri...@gmail.com>

>
>
> Inizio messaggio inoltrato:
>
> *Da: *David E Jones <jo...@hotwaxmedia.com>
> *Data: *25 settembre 2008 18:36:24 GMT+02:00
> *A: *dev@ofbiz.apache.org
> *Oggetto: **Re: Replace deprecated methods and constructors of entity
> delegator classes*
> *Rispondi a: *dev@ofbiz.apache.org
>
>
> 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, mrisaliti@libero.it 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
>
>
>
>
>
>

Re: Replace deprecated methods and constructors of entity delegator classes

Posted by David E Jones <jo...@hotwaxmedia.com>.
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, mrisaliti@libero.it 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
>>>
>>>


Re: Replace deprecated methods and constructors of entity delegator classes

Posted by Adrian Crum <ad...@hlmksw.com>.
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, mrisaliti@libero.it 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
>>
>>
> 
> 

Re: Replace deprecated methods and constructors of entity delegator classes

Posted by David E Jones <jo...@hotwaxmedia.com>.
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, mrisaliti@libero.it 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
>
>