1 31 32 package org.opencms.notification; 33 34 import org.opencms.util.CmsUUID; 35 36 import java.io.Serializable ; 37 38 49 public class CmsNotificationCause implements Serializable { 50 51 52 private static final long serialVersionUID = 257325098377830418L; 53 54 55 private int m_cause; 56 57 58 private CmsUUID m_resourceId; 59 60 66 public CmsNotificationCause(CmsUUID resource, int cause) { 67 68 m_resourceId = resource; 69 m_cause = cause; 70 } 71 72 76 public int hashCode() { 77 78 return m_cause + m_resourceId.hashCode(); 79 } 80 81 91 public boolean equals(Object o) { 92 93 if (!(o instanceof CmsExtendedNotificationCause) || !(o instanceof CmsNotificationCause)) { 94 return false; 95 } 96 return hashCode() == o.hashCode(); 97 } 98 99 104 public int getCause() { 105 106 return m_cause; 107 } 108 109 114 public CmsUUID getResourceId() { 115 116 return m_resourceId; 117 } 118 119 124 public void setCause(int cause) { 125 126 m_cause = cause; 127 } 128 129 134 public void setResourceId(CmsUUID resourceId) { 135 136 m_resourceId = resourceId; 137 } 138 } 139 | Popular Tags |