📄 albuminfo.java
字号:
package cn.myvideosite.data.model.bean;
import java.util.Date;
public class AlbumInfo implements Comparable<Object> {
private int albumId;
private String albumTitle;
private String albumIntro;
private int userId;
private String albumAddr;
private int videoNub;
private int popular;
private Date createTime;
private String imageUrl;
private String flashUrl;
private int albumTypeId;
public AlbumInfo() {
super();
}
public AlbumInfo(int userId,String albumTitle, String albumIntro, String albumAddr,
int videoNub,int popular, Date createTime) {
super();
this.albumAddr = albumAddr;
this.albumIntro = albumIntro;
this.albumTitle = albumTitle;
this.createTime = createTime;
this.userId=userId;
this.popular = popular;
this.videoNub = videoNub;
}
public AlbumInfo(int albumId,int userId,String albumTitle, String albumIntro, String albumAddr,
int videoNub,int popular, Date createTime) {
super();
this.albumAddr = albumAddr;
this.albumId = albumId;
this.albumIntro = albumIntro;
this.albumTitle = albumTitle;
this.createTime = createTime;
this.userId=userId;
this.popular = popular;
this.videoNub = videoNub;
}
public AlbumInfo(int albumId,int userId,String albumTitle, String albumIntro, String albumAddr,
int videoNub,int popular, Date createTime,String imageUrl,String flashUrl,int albumTypeId) {
super();
this.albumAddr = albumAddr;
this.albumId = albumId;
this.albumIntro = albumIntro;
this.albumTitle = albumTitle;
this.createTime = createTime;
this.userId=userId;
this.popular = popular;
this.videoNub = videoNub;
this.imageUrl=imageUrl;
this.flashUrl=flashUrl;
this.albumTypeId=albumTypeId;
}
public int getAlbumId() {
return albumId;
}
public void setAlbumId(int albumId) {
this.albumId = albumId;
}
public String getAlbumTitle() {
return albumTitle;
}
public void setAlbumTitle(String albumTitle) {
this.albumTitle = albumTitle;
}
public String getAlbumIntro() {
return albumIntro;
}
public void setAlbumIntro(String albumIntro) {
this.albumIntro = albumIntro;
}
public String getAlbumAddr() {
return albumAddr;
}
public void setAlbumAddr(String albumAddr) {
this.albumAddr = albumAddr;
}
public int getVideoNub() {
return videoNub;
}
public void setVideoNub(int videoNub) {
this.videoNub = videoNub;
}
public int getPopular() {
return popular;
}
public void setPopular(int popular) {
this.popular = popular;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
public String getFlashUrl() {
return flashUrl;
}
public void setFlashUrl(String flashUrl) {
this.flashUrl = flashUrl;
}
public int getAlbumTypeId() {
return albumTypeId;
}
public void setAlbumTypeId(int albumTypeId) {
this.albumTypeId = albumTypeId;
}
public String toString(){
StringBuffer sb=new StringBuffer("albumId=");
sb.append(albumId).append(", userId=").
append(userId).append(", albumTitle=").append(albumTitle).append(", albumIntro=").append(albumIntro)
.append(", albumAddr=").append(albumAddr).append(", videoNub=").append(videoNub)
.append(", popular=").append(popular).append(", createTime=").append(createTime).append(",imageUrl=")
.append(imageUrl).append(",flashUrl=").append(flashUrl).append(",albumTypeId=").append(albumTypeId);
return sb.toString();
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((albumAddr == null) ? 0 : albumAddr.hashCode());
result = prime * result + albumId;
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (!(obj instanceof AlbumInfo))
return false;
AlbumInfo other = (AlbumInfo) obj;
if (albumAddr == null) {
if (other.albumAddr != null)
return false;
} else if (!albumAddr.equals(other.albumAddr))
return false;
if (albumId != other.albumId)
return false;
return true;
}
public int compareTo(Object o) {
AlbumInfo other=(AlbumInfo)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 + -