You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "SuichII, Christopher" <Ch...@netapp.com> on 2013/10/04 19:29:52 UTC

[PROPOSAL] Remove Setters from *JoinVO

*JoinVOs are used to store entries from MySQL views, which are not editable. I think removing setters from the *JoinVOs may help avoid some potential confusion as setters seem to imply that the fields are editable, which they really aren't.

I started looking around and it looks like most setters in *JoinVOs aren't actually used since the creation of *VOs is handled by java reflection. Please let me know if this is not the case or if I'm misunderstanding the way the MySQL views work.

-Chris
-- 
Chris Suich
chris.suich@netapp.com
NetApp Software Engineer
Data Center Platforms – Cloud Solutions
Citrix, Cisco & Red Hat


Re: [PROPOSAL] Remove Setters from *JoinVO

Posted by Chiradeep Vittal <Ch...@citrix.com>.
If there's no compile errors then it should not require any tests.

On 10/10/13 8:02 AM, "SuichII, Christopher" <Ch...@netapp.com> wrote:

>I went ahead and removed all setters from *JoinVOs this morning and
>played around in my environment. There were no compile errors since
>nobody called those setters, everything seems to be working just fine and
>there aren't any errors in any of the logs.
>
>Does anyone have any suggestions on how to properly test this? I can't
>imagine we're using Java reflection somewhere to actually invoke the
>setter for a given field. Other than that, with no compile errors, I
>don't see this causing any issues.
>
>-Chris
>-- 
>Chris Suich
>chris.suich@netapp.com
>NetApp Software Engineer
>Data Center Platforms ­ Cloud Solutions
>Citrix, Cisco & Red Hat
>
>On Oct 10, 2013, at 1:40 AM, Koushik Das <ko...@citrix.com> wrote:
>
>> Views are meant to be read only. So +1 for removing setters.
>> 
>> On 04-Oct-2013, at 10:59 PM, "SuichII, Christopher"
>><Ch...@netapp.com> wrote:
>> 
>>> *JoinVOs are used to store entries from MySQL views, which are not
>>>editable. I think removing setters from the *JoinVOs may help avoid
>>>some potential confusion as setters seem to imply that the fields are
>>>editable, which they really aren't.
>>> 
>>> I started looking around and it looks like most setters in *JoinVOs
>>>aren't actually used since the creation of *VOs is handled by java
>>>reflection. Please let me know if this is not the case or if I'm
>>>misunderstanding the way the MySQL views work.
>>> 
>>> -Chris
>>> -- 
>>> Chris Suich
>>> chris.suich@netapp.com
>>> NetApp Software Engineer
>>> Data Center Platforms ­ Cloud Solutions
>>> Citrix, Cisco & Red Hat
>>> 
>> 
>


Re: [PROPOSAL] Remove Setters from *JoinVO

Posted by "SuichII, Christopher" <Ch...@netapp.com>.
I went ahead and removed all setters from *JoinVOs this morning and played around in my environment. There were no compile errors since nobody called those setters, everything seems to be working just fine and there aren't any errors in any of the logs.

Does anyone have any suggestions on how to properly test this? I can't imagine we're using Java reflection somewhere to actually invoke the setter for a given field. Other than that, with no compile errors, I don't see this causing any issues.

-Chris
-- 
Chris Suich
chris.suich@netapp.com
NetApp Software Engineer
Data Center Platforms – Cloud Solutions
Citrix, Cisco & Red Hat

On Oct 10, 2013, at 1:40 AM, Koushik Das <ko...@citrix.com> wrote:

> Views are meant to be read only. So +1 for removing setters.
> 
> On 04-Oct-2013, at 10:59 PM, "SuichII, Christopher" <Ch...@netapp.com> wrote:
> 
>> *JoinVOs are used to store entries from MySQL views, which are not editable. I think removing setters from the *JoinVOs may help avoid some potential confusion as setters seem to imply that the fields are editable, which they really aren't.
>> 
>> I started looking around and it looks like most setters in *JoinVOs aren't actually used since the creation of *VOs is handled by java reflection. Please let me know if this is not the case or if I'm misunderstanding the way the MySQL views work.
>> 
>> -Chris
>> -- 
>> Chris Suich
>> chris.suich@netapp.com
>> NetApp Software Engineer
>> Data Center Platforms – Cloud Solutions
>> Citrix, Cisco & Red Hat
>> 
> 


Re: [PROPOSAL] Remove Setters from *JoinVO

Posted by Koushik Das <ko...@citrix.com>.
Views are meant to be read only. So +1 for removing setters.

On 04-Oct-2013, at 10:59 PM, "SuichII, Christopher" <Ch...@netapp.com> wrote:

> *JoinVOs are used to store entries from MySQL views, which are not editable. I think removing setters from the *JoinVOs may help avoid some potential confusion as setters seem to imply that the fields are editable, which they really aren't.
> 
> I started looking around and it looks like most setters in *JoinVOs aren't actually used since the creation of *VOs is handled by java reflection. Please let me know if this is not the case or if I'm misunderstanding the way the MySQL views work.
> 
> -Chris
> -- 
> Chris Suich
> chris.suich@netapp.com
> NetApp Software Engineer
> Data Center Platforms – Cloud Solutions
> Citrix, Cisco & Red Hat
> 


Re: [PROPOSAL] Remove Setters from *JoinVO

Posted by Mike Tutkowski <mi...@solidfire.com>.
Yeah, I agree with you, Chris. I think these setters should be removed.


On Wed, Oct 9, 2013 at 1:33 PM, Daan Hoogland <da...@gmail.com>wrote:

> Chris,
>
> Since I see no objections, why don't you test your idea and submit a patch?
>
> regards,
> Daan
>
> On Fri, Oct 4, 2013 at 7:29 PM, SuichII, Christopher
> <Ch...@netapp.com> wrote:
> > *JoinVOs are used to store entries from MySQL views, which are not
> editable. I think removing setters from the *JoinVOs may help avoid some
> potential confusion as setters seem to imply that the fields are editable,
> which they really aren't.
> >
> > I started looking around and it looks like most setters in *JoinVOs
> aren't actually used since the creation of *VOs is handled by java
> reflection. Please let me know if this is not the case or if I'm
> misunderstanding the way the MySQL views work.
> >
> > -Chris
> > --
> > Chris Suich
> > chris.suich@netapp.com
> > NetApp Software Engineer
> > Data Center Platforms – Cloud Solutions
> > Citrix, Cisco & Red Hat
> >
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the
cloud<http://solidfire.com/solution/overview/?video=play>
*™*

Re: [PROPOSAL] Remove Setters from *JoinVO

Posted by Daan Hoogland <da...@gmail.com>.
Chris,

Since I see no objections, why don't you test your idea and submit a patch?

regards,
Daan

On Fri, Oct 4, 2013 at 7:29 PM, SuichII, Christopher
<Ch...@netapp.com> wrote:
> *JoinVOs are used to store entries from MySQL views, which are not editable. I think removing setters from the *JoinVOs may help avoid some potential confusion as setters seem to imply that the fields are editable, which they really aren't.
>
> I started looking around and it looks like most setters in *JoinVOs aren't actually used since the creation of *VOs is handled by java reflection. Please let me know if this is not the case or if I'm misunderstanding the way the MySQL views work.
>
> -Chris
> --
> Chris Suich
> chris.suich@netapp.com
> NetApp Software Engineer
> Data Center Platforms – Cloud Solutions
> Citrix, Cisco & Red Hat
>

Re: [PROPOSAL] Remove Setters from *JoinVO

Posted by Min Chen <mi...@citrix.com>.
+1 on this. As Chris mentioned, the intention of *JoinVOs are
representation of MySQL views, which should not be editable after search.

-min

On 10/4/13 10:29 AM, "SuichII, Christopher" <Ch...@netapp.com> wrote:

>*JoinVOs are used to store entries from MySQL views, which are not
>editable. I think removing setters from the *JoinVOs may help avoid some
>potential confusion as setters seem to imply that the fields are
>editable, which they really aren't.
>
>I started looking around and it looks like most setters in *JoinVOs
>aren't actually used since the creation of *VOs is handled by java
>reflection. Please let me know if this is not the case or if I'm
>misunderstanding the way the MySQL views work.
>
>-Chris
>-- 
>Chris Suich
>chris.suich@netapp.com
>NetApp Software Engineer
>Data Center Platforms ­ Cloud Solutions
>Citrix, Cisco & Red Hat
>