Sort.java
资源名称:Myblog.rar [点击查看]
上传用户:wlfwy2004
上传日期:2016-12-12
资源大小:33978k
文件大小:2k
源码类别:
Jsp/Servlet
开发平台:
Java
- package com.opensource.blog.model;
- import java.io.Serializable;
- import org.apache.commons.lang.builder.EqualsBuilder;
- import org.apache.commons.lang.builder.HashCodeBuilder;
- import org.apache.commons.lang.builder.ToStringBuilder;
- public class Sort
- implements Serializable {
- /** identifier field */
- private Long id;
- /** nullable persistent field */
- private String sortname;
- /** nullable persistent field */
- private long blogid;
- /** full constructor */
- public Sort(String sortname, long blogid) {
- this.sortname = sortname;
- this.blogid = blogid;
- }
- /** default constructor */
- public Sort() {
- }
- public Long getId() {
- return this.id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public String getSortname() {
- return this.sortname;
- }
- public void setSortname(String sortname) {
- this.sortname = sortname;
- }
- public long getBlogid() {
- return this.blogid;
- }
- public void setBlogid(long blogid) {
- this.blogid = blogid;
- }
- public String toString() {
- return new ToStringBuilder(this)
- .append("id", getId())
- .toString();
- }
- public boolean equals(Object other) {
- if (! (other instanceof Sort)) {
- return false;
- }
- Sort castOther = (Sort) other;
- return new EqualsBuilder()
- .append(this.getId(), castOther.getId())
- .isEquals();
- }
- public int hashCode() {
- return new HashCodeBuilder()
- .append(getId())
- .toHashCode();
- }
- }