org.itracker.model
Class Notification

java.lang.Object
  extended by org.itracker.model.AbstractEntity
      extended by org.itracker.model.Notification
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Entity>, Entity

public class Notification
extends AbstractEntity
implements Comparable<Entity>

A notification to a user about an Issue.

An Notification can only belong to 1 Issue (composition).

Author:
ready
See Also:
Serialized Form

Nested Class Summary
static class Notification.IssueUserRoleComparator
          Compares by properties issue, user, role.
static class Notification.Role
           
static class Notification.Type
           
 
Nested classes/interfaces inherited from class org.itracker.model.AbstractEntity
AbstractEntity.CreateDateComparator, AbstractEntity.IdComparator, AbstractEntity.LastModifiedDateComparator
 
Field Summary
static Comparator<Notification> ISSUE_USER_ROLE_COMPARATOR
           
static Comparator<Notification> TYPE_COMPARATOR
           
static Comparator<Notification> USER_COMPARATOR
           
 
Fields inherited from class org.itracker.model.AbstractEntity
CREATE_DATE_COMPARATOR, ID_COMPARATOR, LAST_MODIFIED_DATE_COMPARATOR
 
Constructor Summary
Notification()
          Default constructor (required by Hibernate).
Notification(User user, Issue issue, int role)
          Deprecated. use Role instead int for role
Notification(User user, Issue issue, Notification.Role role)
           
 
Method Summary
 Issue getIssue()
           
 int getNotificationRole()
          Deprecated. use getRole instead
 Notification.Role getRole()
           
 User getUser()
           
 void setIssue(Issue issue)
           
 void setNotificationRole(int role)
          Deprecated.  
 void setRole(Notification.Role role)
           
 void setUser(User user)
           
 String toString()
           
 
Methods inherited from class org.itracker.model.AbstractEntity
clone, compareTo, equals, getCreateDate, getId, getLastModifiedDate, hashCode, isNew, setCreateDate, setId, setLastModifiedDate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

TYPE_COMPARATOR

public static final Comparator<Notification> TYPE_COMPARATOR

USER_COMPARATOR

public static final Comparator<Notification> USER_COMPARATOR

ISSUE_USER_ROLE_COMPARATOR

public static final Comparator<Notification> ISSUE_USER_ROLE_COMPARATOR
Constructor Detail

Notification

public Notification()
Default constructor (required by Hibernate).

PENDING: should be private so that it can only be used by Hibernate, to ensure that the fields which form an instance's identity are always initialized/never null.


Notification

public Notification(User user,
                    Issue issue,
                    int role)
Deprecated. use Role instead int for role

Parameters:
user -
issue -
role -

Notification

public Notification(User user,
                    Issue issue,
                    Notification.Role role)
Method Detail

getIssue

public Issue getIssue()

setIssue

public void setIssue(Issue issue)

getUser

public User getUser()

setUser

public void setUser(User user)

getNotificationRole

public int getNotificationRole()
Deprecated. use getRole instead

Returns:

setNotificationRole

public void setNotificationRole(int role)
Deprecated. 

Parameters:
role -

getRole

public Notification.Role getRole()

setRole

public void setRole(Notification.Role role)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2012 itracker. All Rights Reserved.