KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > cms > entities > management > Message


1 package org.infoglue.cms.entities.management;
2
3 public class Message
4 {
5     private int id;
6     private String JavaDoc userName;
7     private Integer JavaDoc type;
8     private String JavaDoc text;
9
10     public Message(int id, String JavaDoc userName, Integer JavaDoc type, String JavaDoc newtext)
11     {
12         this.id = id;
13         this.userName = userName;
14         this.type = type;
15         
16         text = newtext;
17         if (text.length() > 256)
18         {
19             text = text.substring(0, 256);
20         }
21         text = text.replace('<', '[');
22         text = text.replace('&', '_');
23     }
24
25     public long getId()
26     {
27         return id;
28     }
29
30     public String JavaDoc getText()
31     {
32         return text;
33     }
34
35     public String JavaDoc getUserName()
36     {
37         return userName;
38     }
39
40     public Integer JavaDoc getType()
41     {
42         return type;
43     }
44 }
Popular Tags