uk.ac.ic.doc.rodex.reps
Class AttributeDomain

java.lang.Object
  extended by uk.ac.ic.doc.rodex.reps.AttributeDomain
All Implemented Interfaces:
PersistentObject

public class AttributeDomain
extends java.lang.Object
implements PersistentObject

AttributeDomain.java Represents an attribute's domain

Author:
Duc M Le dmle@doc.ic.ac.uk

Constructor Summary
AttributeDomain(java.lang.String attribute, int lower, int upper, int numRanges)
          Creates a new instance of AttributeDomain
 
Method Summary
static AttributeDomain deserialise(java.util.Map pa)
          This method guarantees that a PersistentObject can be deserialised properly from its own set of persistent attributes.
 PersistentKey getKey()
           
 java.util.Map getPersistentAttributes()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeDomain

public AttributeDomain(java.lang.String attribute,
                       int lower,
                       int upper,
                       int numRanges)
Creates a new instance of AttributeDomain

Method Detail

getKey

public PersistentKey getKey()
Specified by:
getKey in interface PersistentObject

getPersistentAttributes

public java.util.Map getPersistentAttributes()
Specified by:
getPersistentAttributes in interface PersistentObject

deserialise

public static AttributeDomain deserialise(java.util.Map pa)
                                   throws java.lang.IllegalArgumentException
This method guarantees that a PersistentObject can be deserialised properly from its own set of persistent attributes. It is a reverse of getPersistentAttributes()

Parameters:
pa - a HashMap of persistent attributes (created by {@link #getPersistentAttributes())
Throws:
java.lang.IllegalArgumentException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object