发帖    主题    评论    推荐    标签    作者    订阅    查搜    注册   登陆   关注
 
面向对象 设计模式 领域驱动设计 企业架构 框架 开发教程 微服务 CQRS 扩展性 并发编程 事件溯源 分布式 SOA

test

2002-09-18 16:36
赞助商链接



public ForumThreadIterator threads(ResultFilter resultFilter) {
//根据传入的resultFilter构造一个查询SQL语句(*注1)
String query = getThreadListSQL(resultFilter, false);
//返回一个确定返回的id列表,这里缺省大小是400个,例如,我要看1~15条纪录
// threadBlock的length是400,从1~400(*注2)
long [] threadBlock = getBlock(query.toString(), resultFilter.getStartIndex());
int startIndex = resultFilter.getStartIndex();
int endIndex;
// If number of results is set to inifinite, set endIndex to the total
// number of threads in the forum.
if (resultFilter.getNumResults() == ResultFilter.NULL_INT) {
endIndex = (int)getThreadCount(resultFilter);
}
else {
endIndex = resultFilter.getNumResults() + startIndex;
}
//嘿嘿,理解了上面几句代码先,然后来看这个iterator
return new ForumThreadBlockIterator(threadBlock, query.toString(),
startIndex, endIndex, this.id, factory);
}


2002-09-18 16:37

test

2002-09-18 16:38



public ForumThreadIterator threads(ResultFilter resultFilter) {
//根据传入的resultFilter构造一个查询SQL语句(*注1)
String query = getThreadListSQL(resultFilter, false);
//返回一个确定返回的id列表,这里缺省大小是400个,例如,我要看1~15条纪录
// threadBlock的length是400,从1~400(*注2)
long [] threadBlock = getBlock(query.toString(), resultFilter.getStartIndex());
int startIndex = resultFilter.getStartIndex();
int endIndex;
// If number of results is set to inifinite, set endIndex to the total
// number of threads in the forum.
if (resultFilter.getNumResults() == ResultFilter.NULL_INT) {
endIndex = (int)getThreadCount(resultFilter);
}
else {
endIndex = resultFilter.getNumResults() + startIndex;
}
//嘿嘿,理解了上面几句代码先,然后来看这个iterator
return new ForumThreadBlockIterator(threadBlock, query.toString(),
startIndex, endIndex, this.id, factory);



asasdasdasdwqewqeqweqwe

2002-11-08 09:26

test

赞助商链接

赞助商链接

返回顶部

移动版 关于本站 使用帮助 联系反馈 最佳分辨率1366x768
OpenSource JIVEJDON Powered by JdonFramework Code © 2002-20 jdon.com