3.1.2: 2012-07-31

net.sf.basedb.util
Class AnnotationUtil.AnnotatableWrapper

java.lang.Object
  extended by net.sf.basedb.util.AnnotationUtil.AnnotatableWrapper
Enclosing class:
AnnotationUtil

static class AnnotationUtil.AnnotatableWrapper
extends Object

This wrapper class is needed because we need to keep track of the RawBioAssay.getParentExtract() property until we have loaded the Extracts of a Physical Bioassay.

When we reach a RawBioAssay item, we remember the parent extract on that as we move up to DerivedBioAssaySet and PhysicalBioAssay. When the PhysicalBioAssay is reached we use the extract to call PhysicalBioAssay.getAnnotatableParents(int, Extract) so that we only get extracts that are linked with the correct raw bioassay.


Field Summary
private  Extract extract
           
private  Annotatable item
           
 
Constructor Summary
AnnotationUtil.AnnotatableWrapper(Annotatable item, Extract extract)
           
 
Method Summary
 boolean equals(Object o)
          A wrapper is equal to another if they references the same item and extract.
(package private)  Annotatable getAnnotatable()
          The annotatable that we are wrapping.
(package private)  Set<AnnotationUtil.AnnotatableWrapper> getAnnotatableParentWrappers()
          Get all annotatable parents wrapped inside AnnotatableWrapper:s
private static Extract getExtract(Annotatable item, Extract extract)
          Get the extract to use.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

item

private final Annotatable item

extract

private final Extract extract
Constructor Detail

AnnotationUtil.AnnotatableWrapper

AnnotationUtil.AnnotatableWrapper(Annotatable item,
                                  Extract extract)
Method Detail

getExtract

private static Extract getExtract(Annotatable item,
                                  Extract extract)
Get the extract to use. This method returns:

getAnnotatable

Annotatable getAnnotatable()
The annotatable that we are wrapping.


getAnnotatableParentWrappers

Set<AnnotationUtil.AnnotatableWrapper> getAnnotatableParentWrappers()
                                                              throws BaseException
Get all annotatable parents wrapped inside AnnotatableWrapper:s

Throws:
BaseException

equals

public boolean equals(Object o)
A wrapper is equal to another if they references the same item and extract.

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

3.1.2: 2012-07-31