uk.ac.ebi.intenz.domain.history
Class HistoryEvent

java.lang.Object
  extended by uk.ac.ebi.intenz.domain.DomainObject
      extended by uk.ac.ebi.intenz.domain.history.HistoryEvent
All Implemented Interfaces:
Comparable<HistoryEvent>
Direct Known Subclasses:
FutureEvent

public class HistoryEvent
extends DomainObject
implements Comparable<HistoryEvent>

The history event is a structural copy of the corresponding database table, that is attributes of this class correspond to the table's columns.

History events can be deletions, transfers, etc. of enzymes.

Version:
$Revision: 1.2 $ $Date: 2008/01/28 12:33:04 $
Author:
Michael Darsow

Field Summary
protected  HistoryNode afterNode
           
protected  HistoryNode beforeNode
           
protected  Date date
           
protected  EventConstant eventClass
           
protected  Long eventId
           
protected  Long groupId
           
protected  String note
           
 
Fields inherited from class uk.ac.ebi.intenz.domain.DomainObject
id
 
Constructor Summary
HistoryEvent()
          Nothing special.
 
Method Summary
 int compareTo(HistoryEvent historyEvent)
          Makes instances of this class comparable.
 boolean equals(Object o)
          Checks if two HistoryEvent objects are equal.
 HistoryNode getAfterNode()
           
 HistoryNode getBeforeNode()
           
 Date getDate()
           
 EventConstant getEventClass()
           
 Long getEventId()
           
 Long getGroupId()
           
 String getNote()
           
 HistoryNode getRelative(HistoryNode node)
          Returns the relative node of the given node.
 int hashCode()
          Calculates a unique hash code.
 boolean isSuccessor(HistoryNode node)
          Returns true if the given node is the successor of this node.
 void setAfterNode(HistoryNode afterNode)
           
 void setBeforeNode(HistoryNode beforeNode)
           
 void setDate(Date date)
           
 void setEventClass(EventConstant eventClass)
           
 void setEventId(Long eventId)
           
 void setGroupId(Long groupId)
           
 void setNote(String note)
           
 
Methods inherited from class uk.ac.ebi.intenz.domain.DomainObject
getId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

groupId

protected Long groupId

eventId

protected Long eventId

beforeNode

protected HistoryNode beforeNode

afterNode

protected HistoryNode afterNode

eventClass

protected EventConstant eventClass

date

protected Date date

note

protected String note
Constructor Detail

HistoryEvent

public HistoryEvent()
Nothing special.

Method Detail

compareTo

public int compareTo(HistoryEvent historyEvent)
Makes instances of this class comparable.

Specified by:
compareTo in interface Comparable<HistoryEvent>
Parameters:
historyEvent - The object to be compared to this instance.
Returns:
a pos. integer if this instance is greater than, a neg. integer if it is less than or 0 if it equals o.

equals

public boolean equals(Object o)
Checks if two HistoryEvent objects are equal.

Overrides:
equals in class DomainObject
Parameters:
o - The other HistoryEvent to compare with this one.
Returns:
true, if the two objects are equal.

hashCode

public int hashCode()
Calculates a unique hash code.

Overrides:
hashCode in class DomainObject
Returns:
the hash code.

isSuccessor

public boolean isSuccessor(HistoryNode node)
Returns true if the given node is the successor of this node.

Parameters:
node - The node to be compared to this node's relatives.
Returns:
true if the given node is the successor of this node.

getRelative

public HistoryNode getRelative(HistoryNode node)
Returns the relative node of the given node.

Parameters:
node - The node of which the relative is demanded.
Returns:
The relative node or null if no relative exists.
Throws:
NullPointerException - if the given node is null.

getGroupId

public Long getGroupId()

setGroupId

public void setGroupId(Long groupId)

getEventId

public Long getEventId()

setEventId

public void setEventId(Long eventId)

getBeforeNode

public HistoryNode getBeforeNode()

setBeforeNode

public void setBeforeNode(HistoryNode beforeNode)

getAfterNode

public HistoryNode getAfterNode()

setAfterNode

public void setAfterNode(HistoryNode afterNode)

getEventClass

public EventConstant getEventClass()

setEventClass

public void setEventClass(EventConstant eventClass)

getDate

public Date getDate()

setDate

public void setDate(Date date)

getNote

public String getNote()

setNote

public void setNote(String note)


Copyright © 2013 EMBL-EBI. All Rights Reserved.