public class BioPlateType extends BasicItem implements Nameable, Removable
Modifier and Type | Field and Description |
---|---|
static Item |
TYPE
The type of item represented by this class.
|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
Constructor and Description |
---|
BioPlateType(BioPlateTypeData data) |
Modifier and Type | Method and Description |
---|---|
Item |
getBioMaterialType()
Get the biomaterial type that can be stored on plates of
this type.
|
ItemQuery<BioPlate> |
getBioPlates()
Creates a query that returns all bioplates that are using
this type.
|
static BioPlateType |
getById(DbControl dc,
int id)
Gets a BioPlate type when knowing the item's id
|
(package private) BioPlateTypeData |
getData()
Get the
BasicData object that holds all data for this item. |
String |
getDescription()
Get the description for the item.
|
ItemSubtype |
getItemSubtype()
Get the subtype that biomaterial items should have when placed
on a plate with this bioplate type.
|
BioWell.LockMode |
getLockMode()
Get the lock mode for wells located on plates of this plate type.
|
String |
getName()
Get the name of the item.
|
static BioPlateType |
getNew(DbControl dc)
Creates a new bioplate type.
|
static ItemQuery<BioPlateType> |
getQuery()
Gets query that selects all available bioplates
|
User |
getRemovedBy()
Get the user that flagged this item for removal.
|
ItemSubtype |
getStorageType()
Get the subtype of storage location where plates of this type are usually stored.
|
Item |
getType()
Get the type of item represented by the object.
|
Set<ItemProxy> |
getUsingItems()
Gets all
BioPlates and BioPlateEventDefinitions
using this type |
boolean |
isRemoved()
Check if the removed flag is set for this item.
|
boolean |
isUsed()
Check if there are any
BioPlates or
BioPlateEventDefinitions using this type. |
void |
setBioMaterialType(Item type)
Set the type of biomaterial that can be stored on plates with
this type.
|
void |
setDescription(String description)
Set the description for the item.
|
void |
setItemSubtype(ItemSubtype subtype)
Set the subtype that biomaterial items should have when placed on a
plate with the bioplate type.
|
void |
setLockMode(BioWell.LockMode lockMode)
Set the lock mode for wells on plates of this plate type.
|
void |
setName(String name)
Set the name of the item.
|
void |
setRemoved(boolean removed)
Set the removed flag for this item.
|
void |
setStorageType(ItemSubtype storageType)
Set the subtype of storage location where plates of this type are usually stored.
|
addAnnotatableParents, addUsingItems, addUsingItems, breakCircularReferences, checkBatchAnnotatableUsage, checkPermission, equals, getBasicData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, initPermissions, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getVersion
checkPermission, getPermissions, hasPermission
public static final Item TYPE
Item.BIOPLATETYPE
,
getType()
BioPlateType(BioPlateTypeData data)
public static BioPlateType getNew(DbControl dc) throws BaseException, InvalidDataException
dc
- DbControl used for database accessBaseException
- If anything goes wrong when creatingInvalidDataException
public static BioPlateType getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
dc
- DbControl used for database accessid
- The item's id.BioPlateType
objectItemNotFoundException
- If no item with the given id was foundPermissionDeniedException
- If logged in user doesn't have read
permission to the requested itemBaseException
- If there is another error.public static ItemQuery<BioPlateType> getQuery()
ItemQuery
objectBioPlateTypeData getData()
BasicItem
BasicData
object that holds all data for this item.public Item getType()
Identifiable
Item
enumeration.getType
in interface Identifiable
public String getName()
Nameable
public void setName(String name) throws PermissionDeniedException, InvalidDataException
Nameable
Nameable.MAX_NAME_LENGTH
constant.setName
in interface Nameable
name
- The new name for the itemPermissionDeniedException
- If the logged in user doesn't
have write permissionInvalidDataException
- If the name is null or longer
than specified by the Nameable.MAX_NAME_LENGTH
constantpublic String getDescription()
Nameable
getDescription
in interface Nameable
String
with a description of the itempublic void setDescription(String description) throws PermissionDeniedException, InvalidDataException
Nameable
Nameable.MAX_DESCRIPTION_LENGTH
constant.setDescription
in interface Nameable
description
- The new description for the itemPermissionDeniedException
- If the logged in user doesn't
have write permissionInvalidDataException
- If the description longer
than specified by the Nameable.MAX_DESCRIPTION_LENGTH
constantpublic boolean isRemoved()
Removable
public void setRemoved(boolean removed) throws PermissionDeniedException
Removable
setRemoved
in interface Removable
removed
- TRUE if the item should be flagged as removed,
FALSE otherwisePermissionDeniedException
- If the logged in user doesn't
have Permission.DELETE
permission for setting the flag
to TRUE or Permission.WRITE
permission for setting the
flag to FALSEpublic User getRemovedBy() throws PermissionDeniedException, ItemNotFoundException
Removable
getRemovedBy
in interface Removable
PermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission for the userItemNotFoundException
- If the user that removed this item
can't be foundpublic boolean isUsed()
BioPlates
or
BioPlateEventDefinitions
using this type.isUsed
in class BasicItem
BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
BioPlates
and BioPlateEventDefinitions
using this typegetUsingItems
in class BasicItem
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
public Item getBioMaterialType()
Item.SAMPLE
, Item.EXTRACT
or null if the plate can store mixed typespublic void setBioMaterialType(Item type)
Item.SAMPLE
, Item.EXTRACT
,
and null. The value can't be changed
after the plate type has been saved to the database.type
- A biomaterial item type or nullPermissionDeniedException
- If the logged in user doesn't
have write permission or if the plate type has already been saved
to the databaseInvalidDataException
- If the type is not a biomaterial typepublic ItemSubtype getItemSubtype()
public void setItemSubtype(ItemSubtype subtype)
subtype
- A subtype or null if the subtype is not importantpublic ItemSubtype getStorageType()
public void setStorageType(ItemSubtype storageType)
storageType
- A subtype or null if the subtype is not importantpublic BioWell.LockMode getLockMode()
public void setLockMode(BioWell.LockMode lockMode)
lockMode
- A lock mode, null is not allowed