b43218b73ad6c4474b096b8a7b869ea349d69489.svn-base
2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/**
\ * Copyright © 2012-2013 <a href="">JeeSite</a> All rights reserved.
*/
package com.thinkgem.jeesite.modules.cms.entity;
import java.util.Date;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.modules.sys.entity.User;
/**
* 链接Entity
* @author ThinkGem
* @version 2013-05-15
*/
public class Link extends DataEntity<Link> {
private static final long serialVersionUID = 1L;
private Category category;// 分类编号
private String title; // 链接名称
private String color; // 标题颜色(red:红色;green:绿色;blue:蓝色;yellow:黄色;orange:橙色)
private String image; // 链接图片
private String href; // 链接地址
private Integer weight; // 权重,越大越靠前
private Date weightDate;// 权重期限,超过期限,将weight设置为0
private User user; //关联用户
public Link() {
super();
this.weight = 0;
}
public Link(String id){
this();
this.id = id;
}
public Link(Category category){
this();
this.category = category;
}
@NotNull
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
@Length(min=1, max=255)
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
@Length(min=0, max=50)
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
@Length(min=0, max=255)
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
@Length(min=0, max=255)
public String getHref() {
return href;
}
public void setHref(String href) {
this.href = href;
}
public Integer getWeight() {
return weight;
}
public void setWeight(Integer weight) {
this.weight = weight;
}
public Date getWeightDate() {
return weightDate;
}
public void setWeightDate(Date weightDate) {
this.weightDate = weightDate;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
}