@Entity
@Table(name="T_News")
public class News implements Serializable{
private static final long serialVersionUID = -861098008736838897L;
@Id
@Column(name="NewsId")
@GeneratedValue(generator = "paymentableGenerator")
@GenericGenerator(name = "paymentableGenerator", strategy = "native")
private Long newsid;
private short type;
private Timestamp createtime;
@ManyToOne(fetch=FetchType.EAGER)
@JoinColumn(name="PublisherId")
private CustomerService customerservice;
private String title;
private String content;
public Long getNewsid() {
return newsid;
}
public void setNewsid(Long newsid) {
this.newsid = newsid;
}
public short getType() {
return type;
}
public void setType(short type) {
this.type = type;
}
public Timestamp getCreatetime() {
return createtime;
}
public void setCreatetime(Timestamp createtime) {
this.createtime = createtime;
}
public CustomerService getCustomerservice() {
return customerservice;
}
public void setCustomerservice(CustomerService customerservice) {
this.customerservice = customerservice;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}
留念、