public class Well extends ChildItem implements Annotatable
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.
Plate
Modifier and Type | Field and Description |
---|---|
static Item |
TYPE
The type of item represented by this class.
|
Modifier and Type | Method and Description |
---|---|
Set<Annotatable> |
getAnnotatableParents()
Get the parent well, if any.
|
AnnotationSet |
getAnnotationSet()
Get the annotation set containing the annotations for this item.
|
static Well |
getById(DbControl dc,
int id)
Get a
Well item when you know the id. |
int |
getColumn()
Get the column coordinate of this well on the plate.
|
(package private) WellData |
getData()
Get the
BasicData object that holds all data for this item. |
Well |
getParent()
Get the parent well.
|
Plate |
getPlate()
Get the
Plate this event belongs to. |
Protocol |
getProtocol()
A protcol used in the creation of an item that is used
to attach annotations for the protocol parameters.
|
static ItemQuery<Well> |
getQuery(Plate plate)
Get a query configured to retrieve wells for a plate.
|
ReporterData |
getReporter()
Get the reporter in this well.
|
ReporterData |
getReporter(boolean forceInitialization)
Get the reporter in this well.
|
int |
getRow()
Get the row coordinate of this well on the plate.
|
(package private) SharedData |
getSharedParent()
Get the shareable parent item of this child item.
|
Item |
getType()
Get the type of item represented by the object.
|
Set<ItemProxy> |
getUsingItems()
Get all:
Child wells
Features derived from this well
|
boolean |
isAnnotated()
Check if this item has an annotation set.
|
boolean |
isUsed()
|
void |
removeAnnotations()
Remove all annotations from this item, by deleting the annotation set.
|
(package private) void |
setParent(Well parent)
Set the parent well.
|
void |
setReporter(ReporterData reporter)
Set the reporter of this well.
|
getPermissionForUse, getPermissionForWriteDeleteAndCreate, getPluginPermissions, initPermissions
addUsingItems, addUsingItems, checkPermission, equals, getBasicData, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getVersion
checkPermission, getPermissions, hasPermission
Well(WellData wellData)
public static Well getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
Well
item when you know the id.dc
- The DbControl
which will be used for
permission checking and database access.id
- The id of the item to loadWell
itemItemNotFoundException
- If an item with the specified
id is not foundPermissionDeniedException
- If the logged in user doesn't
have Permission.READ
permission to the itemBaseException
- If there is another errorpublic static ItemQuery<Well> getQuery(Plate plate) throws InvalidDataException
plate
- The plate to retreive wells for, null is not allowedItemQuery
objectInvalidDataException
- If required parameter is null.Plate.getEvents()
WellData getData()
BasicItem
BasicData
object that holds all data for this item.public Item getType()
Identifiable
Item
enumeration.getType
in interface Identifiable
public AnnotationSet getAnnotationSet() throws PermissionDeniedException, BaseException
Annotatable
DbControl.commit()
is
called. To check if an item has annotations without creating a new
annotation set use the Annotatable.isAnnotated()
method.getAnnotationSet
in interface Annotatable
AnnotationSet
PermissionDeniedException
- If the logged in user doesn't have
enough permissionsBaseException
- If there is another errorpublic boolean isAnnotated()
Annotatable
isAnnotated
in interface Annotatable
public void removeAnnotations() throws PermissionDeniedException, BaseException
Annotatable
removeAnnotations
in interface Annotatable
PermissionDeniedException
- If the logged in user doesn't have
write permissionBaseException
- If there is another errorpublic Set<Annotatable> getAnnotatableParents() throws BaseException
getAnnotatableParents
in interface Annotatable
BaseException
- If there is an errorpublic Protocol getProtocol()
Annotatable
getProtocol
in interface Annotatable
public boolean isUsed() throws BaseException
isUsed
in class BasicItem
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
getUsingItems
in class BasicItem
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
SharedData getSharedParent()
ChildItem
ChildItem.initPermissions(int, int)
method to calculate
the logged in user's permissions for the child item.getSharedParent
in class ChildItem
public Plate getPlate() throws PermissionDeniedException, BaseException
Plate
this event belongs to.Plate
itemPermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission for the plateBaseException
- If there is another errorpublic int getRow()
public int getColumn()
public Well getParent() throws PermissionDeniedException, BaseException
PlateMapping
.Well
item or null if this plate has no
parentsPermissionDeniedException
- If the logged in user doesn't have
read permission to the parent wellBaseException
- If there is another errorvoid setParent(Well parent)
PlateMapping
when
creating new plates from a mapping. This method also sets
the reporter to the same reporter as the parent well.public ReporterData getReporter() throws PermissionDeniedException, BaseException
ReporterData
object or null if no
reporter has been specifiedPermissionDeniedException
- If the logged in user doesn't
have read permission to reportersBaseException
- If there is another errorpublic ReporterData getReporter(boolean forceInitialization)
forceInitialization
- TRUE if the initialization of
the reporter should be forced, FALSE otherwise.ReporterData
object or null if no
reporter has been specified.public void setReporter(ReporterData reporter) throws PermissionDeniedException
reporter
- The new reporter or null if the reporter is unknownPermissionDeniedException
- 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