【Java开源代码栏目提醒】:网学会员Java开源代码为您提供Ad.java参考,解决您在Ad.java学习中工作中的难题,参考学习。
package com.myad.model;
// writed 2006-5-21 2:34:46 by 37signals.cn
import java.math.BigDecimal;
/**
* @struts.form include-all="true" extends="BaseForm"
* @hibernate.class table="ad"
*
*/
public class Ad extends com.myad.model.BaseObject implements
java.io.Serializable {
//字段
private String adid;
private String customerid;
private String adtypeid;
private String adname;
private BigDecimal price;
private String size;
private String location;
private String image;
// Constructors
/** 缺省构造器 */
public Ad() {
}
/** 完整构造器 **/
public Ad(String customerid, String adtypeid, String adname,
BigDecimal price, String size, String location, String image) {
this.customerid = customerid;
this.adtypeid = adtypeid;
this.adname = adname;
this.price = price;
this.size = size;
this.location = location;
this.image = image;
}
//属性访问
/**
* *
*
* @hibernate.id generator-class="native" type="java.lang.String"
* column="adid"
*
*/
public String getAdid() {
return this.adid;
}
public void setAdid(String adid) {
this.adid = adid;
}
/**
* *
*
* @hibernate.property column="customerid" length="32"
*
*/
public String getCustomerid() {
return this.customerid;
}
public void setCustomerid(String customerid) {
this.customerid = customerid;
}
/**
* *
*
* @hibernate.property column="adtypeid" length="32"
*
*/
public String getAdtypeid() {
return this.adtypeid;
}
public void setAdtypeid(String adtypeid) {
this.adtypeid = adtypeid;
}
/**
* *
*
* @hibernate.property column="adname" length="50"
*
*/
public String getAdname() {
return this.adname;
}
public void setAdname(String adname) {
this.adname = adname;
}
/**
* *
*
* @hibernate.property column="price" length="15"
*
*/
public BigDecimal getPrice() {
return this.price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
/**
* *
*
* @hibernate.property column="size" length="15"
*
*/
public String getSize() {
return this.size;
}
public void setSize(String size) {
this.size = size;
}
/**
* *
*
* @hibernate.property column="location" length="255"
*
*/
public String getLocation() {
return this.location;
}
public void setLocation(String location) {
this.location = location;
}
/**
* *
*
* @hibernate.property column="image" length="255"
*
*/
public String getImage() {
return this.image;
}
public void setImage(String image) {
this.image = image;
}
/**
* toString
*
* @return String
*/
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append(getClass().getName()).append("@").append(
Integer.toHexString(hashCode())).append(" [");
buffer.append("customerid").append("='").append(getCustomerid())
.append("' ");
buffer.append("adtypeid").append("='").append(getAdtypeid()).append(
"' ");
buffer.append("adname").append("='").append(getAdname()).append("' ");
buffer.append("price").append("='").append(getPrice()).append("' ");
buffer.append("size").append("='").append(getSize()).append("' ");
buffer.append("location").append("='").append(getLocation()).append(
"' ");
buffer.append("image").append("='").append(getImage()).append("' ");
buffer.append("]");
return buffer.toString();
}
public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof Ad))
return false;
Ad castOther = (Ad) other;
return ((this.getAdid() == castOther.getAdid()) || (this.getAdid() != null
&& castOther.getAdid() != null && this.getAdid().equals(
castOther.getAdid())))
&& ((this.getCustomerid() == castOther.getCustomerid()) || (this
.getCustomerid() != null
&& castOther.getCustomerid() != null && this
.getCustomerid().equals(castOther.getCustomerid())))
&& ((this.getAdtypeid() == castOther.getAdtypeid()) || (this
.getAdtypeid() != null
&& castOther.getAdtypeid() != null && this
.getAdtypeid().equals(castOther.getAdtypeid())))
&& ((this.getAdname() == castOther.getAdname()) || (this
.getAdname() != null
&& castOther.getAdname() != null && this.getAdname()
.equals(castOther.getAdname())))
&& ((this.getP