public class Kit extends AnnotatedItem implements Registered, Subtypable
Modifier and Type | Field and Description |
---|---|
static String |
CLUSTER_GENERATION
The ID for the cluster generation (in a flow cell) kit type, for example
a protocol used when creating a
PhysicalBioAssay . |
static String |
EXTRACTION
|
static String |
HYBRIDIZATION
The ID for the hybridization kit type, for example a kit
used when creating a
PhysicalBioAssay from a set of
(labeled) Extract :s. |
static String |
LABELING
The ID for the labeling kit type, for example a kit
used when creating a labeled extract from an
Extract . |
static String |
LIBRARY_PREPARATION
The ID for the library preparation kit type, for example a kit
used when creating a library extract from an
Extract . |
static String |
SAMPLING
|
static String |
SEQUENCING
The ID for the sequencing kit type, for example a kit
used when creating a
DerivedBioAssay from a PhysicalBioAssay . |
private static Item |
TYPE
The type of item represented by this class.
|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
Constructor and Description |
---|
Kit(KitData data)
Creates a new kit item.
|
Modifier and Type | Method and Description |
---|---|
Set<Annotatable> |
getAnnotatableParents()
Get all parents objects which are annotatable and the logged in
user has read permission to.
|
static Kit |
getById(DbControl dc,
int id)
Get a
Kit item when you know the ID. |
(package private) KitData |
getData()
Get the
BasicData object that holds all data for this item. |
static String |
getDefaultSystemId(Item itemType)
Get the system id for the kit subtype that should be used on an item
that doesn't have a subtype.
|
Date |
getEntryDate()
Get the date that the item was registered in the database.
|
Date |
getExpirationDate()
Get the expiration date of the kit.
|
ItemSubtype |
getItemSubtype()
Get the subtype of the item.
|
static Kit |
getNew(DbControl dc)
Create a new
Kit item. |
static ItemQuery<Kit> |
getQuery()
Get a query configured to retrieve kits.
|
Item |
getType()
Get the type of item represented by the object.
|
Set<ItemProxy> |
getUsingItems()
Get all:
BioMaterial :s and PhysicalBioAssay :s using this kit
BioPlateEvent :s with this kit
DerivedBioAssay : with this kit
|
boolean |
isInactive()
Check if the kit is inactive.
|
boolean |
isUsed()
Check if:
a
BioMaterialEvent is linked to this kit
a BioPlateEvent is linked to this kit
|
void |
setExpirationDate(Date expirationDate)
Set the expiration date.
|
void |
setInactive(boolean inactive)
Set the inactive flag.
|
void |
setItemSubtype(ItemSubtype subtype)
Set the subtype on the item.
|
getAnnotationSet, getProtocol, isAnnotated, removeAnnotations
getDescription, getName, getRemovedBy, isRemoved, setDescription, setName, setRemoved
getItemKey, getProjectKey, initPermissions, isShared, onBeforeCommit, 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
private static final Item TYPE
public static final String SAMPLING
public static final String EXTRACTION
public static final String LABELING
Extract
.public static final String LIBRARY_PREPARATION
Extract
.public static final String HYBRIDIZATION
PhysicalBioAssay
from a set of
(labeled) Extract
:s.public static final String CLUSTER_GENERATION
PhysicalBioAssay
.public static final String SEQUENCING
DerivedBioAssay
from a PhysicalBioAssay
.Kit(KitData data)
data
- the datapublic static String getDefaultSystemId(Item itemType)
Subtypable
items with a
null ItemSubtype
and all other non-subtypable items which can be
linked to a kit.itemType
- The item typepublic static Kit getNew(DbControl dc) throws BaseException
Kit
item.dc
- The DbControl
which will be used for
permission checking and database access.Kit
itemBaseException
- This exception is thrown if there is another
errorpublic static Kit getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
Kit
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 loadKit
itemItemNotFoundException
- If an item with the specified ID is not foundPermissionDeniedException
- If the logged in user doesn't
have Permission.READ
permission to the itemBaseException
- If there is another errorpublic static ItemQuery<Kit> getQuery() throws BaseException
ItemQuery
objectBaseException
- If getting the query fails.KitData 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 Date getEntryDate()
Registered
getEntryDate
in interface Registered
public Set<Annotatable> getAnnotatableParents()
Annotatable
Subtypable
item that has a subtype
with the ItemSubtype.getPushAnnotations()
flag set.getAnnotatableParents
in interface Annotatable
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
BioMaterialEvent
is linked to this kit
BioPlateEvent
is linked to this kit
isUsed
in class BasicItem
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
BioMaterial
:s and PhysicalBioAssay
:s using this kit
BioPlateEvent
:s with this kit
DerivedBioAssay
: with this kit
getUsingItems
in class BasicItem
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
public boolean isInactive()
public void setInactive(boolean inactive) throws PermissionDeniedException
inactive
- TRUE if the kit is inactive, FALSE otherwise.PermissionDeniedException
- If the logged in user doesn't
have write permission on the item.public Date getExpirationDate()
public void setExpirationDate(Date expirationDate)
expirationDate
- A date or nullPermissionDeniedException
- If the logged in user doesn't
have write permission on the item.