edu.jhu.tmaj.beans
Class ArrayCoreReferenceBean

java.lang.Object
  extended by edu.jhu.tmaj.beans.ArrayCoreReferenceBean
All Implemented Interfaces:
java.io.Serializable

public final class ArrayCoreReferenceBean
extends java.lang.Object
implements java.io.Serializable

This bean queries the Specimen, Block, and TissueDiagnosis tables so that ArrayBuilder can quickly lookup background information on any TissueDiagnosisID, which every ArrayCore contains. This bean is generally initialized with an ArrayBlockID, thus getting all the TissueDiagnosisID's in the specified ArrayBlock. As users add more individual TissueDiagnosisIDs to the ArrayBlock, those are looked up as well. This bean can also be initialized with a single TissueDiagnosisID. Then bean is then sent back to the client, and is used to update the ArrayCoreReferenceBean there.

See Also:
Serialized Form

Constructor Summary
ArrayCoreReferenceBean()
           
 
Method Summary
 void addBean(JBean bean)
          Add either a SpecimenBean,BlockBean, or TissueDiagnosisBean.
 java.util.Collection<JBean> getAllTissueDiagnosisBeans()
           
 BlockBean getBlockBean(int blockID)
           
 SpecimenBean getSpecimenBean(int specimenID)
           
 TissueDiagnosisBean getTissueDiagnosisBean(int tissueDiagnosisID)
           
 void initializeWithArrayBlock(int arrayBlockID)
          Initializes the data in this class with an ArrayBlockID.
 void initializeWithTissueDiagnosisID(int tissueDiagnosisID)
          Initializes this bean with a TissueDiagnosisID.
 boolean isTissueDiagnosisLookedUp(int tissueDiagnosisID)
          Returns true if this bean has information about the specified TissueDiagnosisID
 void update(ArrayCoreReferenceBean bean)
          Adds the information in this ArrayCoreReferenceBean with that of the specified ArrayCoreReferenceBean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayCoreReferenceBean

public ArrayCoreReferenceBean()
Method Detail

addBean

public void addBean(JBean bean)
Add either a SpecimenBean,BlockBean, or TissueDiagnosisBean.


update

public void update(ArrayCoreReferenceBean bean)
Adds the information in this ArrayCoreReferenceBean with that of the specified ArrayCoreReferenceBean. This call is performed on the client side to update this bean with one obtained from the server. This allows the client to keep the same reference to this bean, which is useful as it often passed around between methods and classes.


initializeWithArrayBlock

public void initializeWithArrayBlock(int arrayBlockID)
                              throws java.sql.SQLException
Initializes the data in this class with an ArrayBlockID. Called on the Server.

Throws:
java.sql.SQLException

initializeWithTissueDiagnosisID

public void initializeWithTissueDiagnosisID(int tissueDiagnosisID)
                                     throws java.sql.SQLException
Initializes this bean with a TissueDiagnosisID.

Throws:
java.sql.SQLException

getSpecimenBean

public SpecimenBean getSpecimenBean(int specimenID)

getBlockBean

public BlockBean getBlockBean(int blockID)

getTissueDiagnosisBean

public TissueDiagnosisBean getTissueDiagnosisBean(int tissueDiagnosisID)

getAllTissueDiagnosisBeans

public java.util.Collection<JBean> getAllTissueDiagnosisBeans()

isTissueDiagnosisLookedUp

public boolean isTissueDiagnosisLookedUp(int tissueDiagnosisID)
Returns true if this bean has information about the specified TissueDiagnosisID