⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 producttable.java

📁 hibernate应用测试,初学hibernate 的会员可以看看.
💻 JAVA
字号:
package com.bean;

import org.apache.struts.action.ActionForm;

public class ProductTable extends ActionForm{
    private int productId;
    private String productName;
    private String productType;
    private String pinPai;
    private String productTechnics;
    private String productPackage;
    private String productManufacturer;
    private String productGrade;
    private String produceBatch;
    private String guaranteePeriod;
    private int delFlag;
    private int referFlag;

     public ProductTable(){};

    public void setProductId(int productId){
         this.productId=productId;
}
    public int getProductId(){
        return this.productId;
    }

    public void setProductName(String productName){
         this.productName=productName;
}
    public String getProductName(){
        return this.productName;
    }

    public void setProductType(String productType){
         this.productType=productType;
}
    public String getProductType(){
        return this.productType;
    }

    public void setPinPai(String pinPai){
         this.pinPai=pinPai;
}
    public String getPinPai(){
        return this.pinPai;
    }

    public void setProductTechnics(String productTechnics){
         this.productTechnics=productTechnics;
}
    public String getProductTechnics(){
        return this.productTechnics;
    }

    public void setProductPackage(String productPackage){
         this.productPackage=productPackage;
}
    public String getProductPackage(){
        productPackage=productPackage==null?"":productPackage.trim().equals("")?"":productPackage;
        return this.productPackage;
    }

    public void setProductManufacturer(String productManufacturer){
         this.productManufacturer=productManufacturer;
}
    public String getProductManufacturer(){
         productManufacturer=productManufacturer==null?"":productManufacturer.trim().equals("")?"":productManufacturer;
        return this.productManufacturer;
    }

    public void setProductGrade(String productGrade){
         this.productGrade=productGrade;
}
    public String getProductGrade(){
        productGrade=productGrade==null?"":productGrade.trim().equals("")?"":productGrade;
        return this.productGrade;
    }

    public void setProduceBatch(String produceBatch){
         this.produceBatch=produceBatch;
}
    public String getProduceBatch(){
        produceBatch=produceBatch==null?"":produceBatch.trim().equals("")?"":produceBatch;
        return this.produceBatch;
    }

    public void setGuaranteePeriod(String guaranteePeriod){
         this.guaranteePeriod=guaranteePeriod;
}
    public String getGuaranteePeriod(){
        guaranteePeriod=guaranteePeriod==null?"":guaranteePeriod.trim().equals("")?"":guaranteePeriod;
        return this.guaranteePeriod;
    }

    public void setDelFlag(int delFlag){
         this.delFlag=delFlag;
}
    public int getDelFlag(){
        return this.delFlag;
    }

    public void setReferFlag(int referFlag) {
        this.referFlag = referFlag;
    }

    public int getReferFlag() {
        return this.referFlag;
    }

    public boolean equals(Object obj){
        boolean flag = false;
        if(!(obj instanceof ProductTable)) return flag;
        ProductTable tmpProduct = (ProductTable)obj;
        if(this.getProductId() == tmpProduct.getProductId()&&this.getProductId()>0) return true;
        if(this.getPinPai().equals(tmpProduct.getPinPai())&&this.getProductManufacturer().equals(tmpProduct.getProductManufacturer()
                                   )&& this.getProductName().equals(tmpProduct.getProductName())&&this.getProductTechnics().equals(tmpProduct.getProductTechnics())
                                   && this.getProductType().equals(tmpProduct.getProductType()))
              return true;
        return flag;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -