|
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<D> net.sf.basedb.core.BioMaterial<D> net.sf.basedb.core.MeasuredBioMaterial<ExtractData> net.sf.basedb.core.Extract
public class Extract
This class is used to represent extract items. An extract is
created from a Sample
or by combining other extracts
(pooling). It is also possible to create
standalone extracts, with no reference to a sample or to other
extracts.
Field Summary | |
---|---|
static Item |
TYPE
The type of item represented by this class. |
Fields inherited from class net.sf.basedb.core.BioMaterial |
---|
MAX_EXTERNAL_ID_LENGTH |
Fields inherited from interface net.sf.basedb.core.Nameable |
---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
Constructor Summary | |
---|---|
Extract(ExtractData extractData)
|
Method Summary | |
---|---|
long |
countChildren(boolean pooled)
Count the number of child extracts or labeled extracts. |
long |
countExtracts()
Counts all extracts that have been created from this extract. |
long |
countLabeledExtracts()
Gets the number of LabeledExtract that are create from this item. |
Set<Annotatable> |
getAnnotatableParents()
Get the sample or pooled extracts. |
static Extract |
getById(DbControl dc,
int id)
Get an Extract item when you know the id. |
ItemQuery<Extract> |
getChildExtracts()
Creates a query that returns all child (pooled) extracts that has this extracts as one of it's sources. |
ItemQuery<LabeledExtract> |
getLabeledExtracts()
Get a query that returns all labeled extracts created from this extract. |
static Extract |
getNew(DbControl dc)
Create a new Extract item. |
static Extract |
getNew(DbControl dc,
BioPlateEventParticipant master)
Create a new Extract item as part
of a master bioplate event. |
static ItemQuery<Extract> |
getQuery()
Get a query that returns extracts. |
Sample |
getSample()
Get the Sample that is the parent of this extract. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Get all: LabeledExtract :s created from this extract
|
boolean |
isUsed()
Check that: no LabeledExtract :s has been created from this item
no Extract :s has been created from this item
|
LabeledExtract |
newLabeledExtract(Label label,
Float usedQuantity)
Create a new LabeledExtract from this extract. |
LabeledExtract |
newLabeledExtract(Label label,
Float usedQuantity,
BioPlateEventParticipant master)
Create a new LabeledExtract from this extract as
part of a master bioplate event. |
void |
setSample(Sample sample,
Float usedQuantity)
Set the Sample item that is the parent
of this extract. |
Methods inherited from class net.sf.basedb.core.MeasuredBioMaterial |
---|
getBioWell, getCreationEvent, getEntryDate, getEvents, getOriginalQuantity, getPoolingEvents, getProtocol, getRemainingQuantity, isInWell, isLockedInWell, isPooled, newEvent, newEvent, onBeforeCommit, setBioPlateEventParticipant, setBioWell, setOriginalQuantity, setPooled, updateRemainingQuantity |
Methods inherited from class net.sf.basedb.core.BioMaterial |
---|
getExternalId, setExternalId |
Methods inherited from class net.sf.basedb.core.AnnotatedItem |
---|
getAnnotationSet, 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.EXTRACT
,
getType()
Constructor Detail |
---|
Extract(ExtractData extractData)
Method Detail |
---|
public static Extract getNew(DbControl dc) throws BaseException
Extract
item.
dc
- The DbControl
which will be used for
permission checking and database access
Extract
item
BaseException
- If there is an errorpublic static Extract getNew(DbControl dc, BioPlateEventParticipant master) throws BaseException
Extract
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 null
Extract
item
BaseException
- If there is an errorpublic static Extract getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
Extract
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 load
Extract
item
ItemNotFoundException
- If an item with the specified
id is not found
PermissionDeniedException
- If the logged in user doesn't
have read permission to the item
BaseException
- If there is another errorpublic static ItemQuery<Extract> getQuery()
ItemQuery
object.public Item getType()
Identifiable
Item
enumeration.
public Set<Annotatable> getAnnotatableParents() throws BaseException
BaseException
- If there is an errorpublic boolean isUsed() throws BaseException
LabeledExtract
:s has been created from this item
Extract
:s has been created from this item
isUsed
in class MeasuredBioMaterial<ExtractData>
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
LabeledExtract
:s created from this extract
getUsingItems
in class MeasuredBioMaterial<ExtractData>
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
public Sample getSample() throws PermissionDeniedException, BaseException
Sample
that is the parent of this extract.
Sample
object or null if this is a pooled or
standalone extract
PermissionDeniedException
- If the logged in user doesn't have read
permission for the sample
BaseException
- If there is another errorpublic void setSample(Sample sample, Float usedQuantity) throws PermissionDeniedException, InvalidDataException, BaseException
Sample
item that is the parent
of this extract.
sample
- The new Sample
itemusedQuantity
- The quantity that was used from the sample when
the extract was created
PermissionDeniedException
- If the logged in user doesn't have
write permission for this extract or use permission for the sample
InvalidDataException
- If this is a pooled extract
BaseException
- If there is another errorpublic LabeledExtract newLabeledExtract(Label label, Float usedQuantity) throws PermissionDeniedException, BaseException
LabeledExtract
from this extract.
label
- The labeling compound used to label the extractusedQuantity
- The quantity used from this extract or null
if not known
LabeledExtract
item
PermissionDeniedException
- If the logged in user doesn't have
use permission for this extract or use permission for the label
BaseException
- If there is another errorpublic LabeledExtract newLabeledExtract(Label label, Float usedQuantity, BioPlateEventParticipant master) throws PermissionDeniedException, BaseException
LabeledExtract
from this extract as
part of a master bioplate event.
label
- The labeling compound used to label the extractusedQuantity
- The quantity used from this extract or null
if not knownmaster
- The master bioplate event participant or null
LabeledExtract
item
PermissionDeniedException
- If the logged in user doesn't have
use permission for this extract or use permission for the label
BaseException
- If there is another errorpublic ItemQuery<LabeledExtract> getLabeledExtracts()
ItemQuery
objectpublic ItemQuery<Extract> getChildExtracts()
public long countLabeledExtracts() throws BaseException
LabeledExtract
that are create from this item.
LabeledExtracts
BaseException
- If there is any error.public long countExtracts() throws BaseException
BaseException
- If there is some kind of error.public long countChildren(boolean pooled)
countChildren
in class BioMaterial<ExtractData>
pooled
- TRUE = count child extracts, FALSE = count child labeled extracts
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |