www.pudn.com > lucene_book(1).rar > ListService.java, change:2006-12-16,size:1668b


package test; 
 
import java.util.ArrayList; 
import java.util.List; 
 
import test.beans.MyBean; 
import test.beans.TableRow; 
 
public class ListService { 
	 
	public List getList() { 
		 
		ArrayList list = new ArrayList(); 
		 
		MyBean bean = null; 
		 
		bean = new MyBean(); 
		bean.setProperty1("Yao Ming"); 
		bean.setProperty2("30"); 
		list.add(bean); 
		 
		bean = new MyBean(); 
		bean.setProperty1("Mcgrady"); 
		bean.setProperty2("50"); 
		list.add(bean); 
		 
		bean = new MyBean(); 
		bean.setProperty1("Tim Duncan"); 
		bean.setProperty2("40"); 
		list.add(bean); 
		 
		bean = new MyBean(); 
		bean.setProperty1("Kevin Garnett"); 
		bean.setProperty2("60"); 
		list.add(bean); 
		 
		return list; 
	} 
	 
	public List getTableContent() { 
		 
		ArrayList list = new ArrayList(); 
 
		TableRow row = null; 
		 
		row = new TableRow(); 
		row.setId(1); 
		row.setName("Yao Ming"); 
		row.setRebound("20"); 
		row.setScore("36.5"); 
		row.setTurnovers("5"); 
		row.setDescription("Center"); 
		list.add(row); 
		 
		row = new TableRow(); 
		row.setId(2); 
		row.setName("Mcgrady"); 
		row.setRebound("9"); 
		row.setScore("28.2"); 
		row.setTurnovers("4"); 
		row.setDescription("Guard"); 
		list.add(row); 
		 
		row = new TableRow(); 
		row.setId(3); 
		row.setName("Tim Duncan"); 
		row.setRebound("14"); 
		row.setScore("31.7"); 
		row.setTurnovers("5"); 
		row.setDescription("Forward"); 
		list.add(row); 
		 
		row = new TableRow(); 
		row.setId(4); 
		row.setName("Kevin Garnett"); 
		row.setRebound("22"); 
		row.setScore("36.2"); 
		row.setTurnovers("4"); 
		row.setDescription("Forward"); 
		list.add(row); 
		 
		return list; 
		 
	} 
 
}