|
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<ProtocolTypeData> net.sf.basedb.core.ProtocolType
public class ProtocolType
This class is used to represent the type of the
Protocol
items in BASE.
Protocol
Field Summary | |
---|---|
static String |
EXTRACTION
The ID for the extraction protocol type, for example a protocol used when creating an Extract from a Sample . |
static String |
FEATURE_EXTRACTION
The ID for the feature extraction protocol type, for example a protocol used for analysing one or more images to create a raw data file. |
static String |
HYBRIDIZATION
The ID for the hybridization protocol type, for example a protocol used when creating a Hybridization from a set of
LabeledExtract :s. |
static String |
LABELING
The ID for the labeling protocol type, for example a protocol used when creating a LabeledExtract from
an Extract . |
static String |
POOLING
The ID for the pooling protocol type, for example a protocol used when creating a biomaterial item ( Sample ,
Extract or LabeledExtract )
from a set of other biomaterial items. |
static String |
PRINTING
The ID for the printing protocol type, for example a protocol used when printing a batch of array slides using a print robot. |
static String |
SAMPLING
The ID for the sampling protocol type, for example a protocol used when creating a Sample from a BioSource . |
static String |
SCANNING
The ID for the scanning protocol type, for example a protocol used for scanning the microarray slide after an experiment. |
static Item |
TYPE
The type of item represented by this class. |
Fields inherited from interface net.sf.basedb.core.Nameable |
---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
Fields inherited from interface net.sf.basedb.core.SystemItem |
---|
MAX_SYSTEM_ID_LENGTH |
Constructor Summary | |
---|---|
ProtocolType(ProtocolTypeData data)
Creates a new protocoltype item. |
Method Summary | |
---|---|
static ProtocolType |
getById(DbControl dc,
int id)
Get a ProtocolType object when you know the ID. |
String |
getDescription()
Get the description for the item. |
Date |
getEntryDate()
Get the date that the item was registered in the database. |
String |
getName()
Get the name of the item. |
static ProtocolType |
getNew(DbControl dc)
Create a new FileType item. |
ItemQuery<Protocol> |
getProtocols()
Get a query that returns all protocols of this type |
static ItemQuery<ProtocolType> |
getQuery()
Get a query configured to retrieve protocol types. |
String |
getSystemId()
Get the system id for the item. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Get all: Protocol :s of this type
PlateEventType :s using this protocol type
|
(package private) void |
initPermissions(int granted,
int denied)
If this is a system protocol type, delete and create permissions are revoked. |
boolean |
isRemoved()
Check if the removed flag is set for this item. |
boolean |
isSystemItem()
Check if the item is a system item or not. |
boolean |
isUsed()
Check if: A Protocol of this type exists
A PlateEventType is linked to this protocol type
|
Protocol |
newProtocol()
Create a new Protocol item of this type. |
void |
setDescription(String description)
Set the description for the item. |
void |
setName(String name)
Set the name of the item. |
void |
setRemoved(boolean removed)
Set the removed flag for this item. |
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, onBeforeCommit, 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 |
Field Detail |
---|
public static final Item TYPE
Item.PROTOCOLTYPE
,
getType()
public static final String SAMPLING
Sample
from a BioSource
.
public static final String EXTRACTION
Extract
from a Sample
.
public static final String LABELING
LabeledExtract
from
an Extract
.
public static final String POOLING
Sample
,
Extract
or LabeledExtract
)
from a set of other biomaterial items.
public static final String HYBRIDIZATION
Hybridization
from a set of
LabeledExtract
:s.
public static final String PRINTING
public static final String SCANNING
public static final String FEATURE_EXTRACTION
Constructor Detail |
---|
ProtocolType(ProtocolTypeData data)
data
- The dataMethod Detail |
---|
public static ProtocolType getNew(DbControl dc) throws BaseException
FileType
item.
dc
- The DbControl
which will be used for
permission checking and database access
FileType
item
BaseException
- If there is an errorpublic static ProtocolType getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
ProtocolType
object 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
ProtocolType
item
ItemNotFoundException
- If an item with the specified ID is not found
PermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission to the items
BaseException
- If there is an errorpublic static ItemQuery<ProtocolType> getQuery()
ItemQuery
objectpublic Item getType()
Identifiable
Item
enumeration.
getType
in interface Identifiable
public String getName()
Nameable
getName
in interface Nameable
String
with the name of the itempublic void setName(String name) throws PermissionDeniedException, InvalidDataException
Nameable
Nameable.MAX_NAME_LENGTH
constant.
setName
in interface Nameable
name
- The new name for the item
PermissionDeniedException
- If the logged in user doesn't
have write permission
InvalidDataException
- If the name is null or longer
than specified by the Nameable.MAX_NAME_LENGTH
constantpublic String getDescription()
Nameable
getDescription
in interface Nameable
String
with a description of the itempublic void setDescription(String description) throws PermissionDeniedException, InvalidDataException
Nameable
Nameable.MAX_DESCRIPTION_LENGTH
constant.
setDescription
in interface Nameable
description
- The new description for the item
PermissionDeniedException
- If the logged in user doesn't
have write permission
InvalidDataException
- If the description longer
than specified by the Nameable.MAX_DESCRIPTION_LENGTH
constantpublic boolean isRemoved()
Removable
isRemoved
in interface Removable
public void setRemoved(boolean removed) throws PermissionDeniedException
Removable
setRemoved
in interface Removable
removed
- TRUE if the item should be flagged as removed,
FALSE otherwise
PermissionDeniedException
- If the logged in user doesn't
have Permission.DELETE
permission for setting the flag
to TRUE or Permission.WRITE
permission for setting the
flag to FALSEpublic String getSystemId()
SystemItem
getSystemId
in interface SystemItem
public boolean isSystemItem()
SystemItem
isSystemItem
in interface SystemItem
public Date getEntryDate()
Registered
getEntryDate
in interface Registered
public boolean isUsed() throws BaseException
Protocol
of this type exists
PlateEventType
is linked to this protocol type
isUsed
in class BasicItem<ProtocolTypeData>
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
Protocol
:s of this type
PlateEventType
:s using this protocol type
getUsingItems
in class BasicItem<ProtocolTypeData>
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
void initPermissions(int granted, int denied) throws BaseException
initPermissions
in class BasicItem<ProtocolTypeData>
granted
- Permissions that have been granted by the subclassdenied
- Permissions that have been denied by the subclass
BaseException
- If the permissions couldn't be initialisedpublic Protocol newProtocol() throws PermissionDeniedException, BaseException
Protocol
item of this type.
Protocol
object
PermissionDeniedException
- This exception is thrown if
the logged in user doesn't have Permission.USE
permission for this protocol type
BaseException
- This exception is thrown if there is another
errorpublic ItemQuery<Protocol> getProtocols()
ItemQuery
object
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |