Re: [Spacewalk-devel] dto's from the database?

2012-04-16 Thread Tomas Lestach
On Friday 13 of April 2012 17:28:05 Duncan Mac-Vicar P. wrote: > On 04/13/2012 02:30 PM, Tomas Lestach wrote: > > A separate query for a single system would definitelly be more efficient. > > Looking at what you pointed out in IRC: what happens if the errata is > applied on the client side. So I m

Re: [Spacewalk-devel] dto's from the database?

2012-04-13 Thread Duncan Mac-Vicar P.
On 04/13/2012 02:30 PM, Tomas Lestach wrote: A separate query for a single system would definitelly be more efficient. Looking at what you pointed out in IRC: what happens if the errata is applied on the client side. So I modified them to look at the package install time instead: For the sy

Re: [Spacewalk-devel] dto's from the database?

2012-04-13 Thread Tomas Lestach
On Friday 13 of April 2012 12:29:40 Duncan Mac-Vicar P. wrote: > On 04/12/2012 02:46 PM, Tomas Lestach wrote: > > - please rename one of the > > having_errata_with_keyword_applied_since_last_reboot query or mode - not > > to > > have the same name > > > >- even if it does not cause any trouble

Re: [Spacewalk-devel] dto's from the database?

2012-04-13 Thread Duncan Mac-Vicar P.
On 04/12/2012 02:46 PM, Tomas Lestach wrote: - please rename one of the having_errata_with_keyword_applied_since_last_reboot query or mode - not to have the same name - even if it does not cause any troubles, it's better for later greps :-) Ok. Originally I named them differently, then looki

Re: [Spacewalk-devel] dto's from the database?

2012-04-12 Thread Tomas Lestach
On Thursday 12 of April 2012 11:32:05 Duncan Mac-Vicar P. wrote: On 04/11/2012 11:00 AM, Tomas Lestach wrote: This is ok, because it's not used in the elaborator. Regards, Ok, here is a patch for review for the first part: adding a list of systems that need review, and showing a notification in

Re: [Spacewalk-devel] dto's from the database?

2012-04-12 Thread Duncan Mac-Vicar P.
On 04/11/2012 11:00 AM, Tomas Lestach wrote: This is ok, because it's not used in the elaborator. Regards, Ok, here is a patch for review for the first part: adding a list of systems that need review, and showing a notification in the system detail that it needs reboot with a link to the acti

Re: [Spacewalk-devel] dto's from the database?

2012-04-11 Thread Tomas Lestach
On Wednesday 11 of April 2012 10:56:04 Duncan Mac-Vicar P. wrote: > On 04/06/2012 10:54 AM, Tomas Lestach wrote: > >>> Hmm, this isn't suitable for one system (if I understood it correctly), > >>> because you make a query, where you get all the systems having the > >>> specific > >>> errata keyword

Re: [Spacewalk-devel] dto's from the database?

2012-04-11 Thread Duncan Mac-Vicar P.
On 04/06/2012 10:54 AM, Tomas Lestach wrote: Hmm, this isn't suitable for one system (if I understood it correctly), because you make a query, where you get all the systems having the specific errata keyword and then you just elaborate a "1" for one single system (without setting it anywhere)? Th

Re: [Spacewalk-devel] dto's from the database?

2012-04-06 Thread Tomas Lestach
> > Hmm, this isn't suitable for one system (if I understood it correctly), > > because you make a query, where you get all the systems having the > > specific > > errata keyword and then you just elaborate a "1" for one single system > > (without setting it anywhere)? This doesn't seem to be corre

Re: [Spacewalk-devel] dto's from the database?

2012-04-05 Thread Duncan Mac-Vicar P.
On 04/05/2012 12:14 PM, Tomas Lestach wrote: yes, this shall work. However, I'd much better see something like: ... (SELECT EK.errata_id FROM rhnErrataKeyword EK WHERE EK.keyword = :keyword) ... to have it more generic and prepared for possible reuse with other keywords Thanks, I will try to r

Re: [Spacewalk-devel] dto's from the database?

2012-04-05 Thread Tomas Lestach
On Wednesday 04 of April 2012 16:37:39 Duncan Mac-Vicar P. wrote: > On 04/04/2012 11:48 AM, Tomas Lestach wrote: > > An elaborator is an additional query, that fetches additional information > > from the DB for a DTO object (may have additional parameters). It's > > always run with a main query. It

Re: [Spacewalk-devel] dto's from the database?

2012-04-04 Thread Duncan Mac-Vicar P.
On 04/04/2012 11:48 AM, Tomas Lestach wrote: An elaborator is an additional query, that fetches additional information from the DB for a DTO object (may have additional parameters). It's always run with a main query. It may be associated only with those queries, where the additional information i

Re: [Spacewalk-devel] dto's from the database?

2012-04-04 Thread Tomas Lestach
On Monday 02 of April 2012 15:07:24 Duncan Mac-Vicar P. wrote: > On 04/02/2012 11:14 AM, Duncan Mac-Vicar P. wrote: > > Hi guys, > > > > I was trying to add a small icon in one errata page, showing if an > > errata requires a reboot later. > > Ok, I am getting more familiar with the DataSource an

Re: [Spacewalk-devel] dto's from the database?

2012-04-02 Thread Duncan Mac-Vicar P.
On 04/02/2012 11:14 AM, Duncan Mac-Vicar P. wrote: Hi guys, I was trying to add a small icon in one errata page, showing if an errata requires a reboot later. Ok, I am getting more familiar with the DataSource and SelectMode stuff (what a framework you have in there :-) ) One possible solu

[Spacewalk-devel] dto's from the database?

2012-04-02 Thread Duncan Mac-Vicar P.
Hi guys, I was trying to add a small icon in one errata page, showing if an errata requires a reboot later. After modifying the jsp file and adding a method isRebootSuggested to errata and implementing it in PublishedErrata as hasKeyword("reboot_suggested") (we set that keyword from reposyn