?? updatebookaction.java
字號:
package com.firstssh.action;
import com.firstssh.model.Book;
import com.firstssh.service.IBookService;
import com.opensymphony.xwork2.ActionSupport;
public class UpdateBookAction extends ActionSupport {
private int bookid;
private String bookname;
private String author;
private String price;
private IBookService bookService;
public String execute() throws Exception {
Book book=new Book();
book.setId(bookid);
book.setBookname(bookname);
book.setAuthor(author);
book.setPrice(price);
if(bookService.updateBook(book)){
return SUCCESS;
}else{
return "exception";
}
}
public String getBookname() {
return bookname;
}
public void setBookname(String bookname) {
this.bookname = bookname;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public IBookService getBookService() {
return bookService;
}
public void setBookService(IBookService bookService) {
this.bookService = bookService;
}
public int getBookid() {
return bookid;
}
public void setBookid(int bookid) {
this.bookid = bookid;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -