Skip to content

Commit e259ddc

Browse files
committed
迭代
1 parent 0471e0d commit e259ddc

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed
Binary file not shown.

src/com/bishe/photo/entity/Photo.java

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public class Photo implements Serializable {
3333
private Integer userId;
3434

3535
private List<Comment> comments;
36+
37+
private Double voteValue;
3638

3739
public Integer getId() {
3840
return id;
@@ -74,6 +76,15 @@ public Integer getUserId() {
7476
public void setUserId(Integer userId) {
7577
this.userId = userId;
7678
}
79+
80+
81+
public Double getVoteValue() {
82+
return voteValue;
83+
}
84+
85+
public void setVoteValue(Double voteValue) {
86+
this.voteValue = voteValue;
87+
}
7788

7889
@Override
7990
public int hashCode() {
@@ -113,7 +124,31 @@ public Photo() {
113124
// TODO Auto-generated constructor stub
114125
}
115126

116-
public Photo(String name, String photoUrl, Integer belongId, Integer userId) {
127+
public Photo(Integer id, String name, String photoUrl, Integer belongId,
128+
Integer userId, List<Comment> comments, Double voteValue) {
129+
super();
130+
this.id = id;
131+
this.name = name;
132+
this.photoUrl = photoUrl;
133+
this.belongId = belongId;
134+
this.userId = userId;
135+
this.comments = comments;
136+
this.voteValue = voteValue;
137+
}
138+
139+
public Photo(Integer id, String name, String photoUrl, Integer belongId,
140+
Integer userId, List<Comment> comments) {
141+
super();
142+
this.id = id;
143+
this.name = name;
144+
this.photoUrl = photoUrl;
145+
this.belongId = belongId;
146+
this.userId = userId;
147+
this.comments = comments;
148+
}
149+
150+
public Photo(String name, String photoUrl, Integer belongId,
151+
Integer userId) {
117152
super();
118153
this.name = name;
119154
this.photoUrl = photoUrl;
@@ -125,9 +160,11 @@ public Photo(String name, String photoUrl, Integer belongId, Integer userId) {
125160
public String toString() {
126161
return "Photo [id=" + id + ", name=" + name + ", photoUrl=" + photoUrl
127162
+ ", belongId=" + belongId + ", userId=" + userId
128-
+ ", comments=" + comments + "]";
163+
+ ", comments=" + comments + ", voteValue=" + voteValue + "]";
129164
}
130165

166+
167+
131168

132169

133170

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy