Class BioWell

All Implemented Interfaces:
AccessControlled, Identifiable

public class BioWell
extends ChildItem
A biowell is located on a BioPlate and contains a MeasuredBioMaterial. The item holds information about witch row and column it is located on the bio plate.
Version:
2.10
Author:
Martin
See Also:
BioPlate
Last modified
$Date: 2008-11-27 16:33:55 +0100 (Thu, 27 Nov 2008) $
  • Field Details

  • Constructor Details

  • Method Details

    • getById

      public static BioWell getById​(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
      Get a BioWell item when you know the id.
      Parameters:
      dc - The DbControl which will be used for permission checking and database access.
      id - The id of the item to load
      Returns:
      The BioWell item
      Throws:
      ItemNotFoundException - If an item with the specified id is not found
      PermissionDeniedException - If the logged in user doesn't have Permission.READ permission to the item
      BaseException - If there is another error
    • getQuery

      public static ItemQuery<BioWell> getQuery​(BioPlate bioPlate) throws InvalidDataException
      Get a query configured to retrieve wells for a plate. A plate is always required, but if a null bioplate parameter is used the query will include a parameter "bioPlate" that must be set before the query is actuall executed. The gain is that the same query can be re-used with multiple plates.
      Parameters:
      bioPlate - The plate to retreive wells for, null is allowed but a bioplate must be set for the "bioPlate" query parameter before the query is executed
      Returns:
      An ItemQuery object
      Throws:
      InvalidDataException
      See Also:
      Plate.getEvents()
    • getData

      BioWellData getData()
      Description copied from class: BasicItem
      Get the BasicData object that holds all data for this item.
      Specified by:
      getData in class BasicItem
    • getType

      public Item getType()
      Description copied from interface: Identifiable
      Get the type of item represented by the object. The returned value is one of the values defined in the Item enumeration.
      Returns:
      A value indicating the type of item
    • getUsingItems

      public Set<ItemProxy> getUsingItems()
      Adds the MeasuredBioMaterial,used in this well, to the Set.
      Overrides:
      getUsingItems in class BasicItem
      Returns:
      A set containing proxies for the items, or an empty set if no items are using this item
      See Also:
      BasicItem.addUsingItems(Set, Item, org.hibernate.query.Query)
    • isUsed

      public boolean isUsed() throws BaseException
      Check if a MeasuredBioMaterial is linked to this bio-well
      Overrides:
      isUsed in class BasicItem
      Returns:
      TRUE if this biowell has a biomaterial connected., FALSE otherwise.
      Throws:
      BaseException - If not able to tell if item is used or not.
      See Also:
      BasicItem.getUsingItems()
    • getSharedParent

      SharedData getSharedParent()
      Description copied from class: ChildItem
      Get the shareable parent item of this child item. This is used by the ChildItem.initPermissions(int, int) method to calculate the logged in user's permissions for the child item.
      Specified by:
      getSharedParent in class ChildItem
      Returns:
      The parent item
    • getPlate

      Get the BioPlate this biowell belongs to.
      Returns:
      The BioPlate item
      Throws:
      PermissionDeniedException - If the logged in user doesn't have Permission.READ permission for the bioplate
      BaseException - If there is another error
    • getBioMaterial

      Gets the MeasuredBioMaterial connected to this biowell.
      Returns:
      a MeasuredBioMaterial item or null.
      Throws:
      PermissionDeniedException - If the logged in user doesn't have Permission.READ permission for the biomaterial.
      BaseException - If there is another error
    • getBioMaterialType

      public Item getBioMaterialType()
      Get the type of biomaterial that is placed in this well.
      Returns:
      The biomaterial type (SAMPLE or EXTRACT) or null if there is no biomaterial
      Since:
      3.2
    • getRow

      public int getRow()
      Gets the row index where this well is located.
      Returns:
      Row number as an int
    • getColumn

      public int getColumn()
      Gets the column index where this well is located.
      Returns:
      Column number as an int
    • getPlateCoordinate

      public PlateCoordinate getPlateCoordinate()
      Get the plate coordinate representation of the coordinate for this well.
      Returns:
      A PlateCoordinate object
      Since:
      2.17
    • getCoordinate

      public String getCoordinate()
      Get a string representation of the coordinate for this well. Rows are mapped to letters (0-A, 1-B, etc.). Columns are mapped to 1-based numbers (0-1, 1-2, etc.)
      Since:
      2.16
    • isEmpty

      public boolean isEmpty()
      Is this well empty?
      Since:
      2.16
    • getLockMode

      public BioWell.LockMode getLockMode()
      Get the lock mode of this well. The lock mode determines if it is possible to add biomaterial to an empty well or remove biomaterial from the well.
      Returns:
      The lock mode as determined by the plate's plate type
      Since:
      2.16
    • canAddBioMaterial

      public boolean canAddBioMaterial()
      Check if it is possible to add/change biomaterial in this well.
      Returns:
      TRUE if it is possible to add biomaterial to the well, FALSE otherwise
      Since:
      2.16
      See Also:
      BioWell.LockMode.canAdd(BioWell)
    • canClearBioMaterial

      public boolean canClearBioMaterial()
      Check if it is possible to clear the current biomaterial in this well.
      Returns:
      TRUE if it is possible to clear the well
      Since:
      2.16
      See Also:
      BioWell.LockMode.canClear(BioWell)
    • hasBeenUsed

      public boolean hasBeenUsed()
      If the original biomaterial in this well has been moved to another plate (eg. for final storage in a freezer). This property is only defined for well with lock mode=BioWell.LockMode.LOCKED_AFTER_MOVE.
      Returns:
      TRUE if the original biomaterial has been moved
      Since:
      2.16
    • getOriginalBioMaterial

      public MeasuredBioMaterial getOriginalBioMaterial()
      Get the original biomaterial that was placed in this biowell. This property is only defined for well with lock mode=BioWell.LockMode.LOCKED_AFTER_MOVE after the biomaterial has been moved.
      Returns:
      The original biomaterial
      Since:
      2.16