|
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<BioSourceData> net.sf.basedb.core.BioSource
public class BioSource
This class represent biosource items. A biosource has
information about the source of material used in an experiment,
such as a cell line or patient. A biosource can be used to
create Sample
:s.
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 | |
---|---|
BioSource(BioSourceData bioSourceData)
|
Method Summary | |
---|---|
long |
countChildren(boolean pooled)
Count the number of child samples. |
long |
countSamples()
Counts all samples that have been created from this biosource. |
Set<Annotatable> |
getAnnotatableParents()
Always null. |
static BioSource |
getById(DbControl dc,
int id)
Get an BioSource item when you know the id. |
Date |
getEntryDate()
Get the date that the item was registered in the database. |
static BioSource |
getNew(DbControl dc)
Create a new BioSource item. |
static ItemQuery<BioSource> |
getQuery()
Get a query that returns biosource items. |
ItemQuery<Sample> |
getSamples()
Get a query that returns all samples created from this biosource. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Get all: Sample :s created from this biosource
|
boolean |
isUsed()
Check that: no Sample has been created from this biosource
|
Sample |
newSample()
Create a new Sample from this biosource. |
Methods inherited from class net.sf.basedb.core.BioMaterial |
---|
getExternalId, onBeforeCommit, setExternalId |
Methods inherited from class net.sf.basedb.core.AnnotatedItem |
---|
getAnnotationSet, getProtocol, 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.BIOSOURCE
,
getType()
Constructor Detail |
---|
BioSource(BioSourceData bioSourceData)
Method Detail |
---|
public static BioSource getNew(DbControl dc) throws BaseException
BioSource
item.
dc
- The DbControl
which will be used for
permission checking and database access
BioSource
item
BaseException
- If there is an errorpublic static BioSource getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
BioSource
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
BioSource
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<BioSource> getQuery()
ItemQuery
object.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 errorpublic Date getEntryDate()
Registered
getEntryDate
in interface Registered
public boolean isUsed() throws BaseException
Sample
has been created from this biosource
isUsed
in class BasicItem<BioSourceData>
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
Sample
:s created from this biosource
getUsingItems
in class BasicItem<BioSourceData>
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
public Sample newSample() throws PermissionDeniedException, BaseException
Sample
from this biosource.
Sample
item
PermissionDeniedException
- If the logged in user doesn't have
use permission for this biosource
BaseException
- If there is another errorpublic ItemQuery<Sample> getSamples()
ItemQuery
objectpublic long countSamples() throws BaseException
BaseException
- If counting the samples fails.public long countChildren(boolean pooled)
countChildren
in class BioMaterial<BioSourceData>
pooled
- If TRUE, the count is for biomaterials of the same type,
if FALSE the count is for biomaterials of the child type
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |