org.apache.jdo.impl.fostore
Class SubclassSet

java.lang.Object
  extended byorg.apache.jdo.impl.fostore.SubclassSet
All Implemented Interfaces:
org.netbeans.mdr.persistence.Streamable

public class SubclassSet
extends java.lang.Object
implements org.netbeans.mdr.persistence.Streamable

Represents a set of CLIDs of subclasses of a given class.

This class is public so that it can be used as a Streamable and stored in the database.

Author:
Dave Bristor

Field Summary
private  java.util.HashSet clids
          List of the clids which represent classes that are subclasses of the class indicated by the CLID in our oid.
private  OID oid
          The oid of this list of subclasses.
 
Constructor Summary
  SubclassSet()
           
private SubclassSet(OID oid, CLID clid)
          Given clid is the first entry in the list.
 
Method Summary
(package private)  void add(CLID clid)
          Add the given clid to the list.
(package private) static SubclassSet create(OID oid, CLID clid)
           
(package private)  java.util.Iterator iterator()
           
 void read(java.io.InputStream is)
          Initialize this SubclassSet from the given stream.
 void write(java.io.OutputStream os)
          Write this SubclassSet to the given stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oid

private OID oid
The oid of this list of subclasses.


clids

private java.util.HashSet clids
List of the clids which represent classes that are subclasses of the class indicated by the CLID in our oid.

Constructor Detail

SubclassSet

private SubclassSet(OID oid,
                    CLID clid)
Given clid is the first entry in the list.


SubclassSet

public SubclassSet()
Method Detail

create

static SubclassSet create(OID oid,
                          CLID clid)

add

void add(CLID clid)
Add the given clid to the list.


iterator

java.util.Iterator iterator()
Returns:
Iterator over the CLID's in this subclass list.

write

public void write(java.io.OutputStream os)
           throws org.netbeans.mdr.persistence.StorageException
Write this SubclassSet to the given stream.

Specified by:
write in interface org.netbeans.mdr.persistence.Streamable
Throws:
org.netbeans.mdr.persistence.StorageException

read

public void read(java.io.InputStream is)
          throws org.netbeans.mdr.persistence.StorageException
Initialize this SubclassSet from the given stream.

Specified by:
read in interface org.netbeans.mdr.persistence.Streamable
Throws:
org.netbeans.mdr.persistence.StorageException