public class BioPlate extends AnnotatedItem implements Registered
PlateGeometry
A bio-plate consists of BioWell
:s which are organised into rows and
columns as specified by the plate geometry.
Modifier and Type | Field and Description |
---|---|
static int |
MAX_BARCODE_LENGTH
The maximum length of the barcode that can be stored in the
database.
|
static int |
MAX_POSITION_LENGTH
The maximum length of the position coordinate that can be stored in the
database.
|
static int |
MAX_SECTION_LENGTH
The maximum length of the section coordinate that can be stored in the
database.
|
static int |
MAX_TRAY_LENGTH
The maximum length of the tray coordinate that can be stored in the
database.
|
static Item |
TYPE
The type of item represented by this class.
|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
Constructor and Description |
---|
BioPlate(BioPlateData annotatedData) |
Modifier and Type | Method and Description |
---|---|
Set<Annotatable> |
getAnnotatableParents()
Get the freezer.
|
String |
getBarcode()
Gets the barcode of this bio plate.
|
MeasuredBioMaterial |
getBioMaterial(PlateCoordinate wellC)
Get the biomaterial in the well at the given location.
|
BioPlateType |
getBioPlateType()
Get the
BioPlateType of this bioplate. |
BioWell |
getBioWell(int row,
int column)
Gets bio well for specific location.
|
BioWell |
getBioWell(PlateCoordinate wellC)
Gets bio well for specific location.
|
ItemQuery<BioWell> |
getBioWells()
Gets a query that returns all
BioWell s
on this plate. |
static BioPlate |
getById(DbControl dc,
int id)
Gets a BioPlate when knowing the item's id
|
int |
getColumns()
Get the number of rows on this plate.
|
(package private) BioPlateData |
getData()
Get the
BasicData object that holds all data for this item. |
Date |
getEntryDate()
Get the date that the item was registered in the database.
|
Date |
getEventDate()
Get the date this plate was created.
|
ItemQuery<BioPlateEvent> |
getEvents()
Get a query returning events that this plate has been a part of.
|
String |
getExternalId()
Gets the external id of this bio plate
|
int |
getFreeWells()
Get the number of free wells on this plate.
|
Hardware |
getFreezer()
Gets the storage location of this bio plate
|
static BioPlate |
getNew(DbControl dc,
PlateGeometry geometry,
BioPlateType plateType)
Creates a new bioplate with a specific plate geometry and type.
|
PlateGeometry |
getPlateGeometry()
Get the
PlateGeometry of this bioplate. |
String |
getPosition()
Get the position within the "storage location" for this bioplate.
|
static ItemQuery<BioPlate> |
getQuery()
Gets query that selects all available bioplates
|
int |
getRows()
Get the number of rows on this plate.
|
String |
getSection()
Get the section within the "storage location" for this bioplate.
|
int |
getTotalWells()
Get the total number of wells on this plate.
|
String |
getTray()
Get the tray within the "storage location" for this bioplate.
|
Item |
getType()
Get the type of item represented by the object.
|
int |
getUsedWells()
Get the number of used wells on this plate.
|
Set<ItemProxy> |
getUsingItems()
Gets all
MeasuredBioMaterial located on this plate
and all child plates created from this plate. |
boolean |
isDestroyed()
Check if the plate has been destroyed.
|
boolean |
isUsed()
Check if there are any
MeasuredBioMaterial on
this plate. |
(package private) void |
onBeforeCommit(Transactional.Action action)
If a project is active, automatically share the new item according to
the settings of that project, unless a project or item key has been
explicitely set (including null).
|
void |
setBarcode(String barcode)
Sets the bio plates barcode
|
private void |
setBioPlateType(BioPlateType plateType) |
void |
setDestroyed(boolean destroyed)
Set the destroyed flag.
|
void |
setEventDate(Date eventDate)
Set the date this plate was created.
|
void |
setExternalId(String externalId)
Sets the external id of this bio plate
|
void |
setFreezer(Hardware freezer)
Sets the freezer where this bio plate is stored
|
private void |
setPlateGeometry(PlateGeometry plateGeometry) |
void |
setPosition(String position)
Set the position within the "storage location" for this bioplate.
|
void |
setSection(String section)
Set the section within the "storage location" for this bioplate.
|
void |
setTray(String tray)
Set the tray within the "storage location" for this bioplate.
|
getAnnotationSet, getProtocol, isAnnotated, removeAnnotations
getDescription, getName, getRemovedBy, isRemoved, setDescription, setName, setRemoved
getItemKey, getProjectKey, initPermissions, isShared, setItemKey, setProjectKey
getOwner, isOwner, setOwner, takeOwnership
addAnnotatableParents, addUsingItems, addUsingItems, breakCircularReferences, checkBatchAnnotatableUsage, checkPermission, equals, getBasicData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onRollback, setDbControl, setProjectDefaults, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getVersion
checkPermission, getPermissions, hasPermission
getOwner, isOwner, setOwner, takeOwnership
public static final Item TYPE
Item.BIOPLATE
,
getType()
public static final int MAX_BARCODE_LENGTH
setBarcode(String)
method to avoid exceptions.public static final int MAX_SECTION_LENGTH
setSection(String)
method to avoid exceptions.public static final int MAX_TRAY_LENGTH
setTray(String)
method to avoid exceptions.public static final int MAX_POSITION_LENGTH
setPosition(String)
method to avoid exceptions.BioPlate(BioPlateData annotatedData)
public static BioPlate getNew(DbControl dc, PlateGeometry geometry, BioPlateType plateType) throws BaseException, InvalidDataException
dc
- DbControl used for database accessgeometry
- The geometry the new plate should haveplateType
- The type of the new plateBaseException
- If anything goes wrong when creating.InvalidDataException
- If gemoetry or type is nullpublic static BioPlate getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
dc
- DbControl used for database accessid
- The item's id.BioPlate
objectItemNotFoundException
- If no item with the given id was foundPermissionDeniedException
- If logged in user doesn't have enough
permission to the requested itemBaseException
- If there is another error.public static ItemQuery<BioPlate> getQuery()
ItemQuery
objectBioPlateData getData()
BasicItem
BasicData
object that holds all data for this item.getData
in class AnnotatedItem
public Set<Annotatable> getAnnotatableParents() throws BaseException
getAnnotatableParents
in interface Annotatable
BaseException
- If there is an errorpublic Item getType()
Identifiable
Item
enumeration.getType
in interface Identifiable
public Date getEntryDate()
Registered
getEntryDate
in interface Registered
public boolean isUsed()
MeasuredBioMaterial
on
this plate.isUsed
in class BasicItem
BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
MeasuredBioMaterial
located on this plate
and all child plates created from this plate.getUsingItems
in class BasicItem
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
void onBeforeCommit(Transactional.Action action) throws NotLoggedInException, BaseException
SharedItem
onBeforeCommit
in class SharedItem
NotLoggedInException
- If no user is logged inBaseException
- If there is another errorTransactional
,
Developer documentation: Transactions,
Developer documentation: Coding rules and guidelines for item classespublic PlateGeometry getPlateGeometry() throws PermissionDeniedException, BaseException
PlateGeometry
of this bioplate.PlateGeometry
itemPermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission for the plate geometryBaseException
- If there is another errorprivate void setPlateGeometry(PlateGeometry plateGeometry) throws PermissionDeniedException, InvalidDataException
public BioPlateType getBioPlateType() throws PermissionDeniedException, BaseException
BioPlateType
of this bioplate.BioPlateType
itemPermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission for the plate typeBaseException
- If there is another errorprivate void setBioPlateType(BioPlateType plateType) throws PermissionDeniedException, InvalidDataException
public void setExternalId(String externalId) throws PermissionDeniedException, InvalidDataException
externalId
- The external id to set. Null is allowed.
Maximum length BioPlateData.MAX_EXTERNAL_ID_LENGTH
characters.PermissionDeniedException
- If logged in user doesn't have
Permission.WRITE
on the plateInvalidDataException
- If maximum length of externalId is exceeded.public String getExternalId()
public void setBarcode(String barcode) throws PermissionDeniedException, InvalidDataException
barcode
- The barcode to set. Null is allowed.
Maximum length BioPlateData.MAX_BARCODE_LENGTH
characters.PermissionDeniedException
- If logged in user doesn't have
Permission.WRITE
on the plate.InvalidDataException
- If maximum length of barcode is exceeded.public String getBarcode()
public boolean isDestroyed()
public void setDestroyed(boolean destroyed) throws PermissionDeniedException
destroyed
- TRUE if the plate is destroyed, FALSE otherwise.PermissionDeniedException
- If the logged in user doesn't
have write permission on the item.public Date getEventDate()
Date
object, or null if not knownpublic void setEventDate(Date eventDate) throws PermissionDeniedException
eventDate
- The date, or null if not knownPermissionDeniedException
- If the logged in user doesn't have
write permissionpublic void setFreezer(Hardware freezer) throws PermissionDeniedException
freezer
- The freezer to set. Null is allowed.PermissionDeniedException
- If logged in user doesn't have
Permission.WRITE
on this bio plate or
Permission.USE
on the freezer.public Hardware getFreezer()
Hardware
item or nullgetSection()
public String getSection()
public void setSection(String section)
public String getTray()
public void setTray(String tray)
public String getPosition()
public void setPosition(String position)
public ItemQuery<BioWell> getBioWells()
BioWell
s
on this plate.ItemQuery
object.public int getRows()
public int getColumns()
public int getFreeWells()
public int getUsedWells()
public int getTotalWells()
public BioWell getBioWell(int row, int column)
row
- Row index where the bio well is located.column
- Column index where the bio well is locatedBioWell
object or
null if no bio well can be foundpublic BioWell getBioWell(PlateCoordinate wellC)
wellC
- The coordinate of the wellBioWell
object or
null if no bio well can be foundpublic MeasuredBioMaterial getBioMaterial(PlateCoordinate wellC)
wellC
- The coordinate of the wellpublic ItemQuery<BioPlateEvent> getEvents()