www.pudn.com > liberSystem.rar > ReaderTypeAction.java, change:2012-06-06,size:1165b


package com.ccl.action; 
 
import com.ccl.domin.ReaderType; 
import com.ccl.service.ReaderTypeService; 
import com.opensymphony.xwork2.ActionSupport; 
 
public class ReaderTypeAction extends ActionSupport{ 
	private static ReaderTypeService readerTypeService =new ReaderTypeService(); 
	private int id; 
	private String name; 
	private int quantity; 
	 
	public String readertype_add(){ 
		ReaderType r=new ReaderType(); 
		r.setName(name); 
		r.setQuantity(quantity); 
		readerTypeService.insert(r); 
		return SUCCESS; 
	} 
	public String readertype_del(){ 
		readerTypeService.readerType_del(id); 
		return SUCCESS; 
	} 
	public String readertype_update(){ 
		ReaderType r=new ReaderType(); 
		r.setId(id); 
		r.setName(name); 
		r.setQuantity(quantity); 
		readerTypeService.readerType_update(r); 
		return SUCCESS; 
	} 
	public int getId() { 
		return id; 
	} 
	public void setId(int id) { 
		this.id = id; 
	} 
	public String getName() { 
		return name; 
	} 
	public void setName(String name) { 
		this.name = name; 
	} 
	public int getQuantity() { 
		return quantity; 
	} 
	public void setQuantity(int quantity) { 
		this.quantity = quantity; 
	} 
	 
	 
 
}