资源简介
小小购书网站实现购书网站的基本功能,采用JSP+Servlet技术,另外使用了BeanUtils,DBUtils,FileUpload等jar包。供初学者学习JSP和Servlet技术使用。使用了Mysql数据库
代码片段和文件信息
package com.pdsu.bean;
import java.io.Serializable;
import java.util.Date;
public class Book implements Serializable {
private static final long serialVersionUID = -5644850772962543446L;
/**
* id
*/
private String id;
/**
* 书名
*/
private String name;
/**
* 作者
*/
private String author;
/**
* 价格
*/
private float price;
/**
* 出版日期
*/
private Date publicationDate;
/**
* 图片
*/
private String images;
/**
* 描述
*/
private String description;
/**
* 所属分类
*/
private Category category;
public Book() {
super();
}
public Book(String id String name String author float price
Date publicationDate String images String description
Category category) {
super();
this.author = author;
this.category = category;
this.description = description;
this.id = id;
this.images = images;
this.name = name;
this.price = price;
this.publicationDate = publicationDate;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public float getPrice() {
return price;
}
public void setPrice(float price) {
this.price = price;
}
public Date getPublicationDate() {
return publicationDate;
}
public void setPublicationDate(Date publicationDate) {
this.publicationDate = publicationDate;
}
public String getImages() {
return images;
}
public void setImages(String images) {
this.images = images;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Book other = (Book) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
@Override
public String toString() {
return “Book [id=“ + id + “ name=“ + name + “ author=“ + author
+ “ price=“ + price + “ publicationDate=“ + publicationDate
+ “ images=“ + images + “ description=“ + description
+ “ category=“ + category + “]“;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-11-22 16:12 bookstore\
文件 650 2011-11-19 11:33 bookstore\.classpath
目录 0 2011-11-18 17:56 bookstore\.myeclipse\
文件 300 2011-11-22 14:15 bookstore\.myme
文件 1752 2011-11-18 19:40 bookstore\.project
目录 0 2011-11-22 16:12 bookstore\.settings\
文件 493 2011-11-18 17:56 bookstore\.settings\.jsdtscope
文件 395 2011-11-18 17:56 bookstore\.settings\org.eclipse.jdt.core.prefs
文件 540 2011-11-19 11:30 bookstore\.settings\org.eclipse.wst.common.component
文件 252 2011-11-18 17:56 bookstore\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2011-11-18 17:56 bookstore\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2011-11-18 17:56 bookstore\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2011-11-22 16:12 bookstore\sql\
文件 3176 2011-11-26 18:40 bookstore\sql\bookstore.sql
目录 0 2011-11-22 16:12 bookstore\src\
文件 634 2011-11-26 18:43 bookstore\src\bean_config.properties
文件 804 2011-11-22 16:19 bookstore\src\c3p0-config.xm
目录 0 2011-11-22 16:12 bookstore\src\com\
目录 0 2011-11-22 16:12 bookstore\src\com\pdsu\
目录 0 2011-11-26 11:54 bookstore\src\com\pdsu\bean\
文件 2878 2011-11-24 17:34 bookstore\src\com\pdsu\bean\Book.java
文件 1468 2011-11-26 09:05 bookstore\src\com\pdsu\bean\Cart.java
文件 1701 2011-11-25 17:01 bookstore\src\com\pdsu\bean\CartItem.java
文件 1601 2011-11-24 17:34 bookstore\src\com\pdsu\bean\Category.java
文件 1780 2011-11-26 12:03 bookstore\src\com\pdsu\bean\OrderItem.java
文件 2390 2011-11-26 12:08 bookstore\src\com\pdsu\bean\Orders.java
文件 2709 2011-11-24 16:45 bookstore\src\com\pdsu\bean\Page.java
文件 1563 2011-11-23 16:43 bookstore\src\com\pdsu\bean\PageIndex.java
文件 4738 2011-11-24 16:29 bookstore\src\com\pdsu\bean\PageModel.java
文件 2427 2011-11-24 17:24 bookstore\src\com\pdsu\bean\User.java
目录 0 2011-11-26 15:12 bookstore\src\com\pdsu\dao\
............此处省略164个文件信息
评论
共有 条评论