Kawai Wiki

Rev

Rev 194 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
60 soliveira 1
package org.kawai.model;
2
 
3
import java.util.Date;
4
 
194 helio.frota 5
/**
6
 * Model class Preview.
7
 *
8
 * @author Sergio Oliveira
9
 *
10
 */
60 soliveira 11
public class Preview {
12
 
194 helio.frota 13
    /** Attribute id of Preview. */
14
    private int id;
15
    /** Attribute userId of Preview. */
16
    private int userId;
17
    /** Attribute user of Preview. */
18
    private User user;
19
    /** Attribute name of Preview. */
20
    private String name;
21
    /** Attribute languageId of Preview. */
22
    private int languageId;
23
    /** Attribute title of Preview. */
24
    private String title;
25
    /** Attribute body of Preview. */
26
    private String body;
27
    /** Attribute createdOn of Preview. */
28
    private Date createdOn;
29
    /** Attribute isNew of Preview. */
30
    private boolean isNew;
31
    /** Attribute isSystemPage of Preview. */
32
    private boolean isSystemPage;
33
    /** Attribute comment of Preview. */
34
    private String comment;
35
 
36
    /**
37
     * Default constructor.
38
     */
39
    public Preview() { }
40
 
195 helio.frota 41
    /**
42
     * Gets the id of Preview.
43
     * @return int
44
     */
194 helio.frota 45
    public int getId() {
46
        return id;
60 soliveira 47
    }
48
 
195 helio.frota 49
    /**
50
     * Sets the id of Preview.
51
     * @param id int
52
     */
194 helio.frota 53
    public void setId(int id) {
54
        this.id = id;
60 soliveira 55
    }
56
 
195 helio.frota 57
    /**
58
     * Sets the comment of Preview.
59
     * @param comment String
60
     */
194 helio.frota 61
    public void setComment(String comment) {
62
        this.comment = comment;
60 soliveira 63
    }
64
 
195 helio.frota 65
    /**
66
     * Gets the comment of Preview.
67
     * @return String
68
     */
194 helio.frota 69
    public String getComment() {
70
        return comment;
60 soliveira 71
    }
72
 
195 helio.frota 73
    /**
74
     * Sets the user of Preview.
75
     * @param user User
76
     */
194 helio.frota 77
    public void setUser(User user) {
78
        this.user = user;
60 soliveira 79
    }
80
 
195 helio.frota 81
    /**
82
     * Gets the user of Preview.
83
     * @return User
84
     */
194 helio.frota 85
    public User getUser() {
86
        return user;
60 soliveira 87
    }
88
 
195 helio.frota 89
    /**
90
     * Gets the userId of Preview.
91
     * @return int
92
     */
194 helio.frota 93
    public int getUserId() {
94
        return userId;
60 soliveira 95
    }
96
 
195 helio.frota 97
    /**
98
     * Sets the userId of Preview.
99
     * @param userId int
100
     */
194 helio.frota 101
    public void setUserId(int userId) {
102
        this.userId = userId;
60 soliveira 103
    }
104
 
195 helio.frota 105
    /**
106
     * Gets the createdOn date of Preview.
107
     * @return Date
108
     */
194 helio.frota 109
    public Date getCreatedOn() {
110
        return createdOn;
60 soliveira 111
    }
112
 
195 helio.frota 113
    /**
114
     * Sets the createdOn date of Preview.
115
     * @param createdOn Date
116
     */
194 helio.frota 117
    public void setCreatedOn(Date createdOn) {
118
        this.createdOn = createdOn;
60 soliveira 119
    }
120
 
195 helio.frota 121
    /**
122
     * Gets the title of Preview.
123
     * @return String
124
     */
194 helio.frota 125
    public String getTitle() {
126
        return title;
60 soliveira 127
    }
128
 
195 helio.frota 129
    /**
130
     * Sets the title of Preview.
131
     * @param title String
132
     */
194 helio.frota 133
    public void setTitle(String title) {
134
        this.title = title;
60 soliveira 135
    }
136
 
195 helio.frota 137
    /**
138
     * Gets the body of Preview.
139
     * @return String
140
     */
194 helio.frota 141
    public String getBody() {
142
        return body;
60 soliveira 143
    }
144
 
195 helio.frota 145
    /**
146
     * Sets the body of Preview.
147
     * @param body String
148
     */
194 helio.frota 149
    public void setBody(String body) {
150
        this.body = body;
60 soliveira 151
    }
194 helio.frota 152
 
195 helio.frota 153
    /**
154
     * Gets the name of Preview.
155
     * @return String
156
     */
194 helio.frota 157
    public String getName() {
158
        return name;
159
    }
160
 
195 helio.frota 161
    /**
162
     * Sets the name of Preview.
163
     * @param name String
164
     */
194 helio.frota 165
    public void setName(String name) {
166
        this.name = name;
167
    }
168
 
195 helio.frota 169
    /**
170
     * Gets the languageId of Preview.
171
     * @return int
172
     */
194 helio.frota 173
    public int getLanguageId() {
174
        return languageId;
175
    }
176
 
195 helio.frota 177
    /**
178
     * Sets the languageId of Preview.
179
     * @param languageId int
180
     */
194 helio.frota 181
    public void setLanguageId(int languageId) {
182
        this.languageId = languageId;
183
    }
184
 
195 helio.frota 185
    /**
186
     * Sets the new attribute of Preview.
187
     * @param b boolean
188
     */
194 helio.frota 189
    public void setNew(boolean b) {
190
        this.isNew = b;
191
    }
192
 
195 helio.frota 193
    /**
194
     * Return if isNew Preview.
195
     * @return boolean
196
     */
194 helio.frota 197
    public boolean isNew() {
198
        return isNew;
199
    }
200
 
195 helio.frota 201
    /**
202
     * Sets if isSystemPage of Preview.
203
     * @param b boolean
204
     */
194 helio.frota 205
    public void setSystemPage(boolean b) {
206
        this.isSystemPage = b;
207
    }
208
 
195 helio.frota 209
    /**
210
     * Returns true if isSystemPage.
211
     * @return boolean
212
     */
194 helio.frota 213
    public boolean isSystemPage() {
214
        return isSystemPage;
215
    }
216
 
195 helio.frota 217
    /**
218
     * Gets the populated page object of Preview.
219
     * @return Page
220
     */
194 helio.frota 221
    public Page getPage() {
222
        Page p = new Page();
223
        p.setId(-1);
224
        p.setName(name);
225
        p.setLanguageId(languageId);
226
        p.setTitle(title);
227
        p.setBody(body);
228
        p.setDeleted(false);
229
        p.setCreatedById(userId);
230
        p.setCreatedBy(user);
231
        p.setCreatedOn(createdOn);
232
        p.setPreview(true);
233
        p.setNew(isNew);
234
        p.setSystemPage(isSystemPage);
235
        p.setComment(comment);
236
 
237
        return p;
238
    }
239
}