现在的位置: 首页 > 综合 > 正文

struts--批量封装对象

2013年10月25日 ⁄ 综合 ⁄ 共 1294字 ⁄ 字号 评论关闭

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-->

作者:

抱歉!评论已关闭.