One more thing, would it be possible to make in the future, RowHandler decide if the processing of resultset should be continued? In my case, I use it to grab a range of objects, after the last is taken, no more processing is needed or it would crash groupby feature? Regards Michal Malecki ----- Original Message ----- From: "Michal Malecki" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, August 04, 2005 4:13 PM Subject: Re: queryForList with skip max and groupBy feature
> Ok, so I'll use ResultHandler > great request for developers - please make javadoc for queryForList more > precise! > > Michal Malecki > Subject: RE: queryForList with skip max and groupBy feature > > > i had a look at the src and it is not objects.. It sets the skip on the > resultset... > > ________________________________ > > From: Michal Malecki [mailto:[EMAIL PROTECTED] > Sent: Thu 04/08/2005 15:04 > To: [email protected] > Subject: Re: queryForList with skip max and groupBy feature > > > > This is precisely what I was asking for - are the parameters "max" and > "skip" in the queryForList concerning number of rows or objects. If rows - I > understand that I must use ResultHandler; but IMHO it's not clearly written > in the doc what are these two parameters > > Michal Malecki > Subject: RE: queryForList with skip max and groupBy feature > > > At a guess i would say dont use this way as it would be hard to predict the > number of rows due to the joins unless this is a constant of course.. > > How are you calculating the number of row to return as you have a join a > left join at that... Due to the joins you will get more than one row per > object... > > Steve.. > > ________________________________ > > From: Michal Malecki [mailto:[EMAIL PROTECTED] > Sent: Thu 04/08/2005 14:33 > To: [email protected] > Subject: Re: queryForList with skip max and groupBy feature > > > > part of sql is: > select ls_name,le_id,le_level,le_message,le_location,le_logger, > le_thread,le_throwable,le_timestamp,le_ndc,lk_name,lea_value > from log_sources, log_events > LEFT OUTER JOIN log_event_attributes on (lea_event = le_id) > LEFT OUTER JOIN log_keys ON (lk_id = lea_key) > where ls_id = le_source > ..... > First I had Limit #limit# Offset #offset# at the end of sql, > now I have > List result = session.queryForList("selectEvents", new ListHolder( > conditions, limit, offset), offset, > limit ); > in the code > limit and offset from ListHolder is not used > lk_name,lea_value in the sql is used to create list of KeyValue objects > Regards > > Michal Malecki > ----- Original Message ----- > From: "James, Steven" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Thursday, August 04, 2005 3:24 PM > Subject: RE: queryForList with skip max and groupBy feature > > > i meant number of objects returned... Caqn u also post the sql.. > Cheers, > > Steve > > ________________________________ > > From: Michal Malecki [mailto:[EMAIL PROTECTED] > Sent: Thu 04/08/2005 14:15 > To: [email protected] > Subject: Re: queryForList with skip max and groupBy feature > > > > as far as i am aware there is no such feature so send some more details ie > the xml file with query? > > About which feature are you talking about? > groupby: > <resultMap class="LoggingBean" id="LoggingBeansMap" groupBy="id"> > <result property="id" column="le_id"/> > <result property="level" column="le_level"/> > <result property="location" column="le_location"/> > <result property="logger" column="le_logger"/> > <result property="timestamp" column="le_timestamp" jdbcType="TIMESTAMP" > typeHandler="pl.psnc.progress.szdmon.database.TimestampHandler"/> > <result property="mdc" resultMap="KeyValueMap"/> > </resultMap> > > <resultMap class="KeyValue" id="KeyValueMap"> > <result property="key" column="lk_name"/> > <result property="value" column="lea_value"/> > </resultMap> > > regards > Michal Malecki > Dzial Uslug Sieciowych > > > > > > > > This e-mail and any attachment is for authorised use by the intended > recipient(s) only. It may contain proprietary material, confidential > information and/or be subject to legal privilege. It should not be copied, > disclosed to, retained or used by, any other party. If you are not an > intended recipient then please promptly delete this e-mail and any > attachment and all copies and inform the sender. Thank you. > > > > > > > > > >
