/**
*
*/
package org.zxy.chats.domain;
import java.io.Serializable;
import org.springframework.data.annotation.Id;
/**
* 说明:
*
* @author zxy
* @version 1.0
*
* 2017年5月16日 下午3:11:44
*/
public class Entity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
protected Integer id;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Entity() {
super();
}
public Entity(Integer id) {
super();
this.id = id;
}
@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;
Entity other = (Entity) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
}
Mongodb Service接口封装
最新推荐文章于 2021-03-29 15:45:12 发布