KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > info > jtrac > domain > Tag


1 /*
2  * Copyright 2002-2005 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
17 package info.jtrac.domain;
18
19 import static info.jtrac.Constants.*;
20
21 import info.jtrac.util.XmlUtils;
22
23 import java.io.Serializable JavaDoc;
24 import java.util.HashMap JavaDoc;
25 import java.util.Map JavaDoc;
26 import org.dom4j.Element;
27
28 /**
29  * Represents a Tag as in an Item can be assigned multiple Tags
30  * allows for categorization of Items web 2.0 style
31  */

32 public class Tag implements Serializable JavaDoc {
33     
34     private long id;
35     private int type;
36     private String JavaDoc name;
37     private String JavaDoc description;
38
39     public long getId() {
40         return id;
41     }
42
43     public void setId(long id) {
44         this.id = id;
45     }
46
47     public int getType() {
48         return type;
49     }
50
51     public void setType(int type) {
52         this.type = type;
53     }
54
55     public String JavaDoc getName() {
56         return name;
57     }
58
59     public void setName(String JavaDoc name) {
60         this.name = name;
61     }
62
63     public String JavaDoc getDescription() {
64         return description;
65     }
66
67     public void setDescription(String JavaDoc description) {
68         this.description = description;
69     }
70     
71     @Override JavaDoc
72     public int hashCode() {
73         return (int) id;
74     }
75
76 }
77
Popular Tags