Kawai Wiki

Rev

Rev 108 | Go to most recent revision | 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
 
41
    public int getId() {
42
        return id;
60 soliveira 43
    }
44
 
194 helio.frota 45
    public void setId(int id) {
46
        this.id = id;
60 soliveira 47
    }
48
 
194 helio.frota 49
    public void setComment(String comment) {
50
        this.comment = comment;
60 soliveira 51
    }
52
 
194 helio.frota 53
    public String getComment() {
54
        return comment;
60 soliveira 55
    }
56
 
194 helio.frota 57
    public void setUser(User user) {
58
        this.user = user;
60 soliveira 59
    }
60
 
194 helio.frota 61
    public User getUser() {
62
        return user;
60 soliveira 63
    }
64
 
194 helio.frota 65
    public int getUserId() {
66
        return userId;
60 soliveira 67
    }
68
 
194 helio.frota 69
    public void setUserId(int userId) {
70
        this.userId = userId;
60 soliveira 71
    }
72
 
194 helio.frota 73
    public Date getCreatedOn() {
74
        return createdOn;
60 soliveira 75
    }
76
 
194 helio.frota 77
    public void setCreatedOn(Date createdOn) {
78
        this.createdOn = createdOn;
60 soliveira 79
    }
80
 
194 helio.frota 81
    public String getTitle() {
82
        return title;
60 soliveira 83
    }
84
 
194 helio.frota 85
    public void setTitle(String title) {
86
        this.title = title;
60 soliveira 87
    }
88
 
194 helio.frota 89
    public String getBody() {
90
        return body;
60 soliveira 91
    }
92
 
194 helio.frota 93
    public void setBody(String body) {
94
        this.body = body;
60 soliveira 95
    }
194 helio.frota 96
 
97
    public String getName() {
98
        return name;
99
    }
100
 
101
    public void setName(String name) {
102
        this.name = name;
103
    }
104
 
105
    public int getLanguageId() {
106
        return languageId;
107
    }
108
 
109
    public void setLanguageId(int languageId) {
110
        this.languageId = languageId;
111
    }
112
 
113
    public void setNew(boolean b) {
114
        this.isNew = b;
115
    }
116
 
117
    public boolean isNew() {
118
        return isNew;
119
    }
120
 
121
    public void setSystemPage(boolean b) {
122
        this.isSystemPage = b;
123
    }
124
 
125
    public boolean isSystemPage() {
126
        return isSystemPage;
127
    }
128
 
129
    public Page getPage() {
130
        Page p = new Page();
131
        p.setId(-1);
132
        p.setName(name);
133
        p.setLanguageId(languageId);
134
        p.setTitle(title);
135
        p.setBody(body);
136
        p.setDeleted(false);
137
        p.setCreatedById(userId);
138
        p.setCreatedBy(user);
139
        p.setCreatedOn(createdOn);
140
        p.setPreview(true);
141
        p.setNew(isNew);
142
        p.setSystemPage(isSystemPage);
143
        p.setComment(comment);
144
 
145
        return p;
146
    }
147
}