uk.ac.ebi.intenz.domain
Class DomainObject
java.lang.Object
uk.ac.ebi.intenz.domain.DomainObject
- Direct Known Subclasses:
- EnzymeCommissionNumber, HistoryEvent, Timeout
public class DomainObject
- extends Object
This class is the base class of most of the domain classes.
It only stores the ID.
- Version:
- $Revision: 1.2 $ $Date: 2008/01/28 12:33:13 $
- Author:
- Michael Darsow
Field Summary |
protected Long |
id
IDs can be long, therefore this data type. |
id
protected Long id
- IDs can be long, therefore this data type. Furthermore the ID is frequently used as an object
key (e.g. within a
HashMap
) and thus should be of type Long
instead of long
.
DomainObject
protected DomainObject()
- The ID is initially set to 0.
DomainObject
protected DomainObject(Long id)
- Initialises the ID.
- Parameters:
id
- the new ID.
- Throws:
NullPointerException
- if id is null
.
IllegalArgumentException
- if id is < 0.
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
getId
public Long getId()
Copyright © 2013 EMBL-EBI. All Rights Reserved.