[Seasar-user:6222] [DBFlute]Behavior の Paging について

[E-MAIL ADDRESS DELETED] [E-MAIL ADDRESS DELETED]
2007年 2月 19日 (月) 16:08:04 JST


$B$$$D$b$*@$OC$K$J$C$F$*$j$^$9!#(B
$BJF86$G$9!#(B

DBFlute0.4.0$B$K$F(B
Behavior$B$N(BselectPage$B%a%=%C%I$r;HMQ$7$F$$$k$N$G$9$,!"(B
$B8!:w$,$&$^$/$G$-$F$$$J$$>u67$G$9!#(B

$B#l#o#g$+$i;!$9$k$K!"!V%l%3!<%I$,A*Br$5$l$^$;$s$G$7$?!W$H$J$C$F$$$k$h$&$G$9!#(B
$BH/9T$5$l$F$$$k(BSQL$B$r$8$+BG$A$7$F$b$d$O$j!V%l%3!<%I$,A*Br(B
$B$5$l$^$;$s$G$7$?!W$H$J$j$^$9!#!V(Brownum > 100$B!W$N;XDj$N$?$a$K(B
$B2?$bA*Br$5$l$J$$$h$&$G$9!#(B
$B%3!<%I$N2aITB-$d$=$NB>!"$J$K$+$*5$$E$-$NE@$J$I$4$6$$$^$7$?$i!"$465<x$h$m$7$/$*4j$$CW$7$^$9!#(B



$B!Z%3!<%I![(B
final SmpkyogatblCB smpkyogatblCB  = new SmpkyogatblCB();
smpkyogatblCB.query().addOrderBy_Kyogakaisyacd_Asc();
smpkyogatblCB.fetchFirst(25);
smpkyogatblCB.fetchPage(5);
            
final PagingResultBean<Smpkyogatbl> ls = smpkyogatblBhv.selectPage(smpkyogatblCB);
System.out.println("$B0lMw!]#N7o(Bselect$B-!(Bls$B!'(B" + ls);



$B!Z7k2LH/9T#S#Q#L!J#l#o#g$h$jE>5-!K![(B
$B-!(B
select count(*) from SMPKYOGATBL

$B-"(B
select * from 
(select SMPKYOGATBL.CRUSER, SMPKYOGATBL.CRDATE, SMPKYOGATBL.KYOGASYANAME, SMPKYOGATBL.KYOGAKAISYACD, 
SMPKYOGATBL.KYOGAKAISYANAME, SMPKYOGATBL.JIGYOSYONAME, SMPKYOGATBL.ADRESS, SMPKYOGATBL.NAIYO, SMPKYOGATBL.TELNO, 
SMPKYOGATBL.TEIKETUBI, SMPKYOGATBL.SETUBIMEISMPI, SMPKYOGATBL.KUBUN1CD, SMPKYOGATBL.NINTEI, SMPKYOGATBL.TONAN, 
SMPKYOGATBL.MUSYO, SMPKYOGATBL.JICHITAI, SMPKYOGATBL.KEISMPTU, SMPKYOGATBL.DENCHUKYOGA, SMPKYOGATBL.ISSOKUKA, 
SMPKYOGATBL.KANROKYOGA, SMPKYOGATBL.DENCHUSYOKAI, SMPKYOGATBL.KANROSYOKAI, SMPKYOGATBL.HOSYOKIN, 
SMPKYOGATBL.HOSYOKINZAN, SMPKYOGATBL.ICHIRANCD, SMPKYOGATBL.YOBI1, SMPKYOGATBL.YOBI2, SMPKYOGATBL.KOSINDATE 
from SMPKYOGATBL   order by SMPKYOGATBL.KYOGAKAISYACD asc ) where rownum > 100 and rownum <= 125

$B-#(B
select count(*) from SMPKYOGATBL

$B-$(B
select * from 
(select SMPKYOGATBL.CRUSER, SMPKYOGATBL.CRDATE, SMPKYOGATBL.KYOGASYANAME, SMPKYOGATBL.KYOGAKAISYACD, 
SMPKYOGATBL.KYOGAKAISYANAME, SMPKYOGATBL.JIGYOSYONAME, SMPKYOGATBL.ADRESS, SMPKYOGATBL.NAIYO, SMPKYOGATBL.TELNO, 
SMPKYOGATBL.TEIKETUBI, SMPKYOGATBL.SETUBIMEISMPI, SMPKYOGATBL.KUBUN1CD, SMPKYOGATBL.NINTEI, SMPKYOGATBL.TONAN, 
SMPKYOGATBL.MUSYO, SMPKYOGATBL.JICHITAI, SMPKYOGATBL.KEISMPTU, SMPKYOGATBL.DENCHUKYOGA, SMPKYOGATBL.ISSOKUKA, 
SMPKYOGATBL.KANROKYOGA, SMPKYOGATBL.DENCHUSYOKAI, SMPKYOGATBL.KANROSYOKAI, SMPKYOGATBL.HOSYOKIN, 
SMPKYOGATBL.HOSYOKINZAN, SMPKYOGATBL.ICHIRANCD, SMPKYOGATBL.YOBI1, SMPKYOGATBL.YOBI2, SMPKYOGATBL.KOSINDATE 
from SMPKYOGATBL   order by SMPKYOGATBL.KYOGAKAISYACD asc ) where rownum > 999975 and rownum <= 1000000



$B!Z7k2LH/9T(BPagingResultBean$B!J#l#o#g$h$jE>5-!K![(B
$B0lMw!]#N7o(Bselect$B-!(Bls$B!'(B40000/40000 of 999999 listSize=0 pageSize=25 page:{true/false} groupSize=0 rangeSize=0



$B"("("("("("("("("("("("("("("("("("("("("("("("((B
$B$A$J$_$K0JA0$465<xD:$$$?30$@$7(BSQL$B$N(BPAGING
$B$K$*$$$F$O0J2<$N$h$&$K(BSQL$B$r:[E-MAIL ADDRESS DELETED]$7$F<B8=$7$^$7$?!#(B
$B!JNI$$(BSQL$B$+$o$+$j$^$;$s$,!&!&!&!K(B


select a.* , a.n from
 (select b.* , rownum n
  from
   (select KYOGAKAISYACD, KYOGAKAISYANAME, JIGYOSYONAME, KYOGASYANAME, NAIYO, TELNO, ICHIRANCD from SMPKYOGATBL
   order by KYOGAKAISYACD
   )b
 )a
where a.n > 100 and a.n <= 125




Seasar-user メーリングリストの案内