|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.BasicItem<D> net.sf.basedb.core.OwnedItem<D> net.sf.basedb.core.SharedItem<D> net.sf.basedb.core.CommonItem<D> net.sf.basedb.core.AnnotatedItem<BioPlateData> net.sf.basedb.core.BioPlate
public class BioPlate
This class is represents physical bio-plates. A bio-plate must have
a PlateGeometry
A bio-plate consists of BioWell
:s which are organised into rows and
columns as specified by the plate geometry.
Field Summary | |
---|---|
static int |
MAX_BARCODE_LENGTH
The maximum length of the barcode that can be stored in the database. |
static Item |
TYPE
The type of item represented by this class. |
Fields inherited from interface net.sf.basedb.core.Nameable |
---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
Constructor Summary | |
---|---|
BioPlate(BioPlateData annotatedData)
|
Method Summary | |
---|---|
Set<Annotatable> |
getAnnotatableParents()
Gets parent plates, always returns null |
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. |
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 freezer associated with this bio plate |
static BioPlate |
getNew(DbControl dc,
PlateGeometry plateGeometry)
Deprecated. In 2.16, use getNew(DbControl, PlateGeometry, BioPlateType) instead
Will try to find a bioplate type that is not locked to a specific biomaterial
type. If not found an exception is thrown. |
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. |
static ItemQuery<BioPlate> |
getQuery()
Gets query that selects all available bioplates |
int |
getRows()
Get the number of rows on this plate. |
int |
getTotalWells()
Get the total number of wells on this plate. |
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 |
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)
|
Methods inherited from class net.sf.basedb.core.AnnotatedItem |
---|
getAnnotationSet, getProtocol, isAnnotated, removeAnnotations, toTransferable |
Methods inherited from class net.sf.basedb.core.CommonItem |
---|
getDescription, getName, isRemoved, setDescription, setName, setRemoved, toTransferable |
Methods inherited from class net.sf.basedb.core.SharedItem |
---|
getItemKey, getProjectKey, initPermissions, isShared, setItemKey, setProjectKey, toTransferable |
Methods inherited from class net.sf.basedb.core.OwnedItem |
---|
getOwner, isOwner, setOwner, takeOwnership, toTransferable |
Methods inherited from class net.sf.basedb.core.BasicItem |
---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onRollback, setDbControl, setProjectDefaults, toString, toTransferable, validate |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.basedb.core.Identifiable |
---|
getId, getVersion |
Methods inherited from interface net.sf.basedb.core.AccessControlled |
---|
checkPermission, getPermissions, hasPermission |
Methods inherited from interface net.sf.basedb.core.Ownable |
---|
getOwner, isOwner, setOwner, takeOwnership |
Field Detail |
---|
public static final Item TYPE
Item.BIOPLATE
,
getType()
public static final int MAX_BARCODE_LENGTH
setBarcode(String)
method to avoid exceptions.
Constructor Detail |
---|
BioPlate(BioPlateData annotatedData)
Method Detail |
---|
public static BioPlate getNew(DbControl dc, PlateGeometry plateGeometry) throws BaseException, InvalidDataException
getNew(DbControl, PlateGeometry, BioPlateType)
instead
Will try to find a bioplate type that is not locked to a specific biomaterial
type. If not found an exception is thrown.
BaseException
InvalidDataException
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 plate
BaseException
- 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
object
ItemNotFoundException
- If no item with the given id was found
PermissionDeniedException
- If logged in user doesn't have enough
permission to the requested item
BaseException
- If there is another error.public static ItemQuery<BioPlate> getQuery()
ItemQuery
objectpublic Set<Annotatable> getAnnotatableParents() throws BaseException
BaseException
- If there is an errorpublic Item getType()
Identifiable
Item
enumeration.
public boolean isUsed()
MeasuredBioMaterial
on
this plate.
isUsed
in class BasicItem<BioPlateData>
BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
MeasuredBioMaterial
located on this plate
and all child plates created from this plate.
getUsingItems
in class BasicItem<BioPlateData>
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
void onBeforeCommit(Transactional.Action action) throws NotLoggedInException, BaseException
SharedItem
onBeforeCommit
in class SharedItem<BioPlateData>
NotLoggedInException
- If no user is logged in
BaseException
- If there is another errorTransactional
,
Core API overview - Transaction handling,
Coding rules and guidelines for item classespublic PlateGeometry getPlateGeometry() throws PermissionDeniedException, BaseException
PlateGeometry
of this bioplate.
PlateGeometry
item
PermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission for the plate geometry
BaseException
- If there is another errorprivate void setPlateGeometry(PlateGeometry plateGeometry) throws PermissionDeniedException, InvalidDataException
PermissionDeniedException
InvalidDataException
public BioPlateType getBioPlateType() throws PermissionDeniedException, BaseException
BioPlateType
of this bioplate.
BioPlateType
item
PermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission for the plate type
BaseException
- If there is another errorprivate void setBioPlateType(BioPlateType plateType) throws PermissionDeniedException, InvalidDataException
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 plate
InvalidDataException
- 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 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 null.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 located
BioWell
object or
null if no bio well can be foundpublic BioWell getBioWell(PlateCoordinate wellC)
wellC
- The coordinate of the well
BioWell
object or
null if no bio well can be foundpublic MeasuredBioMaterial getBioMaterial(PlateCoordinate wellC)
wellC
- The coordinate of the well
public ItemQuery<BioPlateEvent> getEvents()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |