Package net.sf.basedb.core
Class BioWell
java.lang.Object
net.sf.basedb.core.BasicItem
net.sf.basedb.core.ChildItem
net.sf.basedb.core.BioWell
- All Implemented Interfaces:
AccessControlled
,Identifiable
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:
- Last modified
- $Date: 2008-11-27 16:33:55 +0100 (Thu, 27 Nov 2008) $
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The lock mode for a well is determined by the plate's bio plate type. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if it is possible to add/change biomaterial in this well.boolean
Check if it is possible to clear the current biomaterial in this well.Gets theMeasuredBioMaterial
connected to this biowell.Get the type of biomaterial that is placed in this well.static BioWell
Get aBioWell
item when you know the id.int
Gets the column index where this well is located.Get a string representation of the coordinate for this well.(package private) BioWellData
getData()
Get theBasicData
object that holds all data for this item.Get the lock mode of this well.Get the original biomaterial that was placed in this biowell.getPlate()
Get theBioPlate
this biowell belongs to.Get the plate coordinate representation of the coordinate for this well.Get a query configured to retrieve wells for a plate.int
getRow()
Gets the row index where this well is located.(package private) SharedData
Get the shareable parent item of this child item.getType()
Get the type of item represented by the object.Adds theMeasuredBioMaterial
,used in this well, to the Set.boolean
If the original biomaterial in this well has been moved to another plate (eg. for final storage in a freezer).boolean
isEmpty()
Is this well empty?boolean
isUsed()
Check if aMeasuredBioMaterial
is linked to this bio-wellMethods inherited from class net.sf.basedb.core.ChildItem
getPermissionForUse, getPermissionForWriteDeleteAndCreate, getPluginPermissions, initPermissions
Methods inherited from class net.sf.basedb.core.BasicItem
addAnnotatableParents, addUsingItems, addUsingItems, breakCircularReferences, checkBatchAnnotatableUsage, checkPermission, equals, getBasicData, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, validate
-
Field Details
-
TYPE
The type of item represented by this class.- See Also:
-
-
Constructor Details
-
BioWell
BioWell(BioWellData data)
-
-
Method Details
-
getById
public static BioWell getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException Get aBioWell
item when you know the id.- Parameters:
dc
- TheDbControl
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 foundPermissionDeniedException
- If the logged in user doesn't havePermission.READ
permission to the itemBaseException
- If there is another error
-
getQuery
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:
-
getData
BioWellData getData()Description copied from class:BasicItem
Get theBasicData
object that holds all data for this 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 theItem
enumeration.- Returns:
- A value indicating the type of item
-
getUsingItems
Adds theMeasuredBioMaterial
,used in this well, to the Set.- Overrides:
getUsingItems
in classBasicItem
- Returns:
- A set containing proxies for the items, or an empty set if no items are using this item
- See Also:
-
isUsed
Check if aMeasuredBioMaterial
is linked to this bio-well- Overrides:
isUsed
in classBasicItem
- 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:
-
getPlate
Get theBioPlate
this biowell belongs to.- Returns:
- The
BioPlate
item - Throws:
PermissionDeniedException
- If the logged in user doesn't havePermission.READ
permission for the bioplateBaseException
- If there is another error
-
getBioMaterial
Gets theMeasuredBioMaterial
connected to this biowell.- Returns:
- a
MeasuredBioMaterial
item or null. - Throws:
PermissionDeniedException
- If the logged in user doesn't havePermission.READ
permission for the biomaterial.BaseException
- If there is another error
-
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
Get the plate coordinate representation of the coordinate for this well.- Returns:
- A PlateCoordinate object
- Since:
- 2.17
-
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
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:
-
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:
-
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
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
-