|
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<ExtraValueTypeData> net.sf.basedb.core.ExtraValueType
public class ExtraValueType
Defines extra values that can be calculated by plugins or some other
application and inserted as part of a BioAssaySet
. All
extra value types must have a unique external id that is used for
identification.
Currently only extra values of Type.INT
, Type.FLOAT
and Type.STRING
are supported.
ExtraValue
,
BioAssaySet.getSpotExtraValueBatcher(Class, ExtraValueType, Job)
,
BioAssaySet.getPositionExtraValueBatcher(Class, ExtraValueType, Job)
Field Summary | |
---|---|
private Coloring |
coloring
|
static int |
MAX_EXTERNAL_ID_LENGTH
The maximum length of the external id variable that can be stored in the database. |
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 |
Constructor Summary | |
---|---|
ExtraValueType(ExtraValueTypeData data)
Creates a new extra value type item. |
Method Summary | |
---|---|
Formula.AverageMethod |
getAverageMethod()
Get the average method for this extra value type. |
static ExtraValueType |
getByExternalId(DbControl dc,
String externalId)
Get a ExtraValueType when you know the external id. |
static ExtraValueType |
getById(DbControl dc,
int id)
Get an ExtraValueType object when you know the id. |
Coloring |
getColoring()
Get coloring information for this extra value. |
String |
getDescription()
Get the description for the item. |
Date |
getEntryDate()
Get the date that the item was registered in the database. |
String |
getExternalId()
Get the external id for this ExtraValueType item. |
String |
getName()
Get the name of the item. |
static ExtraValueType |
getNew(DbControl dc,
String externalId,
Type valueType)
Create a new ExtraValue item. |
static ItemQuery<ExtraValueType> |
getQuery()
Get a query configured to retrieve extra value types. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Get all: ExtraValue :s of this type
|
Type |
getValueType()
Get the value type for this extra value type. |
boolean |
isRemoved()
Check if the removed flag is set for this item. |
boolean |
isUsed()
Check if: Any ExtraValue :s of this type exists
|
void |
setAverageMethod(Formula.AverageMethod averageMethod)
Set the average method of the extra value type.. |
void |
setDescription(String description)
Set the description for the item. |
void |
setExternalId(String externalId)
Set the external id for this Client item. |
void |
setName(String name)
Set the name of the item. |
void |
setRemoved(boolean removed)
Set the removed flag for this item. |
private void |
setValueType(Type valueType)
Set the value type for this extra value type. |
Methods inherited from class net.sf.basedb.core.BasicItem |
---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, initPermissions, 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.EXTRAVALUETYPE
,
getType()
public static final int MAX_EXTERNAL_ID_LENGTH
setExternalId(String)
method to avoid
exceptions.
private Coloring coloring
Constructor Detail |
---|
ExtraValueType(ExtraValueTypeData data)
data
- The dataMethod Detail |
---|
public static ExtraValueType getNew(DbControl dc, String externalId, Type valueType) throws BaseException
ExtraValue
item. Currently only extra values
of Type.INT
, Type.FLOAT
and Type.STRING
are supported.
dc
- The DbControl
which will be used for
permission checking and database accessexternalId
- A unique string identifying the extra value typevalueType
- The Type
of the extra value
ExtraValue
item
BaseException
- If there is an errorpublic static ExtraValueType getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
ExtraValueType
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
ExtraValueType
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 ExtraValueType getByExternalId(DbControl dc, String externalId) throws ItemNotFoundException, PermissionDeniedException, BaseException
ExtraValueType
when you know the external id.
dc
- The DbControl
which will be used for
database access.externalId
- The external id of the extra value type to load
ExtraValueType
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<ExtraValueType> 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 Date getEntryDate()
Registered
getEntryDate
in interface Registered
public boolean isUsed() throws BaseException
ExtraValue
:s of this type exists
isUsed
in class BasicItem<ExtraValueTypeData>
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
ExtraValue
:s of this type
getUsingItems
in class BasicItem<ExtraValueTypeData>
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
public Type getValueType()
private void setValueType(Type valueType) throws InvalidDataException
InvalidDataException
VirtualColumn.extraValue(Type)
public String getExternalId()
ExtraValueType
item.
public void setExternalId(String externalId) throws PermissionDeniedException, InvalidDataException
Client
item. The value
cannot be null and must not be longer than the value specified by
the MAX_EXTERNAL_ID_LENGTH
constant.
externalId
- The new external id for this item
PermissionDeniedException
- If the logged in user doesn't have
write permission
InvalidDataException
- If the new value is null or longer than
MAX_EXTERNAL_ID_LENGTH
public Coloring getColoring()
Coloring
objectpublic Formula.AverageMethod getAverageMethod()
Formula.AverageMethod
objectpublic void setAverageMethod(Formula.AverageMethod averageMethod) throws PermissionDeniedException, InvalidDataException
averageMethod
- A Formula.AverageMethod
object, null is not allowed
PermissionDeniedException
- If the logged in user doesn't have
write permission
InvalidDataException
- If the averageMethod is null
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |