Package net.sf.basedb.core
Class PhysicalBioAssay
java.lang.Object
net.sf.basedb.core.BasicItem
net.sf.basedb.core.OwnedItem
net.sf.basedb.core.SharedItem
net.sf.basedb.core.CommonItem
net.sf.basedb.core.AnnotatedItem
net.sf.basedb.core.PhysicalBioAssay
- All Implemented Interfaces:
AccessControlled
,Annotatable
,Identifiable
,Listable
,Nameable
,Ownable
,Registered
,Removable
,Shareable
,Subtypable
A physical bioassay is a representation of the process of
performing an experiment one or more
Extract
:s.- Since:
- 3.0
- Author:
- Nicklas
- Last modified
- $Date$
-
Field Summary
Modifier and TypeFieldDescriptionprivate BioPlateEventParticipant
static final String
The id for thePhysicalBioAssayType
item representing a flow cell.private BioMaterialEvent
static final String
The id for thePhysicalBioAssayType
item representing a hybridization.static final Item
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
-
Method Summary
Modifier and TypeMethodDescriptionlong
Counts all root derived bioassays that have been created from this physical bioassay.Get the extracts and array slide.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.getAnnotatableParents
(int position, Extract extract) Get the extracts, possible on a specific assay position or only a specific extract, and the array slide.Get theArraySlide
this hyridization is using.static PhysicalBioAssay
Get aHybridization
item when you know the id.Get the event that represents the creation of this hybridization.(package private) PhysicalBioAssayData
getData()
Get theBasicData
object that holds all data for this item.Get a query that returns all derived bioassay created from this physical bioassay.Get the date that the item was registered in the database.getExtracts
(int position) Get a query that returns extracts connected to this bioassay.Get the subtype of the item.static PhysicalBioAssay
Create a newPhysicalBioAssay
item.static PhysicalBioAssay
getNew
(DbControl dc, BioPlateEventParticipant master) Create a newPhysicalBioAssay
item as part of a master bioplate event.Get the protocol from the creation event.static ItemQuery<PhysicalBioAssay>
getQuery()
Get a query that returns physical bioassays.Get a query that returns all root derived bioassay created from this physical bioassay.int
getSize()
Get the size of the bioassay.getType()
Get the type of item represented by the object.Get all: (root)DerivedBioAssay
:s created from this physical bioassayboolean
isUsed()
Check that: NoDerivedBioAssay
: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 theArraySlide
this hybridization is using.(package private) void
setBioPlateEventParticipant
(BioPlateEventParticipant bioPlateEventParticipant) void
setEntryDate
(Date entryDate) Set the date the entry was registered in the database.void
setItemSubtype
(ItemSubtype subtype) Set the subtype on the item.void
setSize
(int size) Set the size of the bioassay.Methods inherited from class net.sf.basedb.core.AnnotatedItem
getAnnotationSet, isAnnotated, removeAnnotations
Methods inherited from class net.sf.basedb.core.CommonItem
getDescription, getName, getRemovedBy, isRemoved, setDescription, setName, setRemoved
Methods inherited from class net.sf.basedb.core.SharedItem
getItemKey, getProjectKey, initPermissions, isShared, setItemKey, setProjectKey
Methods inherited from class net.sf.basedb.core.OwnedItem
getOwner, isOwner, setOwner, takeOwnership
Methods inherited from class net.sf.basedb.core.BasicItem
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
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.basedb.core.AccessControlled
checkPermission, getPermissions, hasPermission
Methods inherited from interface net.sf.basedb.core.Identifiable
getId, getVersion
Methods inherited from interface net.sf.basedb.core.Nameable
getDescription, getName, setDescription, setName
Methods inherited from interface net.sf.basedb.core.Ownable
getOwner, isOwner, setOwner, takeOwnership
-
Field Details
-
TYPE
The type of item represented by this class.- See Also:
-
HYBRIDIZATION
The id for thePhysicalBioAssayType
item representing a hybridization.- See Also:
-
CLONAL_AMPLIFICATION
The id for thePhysicalBioAssayType
item representing a flow cell.- See Also:
-
creationEvent
-
bioPlateEventParticipant
-
-
Constructor Details
-
PhysicalBioAssay
PhysicalBioAssay(PhysicalBioAssayData physicalBioAssayData)
-
-
Method Details
-
getNew
Create a newPhysicalBioAssay
item.- Parameters:
dc
- TheDbControl
which will be used for permission checking and database access- Returns:
- The new
PhysicalBioAssay
item - Throws:
BaseException
- If there is an error
-
getNew
public static PhysicalBioAssay getNew(DbControl dc, BioPlateEventParticipant master) throws BaseException Create a newPhysicalBioAssay
item as part of a master bioplate event.- Parameters:
dc
- TheDbControl
which will be used for permission checking and database accessmaster
- The master bioplate event participant or null- Returns:
- The new
PhysicalBioAssay
item - Throws:
BaseException
- If there is an error- Since:
- 2.17
-
getById
public static PhysicalBioAssay getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException Get aHybridization
item when you know the id.- Parameters:
dc
- TheDbControl
which will be used for permission checking and database access.id
- The id of the item to load- Returns:
- The
Hybridization
item - Throws:
ItemNotFoundException
- 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 error
-
getQuery
Get a query that returns physical bioassays.- Returns:
- An
ItemQuery
object
-
getData
PhysicalBioAssayData getData()Description copied from class:BasicItem
Get theBasicData
object that holds all data for this item.- Overrides:
getData
in classAnnotatedItem
-
getType
Description copied from interface:Identifiable
Get the type of item represented by the object. The returned value is one of the values defined in theItem
enumeration.- Specified by:
getType
in interfaceIdentifiable
- Returns:
- A value indicating the type of item
-
getAnnotatableParents
Get the extracts and array slide. Note that this method will include all extracts, even on bioassays with multiple positions.- Specified by:
getAnnotatableParents
in interfaceAnnotatable
- Returns:
- A set containing annotatable items, or null
- Throws:
BaseException
- If there is an error- See Also:
-
getProtocol
Get the protocol from the creation event.- Specified by:
getProtocol
in interfaceAnnotatable
- Overrides:
getProtocol
in classAnnotatedItem
- Returns:
- Always null
- Since:
- 2.2
-
getEntryDate
Description copied from interface:Registered
Get the date that the item was registered in the database.- Specified by:
getEntryDate
in interfaceRegistered
- Returns:
- A date or null if this is not known
-
setEntryDate
Description copied from interface:Registered
Set the date the entry was registered in the database. Implementations should only allow this property to be set before the item is first stored in the database. The intention of this method is to facilitate export/import of data between server.- Specified by:
setEntryDate
in interfaceRegistered
- Parameters:
entryDate
- A date or null to use today's date
-
getItemSubtype
@SupportsPushAnnotations @SubtypableRelatedItems({HARDWARE,PROTOCOL,KIT,EXTRACT}) public ItemSubtype getItemSubtype()Description copied from interface:Subtypable
Get the subtype of the item.- Specified by:
getItemSubtype
in interfaceSubtypable
- Returns:
- A subtype of null if not set
- See Also:
-
setItemSubtype
Description copied from interface:Subtypable
Set the subtype on the item.- Specified by:
setItemSubtype
in interfaceSubtypable
- Parameters:
subtype
- A subtype or null- See Also:
-
isUsed
Check that:- No
DerivedBioAssay
:s use the physical bioassay
- Overrides:
isUsed
in classBasicItem
- Returns:
- TRUE if this item is used, FALSE otherwise
- Throws:
BaseException
- If not able to tell if item is used or not.- See Also:
- No
-
getUsingItems
Get all:- (root)
DerivedBioAssay
:s created from this physical bioassay
- Overrides:
getUsingItems
in classBasicItem
- Returns:
- A set containing proxies for the items, or an empty set if no items are using this item
- See Also:
- (root)
-
onBeforeCommit
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. All events are deleted by cascade mapping in Hibernate.- Overrides:
onBeforeCommit
in classSharedItem
- Throws:
BaseException
- If there is another error- See Also:
-
getAnnotatableParents
Get the extracts, possible on a specific assay position or only a specific extract, and the array slide.- Parameters:
position
- If > 0 only include the extracts on that position in the bioassay (seeBioMaterialEventSource.getPosition()
. If <= 0 include all extracts.extract
- If not null, only include that extract (if present on the bioassay)- Throws:
BaseException
- Since:
- 3.0
-
getAnnotatableParents
public Set<Annotatable> getAnnotatableParents(int position, Collection<Extract> extracts) throws BaseException Get the extracts, possible on a specific assay position or only a given set of specific extracts, and the array slide.- Parameters:
position
- If > 0 only include the extracts on that position in the bioassay (seeBioMaterialEventSource.getPosition()
. If <= 0 include all extracts.extracts
- If not null or empty, only include the given extracts (if present on the bioassay)- Throws:
BaseException
- Since:
- 3.2
-
getCreationEvent
Get the event that represents the creation of this hybridization. Use this event to add source labeled extracts, a protocol, etc.- Returns:
- A
BioMaterialEvent
data. - Throws:
PermissionDeniedException
- If the logged in user don't have read permissionsBaseException
- If there is another error.
-
setBioPlateEventParticipant
-
getArraySlide
Get theArraySlide
this hyridization is using. A single slide can only be used on one hybridization.- Returns:
- The
ArraySlide
item - Throws:
PermissionDeniedException
- If the logged in user doesn't have read permission to the array slideBaseException
- If there is another error.
-
setArraySlide
Set theArraySlide
this hybridization is using.- Parameters:
arraySlide
- The array slide, or null- Throws:
PermissionDeniedException
- 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.
-
getSize
public int getSize()Get the size of the bioassay. The size is the number of independent positions for biomaterial. The default value is 1. -
setSize
public void setSize(int size) Set the size of the bioassay.- Parameters:
size
- A value > 0- Throws:
NumberOutOfRangeException
- If the value is <=0
-
getExtracts
Get a query that returns extracts connected to this bioassay.- Parameters:
position
- If > 0 only extracts on the specific position are returned by the query, if <= 0, all extracts are returned- Returns:
- An
ItemQuery
object
-
getDerivedBioAssays
Get a query that returns all derived bioassay created from this physical bioassay.- Returns:
- An
ItemQuery
object
-
getRootDerivedBioAssays
Get a query that returns all root derived bioassay created from this physical bioassay.- Returns:
- An
ItemQuery
object
-
countRootDerivedBioAssays
Counts all root derived bioassays that have been created from this physical bioassay. The count includes bioassays that the logged in user doesn't have access to.- Returns:
- The number of root bioassay
- Throws:
BaseException
- If the bioassay could not be counted.
-