KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > xml > multispaced > XMBeanNotificationMetaData


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.test.xml.multispaced;
8
9 /**
10  * @version <tt>$Revision: 1.1 $</tt>
11  * @author <a HREF="mailto:alex@jboss.org">Alexey Loubyansky</a>
12  */

13 public class XMBeanNotificationMetaData
14 {
15    private String JavaDoc description;
16    private String JavaDoc name;
17    private String JavaDoc notificationType;
18
19    public String JavaDoc getDescription()
20    {
21       return description;
22    }
23
24    public void setDescription(String JavaDoc description)
25    {
26       this.description = description;
27    }
28
29    public String JavaDoc getName()
30    {
31       return name;
32    }
33
34    public void setName(String JavaDoc name)
35    {
36       this.name = name;
37    }
38
39    public String JavaDoc getNotificationType()
40    {
41       return notificationType;
42    }
43
44    public void setNotificationType(String JavaDoc notificationType)
45    {
46       this.notificationType = notificationType;
47    }
48
49    public String JavaDoc toString()
50    {
51       return "[name=" + name + ", notification-type=" + notificationType + ", description=" + description + ']';
52    }
53
54    public boolean equals(Object JavaDoc o)
55    {
56       if(this == o) return true;
57       if(!(o instanceof XMBeanNotificationMetaData)) return false;
58
59       final XMBeanNotificationMetaData mBeanNotificationMetaData = (XMBeanNotificationMetaData)o;
60
61       if(description != null ? !description.equals(mBeanNotificationMetaData.description) : mBeanNotificationMetaData.description != null) return false;
62       if(name != null ? !name.equals(mBeanNotificationMetaData.name) : mBeanNotificationMetaData.name != null) return false;
63       if(notificationType != null ? !notificationType.equals(mBeanNotificationMetaData.notificationType) : mBeanNotificationMetaData.notificationType != null) return false;
64
65       return true;
66    }
67
68    public int hashCode()
69    {
70       int result;
71       result = (description != null ? description.hashCode() : 0);
72       result = 29 * result + (name != null ? name.hashCode() : 0);
73       result = 29 * result + (notificationType != null ? notificationType.hashCode() : 0);
74       return result;
75    }
76 }
77
Popular Tags