uk.ac.ebi.intact.application.editor.struts.view
Class AbstractEditKeyBean

java.lang.Object
  |
  +--uk.ac.ebi.intact.application.editor.struts.view.AbstractEditBean
        |
        +--uk.ac.ebi.intact.application.editor.struts.view.AbstractEditKeyBean
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CommentBean, XreferenceBean

public abstract class AbstractEditKeyBean
extends AbstractEditBean

Generic edit bean with keys. Acts as a super class for CommentBean and XreferenceBean classes.

Version:
$Id: AbstractEditKeyBean.java,v 1.3 2004/03/17 17:19:54 smudali Exp $
Author:
Sugath Mudali (smudali@ebi.ac.uk)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.ebi.intact.application.editor.struts.view.AbstractEditBean
SAVE, VIEW
 
Constructor Summary
AbstractEditKeyBean()
          Default constructor; the internal key is set to a default value.
AbstractEditKeyBean(long key)
          Constructs with given key.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compares obj with this object according to Java's equals() contract.
 long getKey()
          Returns the key assigned to this bean.
protected  void reset()
          Resets the internal key.
 
Methods inherited from class uk.ac.ebi.intact.application.editor.struts.view.AbstractEditBean
equals, getEditState, getLink, setEditState
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEditKeyBean

public AbstractEditKeyBean()
Default constructor; the internal key is set to a default value.


AbstractEditKeyBean

public AbstractEditKeyBean(long key)
Constructs with given key.

Parameters:
key -
Method Detail

equals

public final boolean equals(java.lang.Object obj)
Compares obj with this object according to Java's equals() contract. Only returns true if the internal keys for both objects match. Made it final to allow slice comparision without violating transitivity law for equals() method.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare.

getKey

public long getKey()
Returns the key assigned to this bean.

Returns:
the key as a long.

reset

protected void reset()
Resets the internal key. This is important as we want the application to believe that we are dealing with a new edit bean but without actually creating a new one.



IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk