|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.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>
public abstract class BioMaterial<D extends BioMaterialData>
This is the base class for for the three types of biomaterials:
BioSource, Sample and Extract.
| Field Summary | |
|---|---|
static int |
MAX_EXTERNAL_ID_LENGTH
The maximum length of the external id that can be stored in the database. |
| Fields inherited from interface net.sf.basedb.core.Nameable |
|---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
| Constructor Summary | |
|---|---|
BioMaterial(D bioMaterialData)
|
|
| Method Summary | |
|---|---|
abstract long |
countChildren(boolean pooled)
Count the number of already existing children to this biomaterial. |
Set<Annotatable> |
getAnnotatableParents()
Get all child biomaterial items with a subtype that has the ItemSubtype.getPushAnnotations() flag set. |
static BioMaterial |
getById(DbControl dc,
int id)
Get a biomaterial item when you know the id. |
SpecialQuery<BioMaterialEventSource> |
getChildCreationEvents()
Get a query returning all events where this biomaterial has been used as a source item. |
String |
getExternalId()
Get the external id of the biomaterial. |
ItemSubtype |
getItemSubtype()
Get the subtype of the item. |
(package private) void |
onBeforeCommit(Transactional.Action action)
On delete action: issue an update to decrease the size of all BioMaterialList:s this is a member of. |
void |
setExternalId(String externalId)
Set the external id of the biomaterial. |
void |
setItemSubtype(ItemSubtype subtype)
Set the subtype on the item. |
| 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, getUsingItems, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, 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, getType, 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 int MAX_EXTERNAL_ID_LENGTH
setExternalId(String),
Constant Field Values| Constructor Detail |
|---|
BioMaterial(D bioMaterialData)
| Method Detail |
|---|
public static BioMaterial getById(DbControl dc,
int id)
BioMaterial. Eg. BioSource,
Sample or Extract.
dc - The DbControl which will be used for
permission checking and database access.id - The id of the item to load
Sample 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 ItemSubtype getItemSubtype()
Subtypable
getItemSubtype in interface SubtypableSubtypableRelatedItemspublic void setItemSubtype(ItemSubtype subtype)
Subtypable
setItemSubtype in interface Subtypablesubtype - A subtype or nullItemSubtype.setOnItem(Subtypable)
public Set<Annotatable> getAnnotatableParents()
throws BaseException
ItemSubtype.getPushAnnotations() flag set.
getAnnotatableParents in interface AnnotatableBaseException - If there is an error
void onBeforeCommit(Transactional.Action action)
throws NotLoggedInException,
BaseException
BioMaterialList:s this is a member of.
onBeforeCommit in class SharedItem<D extends BioMaterialData>NotLoggedInException - If no user is logged in
BaseException - If there is another errorTransactional,
Developer documentation: Transactions,
Developer documentation: Coding rules and guidelines for item classespublic String getExternalId()
public void setExternalId(String externalId)
throws PermissionDeniedException,
InvalidDataException
MAX_EXTERNAL_ID_LENGTH constant.
externalId - The new value for the external id
PermissionDeniedException - If the logged in user doesn't have
write permission
InvalidDataException - If the string is too longpublic abstract long countChildren(boolean pooled)
pooled - If TRUE, the count is for biomaterials of the same type,
if FALSE the count is for biomaterials of the child typepublic SpecialQuery<BioMaterialEventSource> getChildCreationEvents()
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||