/** * Copyright (c)2010-2011 Enterprise Website Content Management System(EWCMS), All rights reserved. * EWCMS PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * http://www.ewcms.com */ /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.ewcms.plugin.contribute.model; import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; /** * * @author 吴智俊 */ @Entity @Table(name = "component_contribute") public class Contribute implements Serializable { private static final long serialVersionUID = 3534227027073857782L; @Id private Long id; @Column(name = "username", nullable = false) private String username; @Column(name = "ip", nullable = false) private String ip; @Column(name = "email") private String email; @Column(name = "phone") private String phone; @Column(name = "title") private String title; @Column(name="content", columnDefinition="text") private String content; @Temporal(TemporalType.TIMESTAMP) @Column(name="date", nullable = false) private Date date; @Column(name = "checked", nullable = false) private Boolean checked; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } 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; } public Date getDate() { return date; } public void setDate(Date date) { this.date = date; } public Boolean getChecked() { return checked; } public void setChecked(Boolean checked) { this.checked = checked; } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Contribute other = (Contribute) obj; if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) { return false; } return true; } @Override public int hashCode() { int hash = 3; hash = 43 * hash + (this.id != null ? this.id.hashCode() : 0); return hash; } }