📄 albumkey.java
字号:
package cn.myvideosite.data.model.bean;
public class AlbumKey implements Comparable<Object> {
private int id;
private int albumId;
private int keyId;
private int userId;
public AlbumKey() {
super();
}
public AlbumKey( int albumId, int keyId, int userId) {
super();
this.albumId = albumId;
this.keyId = keyId;
this.userId = userId;
}
public AlbumKey( int id,int albumId, int keyId, int userId) {
super();
this.albumId = albumId;
this.id = id;
this.keyId = keyId;
this.userId = userId;
}
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(int id) {
this.id = id;
}
/**
* @return the albumId
*/
public int getAlbumId() {
return albumId;
}
/**
* @param albumId the albumId to set
*/
public void setAlbumId(int albumId) {
this.albumId = albumId;
}
/**
* @return the keyId
*/
public int getKeyId() {
return keyId;
}
/**
* @param keyId the keyId to set
*/
public void setKeyId(int keyId) {
this.keyId = keyId;
}
/**
* @return the userId
*/
public int getUserId() {
return userId;
}
/**
* @param userId the userId to set
*/
public void setUserId(int userId) {
this.userId = userId;
}
public String toString(){
StringBuffer sb=new StringBuffer("id=");
sb.append(id).append(", albumId=").append(albumId).append(", keyId=")
.append(keyId).append(", userId=").append(userId);
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + albumId;
result = prime * result + keyId;
result = prime * result + userId;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
AlbumKey other = (AlbumKey) obj;
if (albumId != other.albumId)
return false;
if (keyId != other.keyId)
return false;
if (userId != other.userId)
return false;
return true;
}
/**
* @param args
*/
public int compareTo(Object o) {
AlbumKey other=(AlbumKey )o;
if(albumId < other.albumId) return -1;
else if(albumId > other.albumId) return 1;
else return 0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -