Struts1.2应用-批量封装对象
++YONG原创,转载请注明
1. 批量发布产品信息效果图:
上图为批量发布产品页面。
上图为显示刚批量发布的产品页面。
2. 具体实现:
2.1. 域模型对象:Product.java
package org.qiujy.domain;
import java.sql.Date;
/** * 产品---实体域模型类 * @author qiujy * @version 1.0 */ public class Product { private Long id; private String name; private double price; private Date pubTime = new Date(new java.util.Date().getTime());
public Product() { }
public Product(Long id, String name, double price, Date pubTime) { this.id = id; this.name = name; this.price = price; this.pubTime = pubTime; }
/** * @return the id */ public Long getId() { return id; }
/** * @param id * the id to set */ public void setId(Long id) { this.id = id; }
/** * @return the name */ public String getName() { return name; }
/** * @param name * the name to set */ public void setName(String name) { this.name = name; }
/** * @return the price */ public double getPrice() { return price; }
/** * @param price * the price to set */ public void setPrice(double price) { this.price = price; }
/** * @return the pubTime */ public Date getPubTime() { return pubTime; }
/** * @param pubTime * the-->
|