dk.netarkivet.harvester.datamodel
Class DomainOwnerInfo

java.lang.Object
  extended by dk.netarkivet.harvester.datamodel.DomainOwnerInfo
All Implemented Interfaces:
java.lang.Comparable

public class DomainOwnerInfo
extends java.lang.Object
implements java.lang.Comparable

This class manages owner information about a domain. Immutable.


Constructor Summary
DomainOwnerInfo(java.util.Date d, java.lang.String info)
          Create new instance.
 
Method Summary
 int compareTo(java.lang.Object other)
          Compares two DomainOwnerInfo objects using dates.
 java.util.Date getDate()
          Gets the date.
(package private)  long getID()
          Get the ID of this ownerinfo.
 java.lang.String getInfo()
          Gets the owner information.
(package private)  boolean hasID()
          Check if this ownerinfo has an ID set yet (doesn't happen until the DBDAO persists it).
(package private)  void setID(long id)
          Set the ID of this ownerinfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainOwnerInfo

public DomainOwnerInfo(java.util.Date d,
                       java.lang.String info)
Create new instance.

Parameters:
d - the date the owner information is registered
info - the owner information
Method Detail

getInfo

public java.lang.String getInfo()
Gets the owner information.

Returns:
the owner information

getDate

public java.util.Date getDate()
Gets the date.

Returns:
the date

getID

long getID()
Get the ID of this ownerinfo. Only for use by DBDAO

Returns:
the ID of this ownerinfo object

setID

void setID(long id)
Set the ID of this ownerinfo. Only for use by DBDAO.

Parameters:
id - use this id for this ownerinfo

hasID

boolean hasID()
Check if this ownerinfo has an ID set yet (doesn't happen until the DBDAO persists it).

Returns:
true, if this ownerinfo-object has an ID

compareTo

public int compareTo(java.lang.Object other)
Compares two DomainOwnerInfo objects using dates.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
other - is a non-null DomainOwnerInfo.
Throws:
java.lang.ClassCastException - if other is not an DomainOwnerInfo object.
See Also:
Comparable.compareTo(java.lang.Object)