/**
* 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
*/
package com.ewcms.plugin.crawler.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@Entity
@Table(name = "plugin_crawler_storage")
@SequenceGenerator(name = "seq_plugin_crawler_storage", sequenceName = "seq_plugin_crawler_storage_id", allocationSize = 1)
public class Storage implements Serializable {
private static final long serialVersionUID = -6416296085234192162L;
@Id
@GeneratedValue(generator = "seq_plugin_crawler_storage", strategy = GenerationType.SEQUENCE)
@Column(name = "id")
private Long id;
@Column(name = "gather_id")
private Long gatherId;
@Column(name = "gather_name")
private String gatherName;
@Column(name = "title")
private String title;
@Column(name = "url", unique = true)
private String url;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getGatherId() {
return gatherId;
}
public void setGatherId(Long gatherId) {
this.gatherId = gatherId;
}
public String getGatherName() {
return gatherName;
}
public void setGatherName(String gatherName) {
this.gatherName = gatherName;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Storage other = (Storage) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
}