Re: Pagination by objects

2009-07-27 Thread John Seer

You could start with the documentation...or even just your IDE code
completion... :-)

Look up the queryForList  method signatures..

queryForList  is taking start row number and end row number. 
For example if I have temp table with 200k rows which was build using left
joins, and if I will ask return from 0, 1000 it will return 6 Objects the
6th object will not be complete because the rest of the data is in rows from
1001-1300

Example of the table

ROW   ID AB C  D  E F
11  null null  0  0  0 0
21  null null  0  0  0 1
31  null null  0  0  1 0
41  null null  0  0  1 1
51  null null  0  1  0 0
61  null null  0  1  0 1
71  null null  0  1  1 0
81  null null  1  1  0 0
92  null null  0  0  0 0
10  2  null null  0  0  0 1
11  2  null null  0  0  1 0
12  2  null null  0  0  1 1
13  2  null null  0  1  0 0
14  2  null null  0  1  0 1
15  2  null null  0  1  1 0
16  2  null null  1  1  0 0

If I will ask to get from
queryForList(get, 0,10)

I will get 2 Objects but second object will not be complete 



Clinton Begin wrote:
 
 You could start with the documentation...or even just your IDE code
 completion... :-)
 
 Look up the queryForList  method signatures..
 
 Clinton
 
 On Fri, Jul 24, 2009 at 4:39 PM, John Seer pulsph...@yahoo.com wrote:
 

 Hello,

 I am using in one of my projects ibatis and have a problem with
 pagination.

 For example I want to select 100 objects at a time and skip first 100 of
 them. I didn't find any good way of doing it and nothing exciting about
 scrolling too.


 Any suggestion how to achieve/solve my problem?


 Thanks
 John

 --
 View this message in context:
 http://www.nabble.com/Pagination-by-objects-tp24652955p24652955.html
 Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
 For additional commands, e-mail: user-java-h...@ibatis.apache.org


 
 

The 

-- 
View this message in context: 
http://www.nabble.com/Pagination-by-objects-tp24652955p24685472.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org



Re: Pagination by objects

2009-07-27 Thread Larry Meadors
I'll put this as nicely as I can: What the heck are you talking about?

Larry

-
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org



Re: Pagination by objects

2009-07-27 Thread John Seer

The heck I am talking about is that this shit doesn't work for me



Larry Meadors wrote:
 
 I'll put this as nicely as I can: What the heck are you talking about?
 
 Larry
 
 -
 To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
 For additional commands, e-mail: user-java-h...@ibatis.apache.org
 
 
 



-- 
View this message in context: 
http://www.nabble.com/Pagination-by-objects-tp24652955p24685867.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org



Re: Pagination by objects

2009-07-27 Thread Clinton Begin
Ah, I know what you're talking about.
There's no way to solve that, other than to load less data, or load each
object up separately.  If I'm not mistaken, not even a full ORM will be able
to do that without first building the entire map of keyed relationships.

For example, an ORM could look up all of the unique primary key values,
select the first 1000 out of 200,000, then generate an IN clause and add it
to the join.

You could do the same with iBATIS, but you have to do it manually.

Clinton

On Mon, Jul 27, 2009 at 12:00 PM, John Seer pulsph...@yahoo.com wrote:


 You could start with the documentation...or even just your IDE code
 completion... :-)

 Look up the queryForList  method signatures..

 queryForList  is taking start row number and end row number.
 For example if I have temp table with 200k rows which was build using left
 joins, and if I will ask return from 0, 1000 it will return 6 Objects the
 6th object will not be complete because the rest of the data is in rows
 from
 1001-1300

 Example of the table

 ROW   ID AB C  D  E F
 11  null null  0  0  0 0
 21  null null  0  0  0 1
 31  null null  0  0  1 0
 41  null null  0  0  1 1
 51  null null  0  1  0 0
 61  null null  0  1  0 1
 71  null null  0  1  1 0
 81  null null  1  1  0 0
 92  null null  0  0  0 0
 10  2  null null  0  0  0 1
 11  2  null null  0  0  1 0
 12  2  null null  0  0  1 1
 13  2  null null  0  1  0 0
 14  2  null null  0  1  0 1
 15  2  null null  0  1  1 0
 16  2  null null  1  1  0 0

 If I will ask to get from
 queryForList(get, 0,10)

 I will get 2 Objects but second object will not be complete



 Clinton Begin wrote:
 
  You could start with the documentation...or even just your IDE code
  completion... :-)
 
  Look up the queryForList  method signatures..
 
  Clinton
 
  On Fri, Jul 24, 2009 at 4:39 PM, John Seer pulsph...@yahoo.com wrote:
 
 
  Hello,
 
  I am using in one of my projects ibatis and have a problem with
  pagination.
 
  For example I want to select 100 objects at a time and skip first 100 of
  them. I didn't find any good way of doing it and nothing exciting about
  scrolling too.
 
 
  Any suggestion how to achieve/solve my problem?
 
 
  Thanks
  John
 
  --
  View this message in context:
  http://www.nabble.com/Pagination-by-objects-tp24652955p24652955.html
  Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
  For additional commands, e-mail: user-java-h...@ibatis.apache.org
 
 
 
 

 The

 --
 View this message in context:
 http://www.nabble.com/Pagination-by-objects-tp24652955p24685472.html
 Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
 For additional commands, e-mail: user-java-h...@ibatis.apache.org




Re: Pagination by objects

2009-07-27 Thread Clinton Begin
Larry,
He's doing a join, so each result object is made up of possibly many rows.
 So simply skipping arbitrary rows will create incomplete objects.

Clinton

On Mon, Jul 27, 2009 at 12:12 PM, Larry Meadors larry.mead...@gmail.comwrote:

 I'll put this as nicely as I can: What the heck are you talking about?

 Larry

 -
 To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
 For additional commands, e-mail: user-java-h...@ibatis.apache.org




Re: Pagination by objects

2009-07-27 Thread Sundar Sankar
or you could select * from (select rownum as ro, * from XXXView) where ro
between 1 and 1000.

If you had rownum as part of your view, I guess you could use that as the ID
and Ibatis queryForList might work too.

On Mon, Jul 27, 2009 at 11:30 AM, Clinton Begin clinton.be...@gmail.comwrote:

 Larry,
 He's doing a join, so each result object is made up of possibly many rows.
  So simply skipping arbitrary rows will create incomplete objects.

 Clinton


 On Mon, Jul 27, 2009 at 12:12 PM, Larry Meadors 
 larry.mead...@gmail.comwrote:

 I'll put this as nicely as I can: What the heck are you talking about?

 Larry

 -
 To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
 For additional commands, e-mail: user-java-h...@ibatis.apache.org





-- 
Regards
Sundar S.


Re: Pagination by objects

2009-07-27 Thread John Seer

Thanks Clinton, 
I was thinking doing it with IN, but I thinking creating temp table with ids
and doing pagination on it will work faster




Clinton Begin wrote:
 
 Ah, I know what you're talking about.
 There's no way to solve that, other than to load less data, or load each
 object up separately.  If I'm not mistaken, not even a full ORM will be
 able
 to do that without first building the entire map of keyed relationships.
 
 For example, an ORM could look up all of the unique primary key values,
 select the first 1000 out of 200,000, then generate an IN clause and add
 it
 to the join.
 
 You could do the same with iBATIS, but you have to do it manually.
 
 Clinton
 
 On Mon, Jul 27, 2009 at 12:00 PM, John Seer pulsph...@yahoo.com wrote:
 

 You could start with the documentation...or even just your IDE code
 completion... :-)

 Look up the queryForList  method signatures..

 queryForList  is taking start row number and end row number.
 For example if I have temp table with 200k rows which was build using
 left
 joins, and if I will ask return from 0, 1000 it will return 6 Objects the
 6th object will not be complete because the rest of the data is in rows
 from
 1001-1300

 Example of the table

 ROW   ID AB C  D  E F
 11  null null  0  0  0 0
 21  null null  0  0  0 1
 31  null null  0  0  1 0
 41  null null  0  0  1 1
 51  null null  0  1  0 0
 61  null null  0  1  0 1
 71  null null  0  1  1 0
 81  null null  1  1  0 0
 92  null null  0  0  0 0
 10  2  null null  0  0  0 1
 11  2  null null  0  0  1 0
 12  2  null null  0  0  1 1
 13  2  null null  0  1  0 0
 14  2  null null  0  1  0 1
 15  2  null null  0  1  1 0
 16  2  null null  1  1  0 0

 If I will ask to get from
 queryForList(get, 0,10)

 I will get 2 Objects but second object will not be complete



 Clinton Begin wrote:
 
  You could start with the documentation...or even just your IDE code
  completion... :-)
 
  Look up the queryForList  method signatures..
 
  Clinton
 
  On Fri, Jul 24, 2009 at 4:39 PM, John Seer pulsph...@yahoo.com wrote:
 
 
  Hello,
 
  I am using in one of my projects ibatis and have a problem with
  pagination.
 
  For example I want to select 100 objects at a time and skip first 100
 of
  them. I didn't find any good way of doing it and nothing exciting
 about
  scrolling too.
 
 
  Any suggestion how to achieve/solve my problem?
 
 
  Thanks
  John
 
  --
  View this message in context:
  http://www.nabble.com/Pagination-by-objects-tp24652955p24652955.html
  Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
  For additional commands, e-mail: user-java-h...@ibatis.apache.org
 
 
 
 

 The

 --
 View this message in context:
 http://www.nabble.com/Pagination-by-objects-tp24652955p24685472.html
 Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
 For additional commands, e-mail: user-java-h...@ibatis.apache.org


 
 

-- 
View this message in context: 
http://www.nabble.com/Pagination-by-objects-tp24652955p24686185.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org



Re: Pagination by objects

2009-07-27 Thread John Seer

Thanks Clinton, 
I was thinking doing it with IN, but I thinking creating temp table with ids
and doing pagination on it will work faster




Clinton Begin wrote:
 
 Ah, I know what you're talking about.
 There's no way to solve that, other than to load less data, or load each
 object up separately.  If I'm not mistaken, not even a full ORM will be
 able
 to do that without first building the entire map of keyed relationships.
 
 For example, an ORM could look up all of the unique primary key values,
 select the first 1000 out of 200,000, then generate an IN clause and add
 it
 to the join.
 
 You could do the same with iBATIS, but you have to do it manually.
 
 Clinton
 
 On Mon, Jul 27, 2009 at 12:00 PM, John Seer pulsph...@yahoo.com wrote:
 

 You could start with the documentation...or even just your IDE code
 completion... :-)

 Look up the queryForList  method signatures..

 queryForList  is taking start row number and end row number.
 For example if I have temp table with 200k rows which was build using
 left
 joins, and if I will ask return from 0, 1000 it will return 6 Objects the
 6th object will not be complete because the rest of the data is in rows
 from
 1001-1300

 Example of the table

 ROW   ID AB C  D  E F
 11  null null  0  0  0 0
 21  null null  0  0  0 1
 31  null null  0  0  1 0
 41  null null  0  0  1 1
 51  null null  0  1  0 0
 61  null null  0  1  0 1
 71  null null  0  1  1 0
 81  null null  1  1  0 0
 92  null null  0  0  0 0
 10  2  null null  0  0  0 1
 11  2  null null  0  0  1 0
 12  2  null null  0  0  1 1
 13  2  null null  0  1  0 0
 14  2  null null  0  1  0 1
 15  2  null null  0  1  1 0
 16  2  null null  1  1  0 0

 If I will ask to get from
 queryForList(get, 0,10)

 I will get 2 Objects but second object will not be complete



 Clinton Begin wrote:
 
  You could start with the documentation...or even just your IDE code
  completion... :-)
 
  Look up the queryForList  method signatures..
 
  Clinton
 
  On Fri, Jul 24, 2009 at 4:39 PM, John Seer pulsph...@yahoo.com wrote:
 
 
  Hello,
 
  I am using in one of my projects ibatis and have a problem with
  pagination.
 
  For example I want to select 100 objects at a time and skip first 100
 of
  them. I didn't find any good way of doing it and nothing exciting
 about
  scrolling too.
 
 
  Any suggestion how to achieve/solve my problem?
 
 
  Thanks
  John
 
  --
  View this message in context:
  http://www.nabble.com/Pagination-by-objects-tp24652955p24652955.html
  Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
  For additional commands, e-mail: user-java-h...@ibatis.apache.org
 
 
 
 

 The

 --
 View this message in context:
 http://www.nabble.com/Pagination-by-objects-tp24652955p24685472.html
 Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
 For additional commands, e-mail: user-java-h...@ibatis.apache.org


 
 

-- 
View this message in context: 
http://www.nabble.com/Pagination-by-objects-tp24652955p24686187.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org



Pagination by objects

2009-07-24 Thread John Seer

Hello,

I am using in one of my projects ibatis and have a problem with pagination.

For example I want to select 100 objects at a time and skip first 100 of
them. I didn't find any good way of doing it and nothing exciting about
scrolling too.


Any suggestion how to achieve/solve my problem?


Thanks
John

-- 
View this message in context: 
http://www.nabble.com/Pagination-by-objects-tp24652955p24652955.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org



Re: Pagination by objects

2009-07-24 Thread Clinton Begin
You could start with the documentation...or even just your IDE code
completion... :-)

Look up the queryForList  method signatures..

Clinton

On Fri, Jul 24, 2009 at 4:39 PM, John Seer pulsph...@yahoo.com wrote:


 Hello,

 I am using in one of my projects ibatis and have a problem with pagination.

 For example I want to select 100 objects at a time and skip first 100 of
 them. I didn't find any good way of doing it and nothing exciting about
 scrolling too.


 Any suggestion how to achieve/solve my problem?


 Thanks
 John

 --
 View this message in context:
 http://www.nabble.com/Pagination-by-objects-tp24652955p24652955.html
 Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
 For additional commands, e-mail: user-java-h...@ibatis.apache.org