View Javadoc

1   /*
2    * Copyright 2007 the original author or authors.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package net.sf.jdigg.beans;
17  
18  import org.apache.commons.lang.builder.ToStringBuilder;
19  import org.apache.commons.lang.builder.ToStringStyle;
20  
21  /*
22   * Example: <user name="leoinc" icon="http://digg.com/img/user-large/user-default.png" registered="1160475488" profileviews="265" />
23   */
24  
25  /**
26   * A Digg user.
27   * @author Philip May
28   * @since 1.0 M1
29   * @see <a href="http://apidoc.digg.com/ListStories">Digg API - List Stories</a>
30   */
31  public class User {
32  
33      private String name;
34  
35      private String icon;
36  
37      private long registered;
38  
39      private int profileviews;
40  
41      private String fullname;
42  
43      public User() {
44      }
45  
46      public String toString() {
47          return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
48      }
49  
50      public String getName() {
51          return name;
52      }
53  
54      public void setName(String name) {
55          this.name = name;
56      }
57  
58      public String getIcon() {
59          return icon;
60      }
61  
62      public void setIcon(String icon) {
63          this.icon = icon;
64      }
65  
66      public long getRegistered() {
67          return registered;
68      }
69  
70      public void setRegistered(long registered) {
71          this.registered = registered;
72      }
73  
74      public int getProfileviews() {
75          return profileviews;
76      }
77  
78      public void setProfileviews(int profileviews) {
79          this.profileviews = profileviews;
80      }
81  
82      public String getFullname() {
83          return fullname;
84      }
85  
86      public void setFullname(String fullname) {
87          this.fullname = fullname;
88      }
89  
90  }