public class PhysicalBioAssay extends AnnotatedItem implements Registered, Subtypable, Listable
Extract
:s.Modifier and Type | Field and Description |
---|---|
private BioPlateEventParticipant |
bioPlateEventParticipant |
static String |
CLONAL_AMPLIFICATION
The id for the
PhysicalBioAssayType item representing a
flow cell. |
private BioMaterialEvent |
creationEvent |
static String |
HYBRIDIZATION
The id for the
PhysicalBioAssayType item representing a
hybridization. |
static Item |
TYPE
The type of item represented by this class.
|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
Constructor and Description |
---|
PhysicalBioAssay(PhysicalBioAssayData physicalBioAssayData) |
Modifier and Type | Method and Description |
---|---|
long |
countRootDerivedBioAssays()
Counts all root derived bioassays that have been created from this physical bioassay.
|
Set<Annotatable> |
getAnnotatableParents()
Get the extracts and array slide.
|
Set<Annotatable> |
getAnnotatableParents(int position,
Collection<Extract> extracts)
Get the extracts, possible on a specific assay position or only a given set of specific
extracts, and the array slide.
|
Set<Annotatable> |
getAnnotatableParents(int position,
Extract extract)
Get the extracts, possible on a specific assay position or only a specific
extract, and the array slide.
|
ArraySlide |
getArraySlide()
Get the
ArraySlide this hyridization is using. |
static PhysicalBioAssay |
getById(DbControl dc,
int id)
Get a
Hybridization item when you know the id. |
BioMaterialEvent |
getCreationEvent()
Get the event that represents the creation of this hybridization.
|
(package private) PhysicalBioAssayData |
getData()
Get the
BasicData object that holds all data for this item. |
ItemQuery<DerivedBioAssay> |
getDerivedBioAssays()
Get a query that returns all derived bioassay created from this
physical bioassay.
|
Date |
getEntryDate()
Get the date that the item was registered in the database.
|
ItemQuery<Extract> |
getExtracts(int position)
Get a query that returns extracts connected to
this bioassay.
|
ItemSubtype |
getItemSubtype()
Get the subtype of the item.
|
static PhysicalBioAssay |
getNew(DbControl dc)
Create a new
PhysicalBioAssay item. |
static PhysicalBioAssay |
getNew(DbControl dc,
BioPlateEventParticipant master)
Create a new
PhysicalBioAssay item as part of a
master bioplate event. |
Protocol |
getProtocol()
Get the protocol from the creation event.
|
static ItemQuery<PhysicalBioAssay> |
getQuery()
Get a query that returns physical bioassays.
|
ItemQuery<DerivedBioAssay> |
getRootDerivedBioAssays()
Get a query that returns all root derived bioassay created from this
physical bioassay.
|
int |
getSize()
Get the size of the bioassay.
|
Item |
getType()
Get the type of item represented by the object.
|
Set<ItemProxy> |
getUsingItems()
Get all:
(root)
DerivedBioAssay :s created from this physical bioassay
|
boolean |
isUsed()
Check that:
No
DerivedBioAssay :s use the physical bioassay
|
(package private) void |
onBeforeCommit(Transactional.Action action)
Make sure the creation event is created at the same time this item
is created and that source biomaterials get their used quantities back
if this item is deleted.
|
void |
setArraySlide(ArraySlide arraySlide)
Set the
ArraySlide this hybridization is using. |
(package private) void |
setBioPlateEventParticipant(BioPlateEventParticipant bioPlateEventParticipant) |
void |
setItemSubtype(ItemSubtype subtype)
Set the subtype on the item.
|
void |
setSize(int size)
Set the size of the bioassay.
|
getAnnotationSet, isAnnotated, removeAnnotations
getDescription, getName, getRemovedBy, isRemoved, setDescription, setName, setRemoved
getItemKey, getProjectKey, initPermissions, isShared, setItemKey, setProjectKey
getOwner, isOwner, setOwner, takeOwnership
addAnnotatableParents, addUsingItems, addUsingItems, 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
getDescription, getName, setDescription, setName
getId, getVersion
checkPermission, getPermissions, hasPermission
getOwner, isOwner, setOwner, takeOwnership
public static final Item TYPE
Item.PHYSICALBIOASSAY
,
getType()
public static final String HYBRIDIZATION
PhysicalBioAssayType
item representing a
hybridization.public static final String CLONAL_AMPLIFICATION
PhysicalBioAssayType
item representing a
flow cell.private BioMaterialEvent creationEvent
private BioPlateEventParticipant bioPlateEventParticipant
PhysicalBioAssay(PhysicalBioAssayData physicalBioAssayData)
public static PhysicalBioAssay getNew(DbControl dc) throws BaseException
PhysicalBioAssay
item.dc
- The DbControl
which will be used for
permission checking and database accessPhysicalBioAssay
itemBaseException
- If there is an errorpublic static PhysicalBioAssay getNew(DbControl dc, BioPlateEventParticipant master) throws BaseException
PhysicalBioAssay
item as part of a
master bioplate event.dc
- The DbControl
which will be used for
permission checking and database accessmaster
- The master bioplate event participant or nullPhysicalBioAssay
itemBaseException
- If there is an errorpublic static PhysicalBioAssay getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
Hybridization
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 loadHybridization
itemItemNotFoundException
- If an item with the specified
id is not foundPermissionDeniedException
- If the logged in user doesn't
have read permission to the itemBaseException
- If there is another errorpublic static ItemQuery<PhysicalBioAssay> getQuery()
ItemQuery
objectPhysicalBioAssayData getData()
BasicItem
BasicData
object that holds all data for this item.getData
in class AnnotatedItem
public Item getType()
Identifiable
Item
enumeration.getType
in interface Identifiable
public Set<Annotatable> getAnnotatableParents() throws BaseException
getAnnotatableParents
in interface Annotatable
BaseException
- If there is an errorgetAnnotatableParents(int, Extract)
public Protocol getProtocol()
getProtocol
in interface Annotatable
getProtocol
in class AnnotatedItem
public Date getEntryDate()
Registered
getEntryDate
in interface Registered
@SupportsPushAnnotations @SubtypableRelatedItems(value={HARDWARE,PROTOCOL,KIT,EXTRACT}) public ItemSubtype getItemSubtype()
Subtypable
getItemSubtype
in interface Subtypable
SubtypableRelatedItems
public void setItemSubtype(ItemSubtype subtype)
Subtypable
setItemSubtype
in interface Subtypable
subtype
- A subtype or nullItemSubtype.setOnItem(Subtypable)
public boolean isUsed() throws BaseException
DerivedBioAssay
:s use the physical bioassay
isUsed
in class BasicItem
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
DerivedBioAssay
:s created from this physical bioassay
getUsingItems
in class BasicItem
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
void onBeforeCommit(Transactional.Action action) throws BaseException
onBeforeCommit
in class SharedItem
BaseException
- If there is another errorTransactional
,
Developer documentation: Transactions,
Developer documentation: Coding rules and guidelines for item classespublic Set<Annotatable> getAnnotatableParents(int position, Extract extract) throws BaseException
position
- If > 0 only include the extracts on that
position in the bioassay (see BioMaterialEventSource.getPosition()
.
If <= 0 include all extracts.extract
- If not null, only include that extract (if present on the
bioassay)BaseException
public Set<Annotatable> getAnnotatableParents(int position, Collection<Extract> extracts) throws BaseException
position
- If > 0 only include the extracts on that
position in the bioassay (see BioMaterialEventSource.getPosition()
.
If <= 0 include all extracts.extracts
- If not null or empty, only include the given extracts (if present on the
bioassay)BaseException
public BioMaterialEvent getCreationEvent() throws PermissionDeniedException, BaseException
BioMaterialEvent
data.PermissionDeniedException
- If the logged in user don't have read permissionsBaseException
- If there is another error.void setBioPlateEventParticipant(BioPlateEventParticipant bioPlateEventParticipant)
public ArraySlide getArraySlide() throws PermissionDeniedException, BaseException
ArraySlide
this hyridization is using. A single
slide can only be used on one hybridization.ArraySlide
itemPermissionDeniedException
- If the logged in user doesn't have
read permission to the array slideBaseException
- If there is another error.public void setArraySlide(ArraySlide arraySlide) throws PermissionDeniedException
ArraySlide
this hybridization is using.arraySlide
- The array slide, or nullPermissionDeniedException
- If the logged in user doesn't have
write permission for the hybridization or use permission for the array slideBaseException
- If there is another error.public int getSize()
public void setSize(int size)
size
- A value > 0NumberOutOfRangeException
- If the value is <=0public ItemQuery<Extract> getExtracts(int position)
position
- If > 0 only extracts on the specific position
are returned by the query, if <= 0, all extracts
are returnedItemQuery
objectpublic ItemQuery<DerivedBioAssay> getDerivedBioAssays()
ItemQuery
objectpublic ItemQuery<DerivedBioAssay> getRootDerivedBioAssays()
ItemQuery
objectpublic long countRootDerivedBioAssays() throws BaseException
BaseException
- If the bioassay could not be counted.