Package net.sf.basedb.core
Class Well
java.lang.Object
net.sf.basedb.core.BasicItem
net.sf.basedb.core.ChildItem
net.sf.basedb.core.Well
- All Implemented Interfaces:
AccessControlled
,Annotatable
,Identifiable
A well is located on a
Plate
and contains a ReporterData
.
If the plate the well is located on was created from some other plates
via a PlateMapping
the well also contains a reference back
to the parent well on one of the source plates.
Once the well has been saved to the database it cannot be modified, except for annotations.
- Version:
- 2.0
- Author:
- Nicklas
- See Also:
- Last modified
- $Date: 2017-05-22 14:35:27 +0200 (må, 22 maj 2017) $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the parent well, if any.Get the annotation set containing the annotations for this item.static Well
Get aWell
item when you know the id.int
Get the column coordinate of this well on the plate.(package private) WellData
getData()
Get theBasicData
object that holds all data for this item.Get the parent well.getPlate()
Get thePlate
this event belongs to.A protcol used in the creation of an item that is used to attach annotations for the protocol parameters.Get a query configured to retrieve wells for a plate.Get the reporter in this well.getReporter
(boolean forceInitialization) Get the reporter in this well.int
getRow()
Get the row coordinate of this well on the plate.(package private) SharedData
Get the shareable parent item of this child item.getType()
Get the type of item represented by the object.Get all: Child wells Features derived from this wellboolean
Check if this item has an annotation set.boolean
isUsed()
void
Remove all annotations from this item, by deleting the annotation set.(package private) void
Set the parent well.void
setReporter
(ReporterData reporter) Set the reporter of this well.Methods 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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.basedb.core.AccessControlled
checkPermission, getPermissions, hasPermission
Methods inherited from interface net.sf.basedb.core.Identifiable
getId, getVersion
-
Field Details
-
Constructor Details
-
Well
Well(WellData wellData)
-
-
Method Details
-
getById
public static Well getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException Get aWell
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
Well
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.- Parameters:
plate
- The plate to retreive wells for, null is not allowed- Returns:
- An
ItemQuery
object - Throws:
InvalidDataException
- If required parameter is null.- See Also:
-
getData
WellData 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.- Specified by:
getType
in interfaceIdentifiable
- Returns:
- A value indicating the type of item
-
getAnnotationSet
Description copied from interface:Annotatable
Get the annotation set containing the annotations for this item. If the item doesn't have any annotations a new annotation set is created and automatically saved to the database whenDbControl.commit()
is called. To check if an item has annotations without creating a new annotation set use theAnnotatable.isAnnotated()
method.- Specified by:
getAnnotationSet
in interfaceAnnotatable
- Returns:
- An
AnnotationSet
- Throws:
PermissionDeniedException
- If the logged in user doesn't have enough permissionsBaseException
- If there is another error
-
isAnnotated
public boolean isAnnotated()Description copied from interface:Annotatable
Check if this item has an annotation set. The annotation set may be empty.- Specified by:
isAnnotated
in interfaceAnnotatable
- Returns:
- TRUE if an annotation set exists, FALSE otherwise
-
removeAnnotations
Description copied from interface:Annotatable
Remove all annotations from this item, by deleting the annotation set.- Specified by:
removeAnnotations
in interfaceAnnotatable
- Throws:
PermissionDeniedException
- If the logged in user doesn't have write permissionBaseException
- If there is another error
-
getAnnotatableParents
Get the parent well, if any.- Specified by:
getAnnotatableParents
in interfaceAnnotatable
- Returns:
- A set containing annotatable items, or null
- Throws:
BaseException
- If there is an error
-
getProtocol
Description copied from interface:Annotatable
A protcol used in the creation of an item that is used to attach annotations for the protocol parameters.- Specified by:
getProtocol
in interfaceAnnotatable
- Returns:
- Always null
- Since:
- 2.2
-
isUsed
- Overrides:
isUsed
in classBasicItem
- Returns:
- TRUE if this item is used, FALSE otherwise
- Throws:
BaseException
- If not able to tell if item is used or not.- See Also:
-
getUsingItems
Get all:- Child wells
- Features derived from this well
- Overrides:
getUsingItems
in classBasicItem
- Returns:
- A set containing proxies for the items, or an empty set if no items are using this item
- Since:
- 2.2
- See Also:
-
getPlate
Get thePlate
this event belongs to.- Returns:
- The
Plate
item - Throws:
PermissionDeniedException
- If the logged in user doesn't havePermission.READ
permission for the plateBaseException
- If there is another error
-
getRow
public int getRow()Get the row coordinate of this well on the plate. -
getColumn
public int getColumn()Get the column coordinate of this well on the plate. -
getParent
Get the parent well. The parent well is one of the wells on one of the parent plates if the plate this well is on was created by aPlateMapping
.- Returns:
- A
Well
item or null if this plate has no parents - Throws:
PermissionDeniedException
- If the logged in user doesn't have read permission to the parent wellBaseException
- If there is another error
-
setParent
Set the parent well. Used byPlateMapping
when creating new plates from a mapping. This method also sets the reporter to the same reporter as the parent well. -
getReporter
Get the reporter in this well.- Returns:
- A
ReporterData
object or null if no reporter has been specified - Throws:
PermissionDeniedException
- If the logged in user doesn't have read permission to reportersBaseException
- If there is another error
-
getReporter
Get the reporter in this well. The initialization of the reporter can be forced.- Parameters:
forceInitialization
- TRUE if the initialization of the reporter should be forced, FALSE otherwise.- Returns:
- A
ReporterData
object or null if no reporter has been specified. - Since:
- 2.13
-
setReporter
Set the reporter of this well.- Parameters:
reporter
- The new reporter or null if the reporter is unknown- Throws:
PermissionDeniedException
- If this well has been saved to the database or a parent well has been set (in which case the reporter must always be the same as for the parent) or the logged in user doesn't have write permission for the well or use permission for reporters
-