📄 bookform.java
字号:
package com.jstu.form;
import java.sql.Date;
import com.jstu.dto.BookDTO;
import bookshop.base.BaseActionForm;
import bookshop.base.BaseDTO;
public class BookForm extends BaseActionForm{
private int id;
private int bookId;
private String bookName;
private String author ;
private String publication;
private Date publicTime;
private String bookISBN;
private String category ;
private double price;
private double vipPrice;
private double save;
private int amount;
private String image;
private Date shelfTime;
public void setDTO(BaseDTO baseDTO){
BookDTO book=(BookDTO)baseDTO;
this.setAmount(book.getAmount());
this.setAuthor(book.getAuthor());
this.setBookISBN(book.getBookISBN());
this.setBookName(book.getBookName());
this.setCategory(book.getCategory());
this.setId(book.getId());
this.setBookId(book.getBookId());
this.setImage(book.getImage());
this.setPrice(book.getPrice());
this.setPublication(book.getPublication());
this.setPublicTime(book.getPublicTime());
this.setSave(book.getSave());
this.setShelfTime(book.getShelfTime());
this.setVipPrice(book.getVipPrice());
}
public BaseDTO getDTO(){
BookDTO book=new BookDTO();
book.setAmount(this.getAmount());
book.setAuthor(this.getAuthor());
book.setBookISBN(this.getBookISBN());
book.setBookName(this.getBookName());
book.setCategory(this.getCategory());
book.setId(this.getId());
book.setBookId(this.getBookId());
book.setImage(this.getImage());
book.setPrice(this.getPrice());
book.setPublication(this.getPublication());
book.setPublicTime(this.getPublicTime());
book.setSave(this.getSave());
book.setShelfTime(this.getShelfTime());
book.setVipPrice(this.getVipPrice());
return book;
}
public int getAmount() {
return amount;
}
public void setAmount(int amount) {
this.amount = amount;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getBookISBN() {
return bookISBN;
}
public void setBookISBN(String bookISBN) {
this.bookISBN = bookISBN;
}
public String getBookName() {
return bookName;
}
public void setBookName(String bookName) {
this.bookName = bookName;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
public String getPublication() {
return publication;
}
public void setPublication(String publication) {
this.publication = publication;
}
public Date getPublicTime() {
return publicTime;
}
public void setPublicTime(Date publicTime) {
this.publicTime = publicTime;
}
public double getSave() {
return save;
}
public void setSave(double save) {
this.save = save;
}
public Date getShelfTime() {
return shelfTime;
}
public void setShelfTime(Date shelfTime) {
this.shelfTime = shelfTime;
}
public double getVipPrice() {
return vipPrice;
}
public void setVipPrice(double vipPrice) {
this.vipPrice = vipPrice;
}
public int getBookId() {
return bookId;
}
public void setBookId(int bookId) {
this.bookId = bookId;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -