Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
InfoManager.java
Package: EXT_study.rar [view]
Upload User: zaktkj
Upload Date: 2022-08-08
Package Size: 5770k
Code Size: 1k
Category:
JavaScript
Development Platform:
JavaScript
- package dwr;
- import java.util.ArrayList;
- import java.util.Date;
- import java.util.List;
- import java.util.Map;
- /**
- * 操作pojo的管理器.
- * @author Lingo
- */
- public class InfoManager {
- private List infoList = new ArrayList();
- public InfoManager() {
- for (int i = 0; i < 20; i++) {
- Info info = new Info();
- info.setId(i);
- info.setName("name " + i);
- info.setSex(i%2);
- info.setEmail("xyz20003@gmail.com");
- info.setTel("" + i);
- info.setAddTime(new Date());
- info.setDescn("descn " + i);
- infoList.add(info);
- }
- }
- public List getResult() {
- return infoList;
- }
- public ListRange getItems(Map conditions) {
- int start = 0;
- int pageSize = 10;
- // int pageNo = (start / pageSize) + 1;
- try {
- start = Integer.parseInt(conditions.get("start").toString());
- pageSize = Integer.parseInt(conditions.get("limit").toString());
- // pageNo = (start / pageSize) + 1;
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- int end = start + pageSize;
- if (end > infoList.size()) {
- end = infoList.size();
- }
- List list = infoList.subList(start, end);
- return new ListRange(list.toArray(), infoList.size());
- }
- }