|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<Item> net.sf.basedb.core.Item
public enum Item
This class defines constants for various items in BASE.
Nested Class Summary | |
---|---|
private static class |
Item.DefinedPermissions
Helper class to make it easier to set up the defined permissions. |
Field Summary | |
---|---|
private String |
alias
|
private static Map<String,Item> |
aliasMapping
|
private Constructor<? extends BasicItem> |
constructor
|
private Class<? extends BasicData> |
dataClass
|
private static Map<Class<? extends BasicData>,Item> |
dataClassMapping
|
private Set<Permission> |
definedPermissions
|
static Comparator<Identifiable> |
DELETION_ORDER
|
private float |
deletionOrder
|
private String |
displayValue
|
private Method |
getById
|
private Class<? extends BasicItem> |
itemClass
|
private static Map<Class<? extends BasicItem>,Item> |
itemClassMapping
|
(package private) static int |
MAX_VALUE
|
private int |
value
|
private static Map<Integer,Item> |
valueMapping
|
Method Summary | |
---|---|
static Item |
fromClass(Class<?> anyClass)
Get the Item object when you know either the item or
data class. |
static Item |
fromDataClass(Class<? extends BasicData> dataClass)
Get the Item object when you know the data class. |
static Item |
fromDataObject(BasicData data)
Get the Item object when you have a data layer object. |
static Item |
fromItemClass(Class<? extends BasicItem> itemClass)
Get the Item object when you know the item class. |
static Item |
fromValue(int value)
Get the Item object when you know the integer code. |
String |
getAlias()
Get the alias for this item, which is used in queries, |
BasicItem |
getById(DbControl dc,
int id)
Get the item of the type represented by this enumeration constant with the specified id. |
(package private) Constructor<? extends BasicItem> |
getConstructor()
Get the default constructor for new objects of this type. |
Class<? extends BasicData> |
getDataClass()
Get the data object that is used to store information in the database for items of this type. |
Set<Permission> |
getDefinedPermissions()
Get the permissions which are meaningful to assign to an item if this type. |
float |
getDeletionOrder()
Get a value indicating the deletion order. |
Class<? extends BasicItem> |
getItemClass()
Get the class object that is used to handle items of this type. |
int |
getValue()
Get the integer value that is used when storing an item to the database. |
String |
toString()
|
static Item |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Item[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Item SYSTEM
Install
,
SessionControl.hasSystemPermission(Permission)
public static final Item USER
User
.
public static final Item GROUP
Group
.
public static final Item ROLE
Role
.
public static final Item PROJECT
Project
.
public static final Item ITEMKEY
ItemKey
.
public static final Item PROJECTKEY
ProjectKey
.
public static final Item ROLEKEY
RoleKey
.
public static final Item PERMISSIONTEMPLATE
PermissionTemplate
.
public static final Item CLIENT
Client
.
public static final Item HELP
Help
.
public static final Item SESSION
Session
.
public static final Item SETTING
Setting
.
public static final Item GLOBALDEFAULTSETTING
GlobalDefaultSetting
.
public static final Item USERDEFAULTSETTING
UserDefaultSetting
.
public static final Item CLIENTDEFAULTSETTING
ClientDefaultSetting
.
public static final Item USERCLIENTSETTING
UserClientSetting
.
public static final Item QUOTA
Quota
.
public static final Item QUOTATYPE
QuotaType
.
public static final Item DISKUSAGE
DiskUsage
.
public static final Item FILE
File
.
public static final Item FILETYPE
FileType
.
public static final Item DIRECTORY
Directory
.
public static final Item MIMETYPE
MimeType
.
public static final Item FILESERVER
FileServer
.
public static final Item PROTOCOL
Protocol
.
public static final Item PROTOCOLTYPE
ProtocolType
.
public static final Item HARDWARE
Hardware
.
public static final Item HARDWARETYPE
HardwareType
.
public static final Item SOFTWARE
Software
.
public static final Item SOFTWARETYPE
SoftwareType
.
public static final Item NEWS
News
.
public static final Item MESSAGE
Message
.
public static final Item ANYTOANY
AnyToAny
link.
public static final Item CHANGEHISTORY
ChangeHistory
entry.
public static final Item REPORTER
Reporter
.
public static final Item REPORTERTYPE
ReporterType
.
public static final Item REPORTERLIST
ReporterType
.
public static final Item REPORTERSCORE
ReporterScore
. This item is not a BasicItem.
public static final Item ANNOTATIONSET
AnnotationSet
.
public static final Item ANNOTATION
Annotation
.
public static final Item ANNOTATIONTYPE
AnnotationType
.
public static final Item ANNOTATIONTYPECATEGORY
AnnotationTypeCategory
.
public static final Item QUANTITY
Quantity
.
public static final Item UNIT
Unit
.
public static final Item BIOSOURCE
BioSource
.
public static final Item SAMPLE
Sample
.
public static final Item EXTRACT
Extract
.
public static final Item LABELEDEXTRACT
LabeledExtract
.
public static final Item BIOMATERIALEVENT
BioMaterialEvent
.
public static final Item LABEL
Label
.
public static final Item BIOPLATE
BioPlate
public static final Item BIOWELL
BioWell
public static final Item BIOMATERIALLIST
BioMaterialList
public static final Item BIOPLATETYPE
BioPlateType
.
public static final Item BIOPLATEEVENT
BioPlateEvent
public static final Item BIOPLATEEVENTPARTICIPANT
BioPlateEventParticipant
public static final Item BIOPLATEEVENTTYPE
BioPlateEventType
public static final Item PLATEGEOMETRY
PlateGeometry
.
public static final Item PLATE
Plate
.
public static final Item PLATETYPE
PlateType
.
public static final Item PLATEEVENT
PlateEvent
.
public static final Item PLATEEVENTTYPE
PlateEventType
.
public static final Item WELL
Well
.
public static final Item PLATEMAPPING
PlateMapping
.
public static final Item ARRAYDESIGN
ArrayDesign
.
public static final Item ARRAYBATCH
ArrayBatch
.
public static final Item ARRAYSLIDE
ArraySlide
.
public static final Item ARRAYDESIGNBLOCK
ArrayDesignBlock
.
public static final Item FEATURE
Feature
.
public static final Item ARRAYDESIGNPLATE
ArrayDesignPlate
connecter.
public static final Item HYBRIDIZATION
Hybridization
.
public static final Item SCAN
Scan
.
public static final Item IMAGE
Image
.
public static final Item RAWBIOASSAY
RawBioAssay
.
public static final Item SPOTIMAGES
SpotImages
.
public static final Item RAWDATA
RawData
spot.
public static final Item PLUGINTYPE
PluginType
public static final Item PLUGINDEFINITION
PluginDefinition
public static final Item PLUGINCONFIGURATION
PluginConfiguration
public static final Item JOB
Job
public static final Item JOBAGENT
JobAgent
public static final Item JOBAGENTSETTINGS
JobAgentSettings
public static final Item EXPERIMENT
Experiment
public static final Item BIOASSAYSET
BioAssaySet
public static final Item BIOASSAY
BioAssay
public static final Item TRANSFORMATION
Transformation
public static final Item EXTRAVALUETYPE
ExtraValueType
public static final Item EXTRAVALUE
ExtraValue
public static final Item FORMULA
Formula
public static final Item SPOTDATA
public static final Item VIRTUALDB
VirtualDb
public static final Item DATACUBE
DataCube
public static final Item DATACUBELAYER
DataCubeLayer
public static final Item DATACUBECOLUMN
DataCubeColumn
public static final Item DATACUBEFILTER
DataCubeFilter
public static final Item DATACUBEEXTRAVALUE
DataCubeExtraValue
public static final Item PLATFORM
Platform
public static final Item PLATFORMVARIANT
PlatformVariant
public static final Item PLATFORMFILETYPE
PlatformFileType
public static final Item FILESET
FileSet
public static final Item FILESETMEMBER
FileSetMember
public static final Item DATAFILETYPE
DataFileType
Field Detail |
---|
static int MAX_VALUE
private static final Map<Integer,Item> valueMapping
private static final Map<String,Item> aliasMapping
private static final Map<Class<? extends BasicItem>,Item> itemClassMapping
private static final Map<Class<? extends BasicData>,Item> dataClassMapping
private final int value
private final String displayValue
private final String alias
private final Class<? extends BasicItem> itemClass
private final Class<? extends BasicData> dataClass
private final Set<Permission> definedPermissions
private final transient Method getById
private final transient Constructor<? extends BasicItem> constructor
private final float deletionOrder
public static final Comparator<Identifiable> DELETION_ORDER
Method Detail |
---|
public static Item[] values()
for (Item c : Item.values()) System.out.println(c);
public static Item valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic String toString()
toString
in class Enum<Item>
public int getValue()
public String getAlias()
Query.getRootAlias()
public Class<? extends BasicItem> getItemClass()
public Class<? extends BasicData> getDataClass()
public Set<Permission> getDefinedPermissions()
Set
containing the permissionspublic float getDeletionOrder()
BasicItem.isUsed()
method returns true.
public BasicItem getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
Item.SAMPLE.getById()
is the same
as Sample.getById
.
dc
- The DbControl
object used for database
access and permission checkingid
- The id of the item
ItemNotFoundException
- If an item with the specified id isn't found
PermissionDeniedException
- If the logged in user hasn't read
permission for the item
BaseException
- If there is another errorConstructor<? extends BasicItem> getConstructor()
BasicData
object as the only parameter. For
example Sample(SampleData data)
.
DbControl.getItem(Class, BasicData, Object[])
public static Item fromValue(int value)
Item
object when you know the integer code.
value
- Integer code
public static Item fromItemClass(Class<? extends BasicItem> itemClass)
Item
object when you know the item class.
itemClass
- Item class for which Item
object should be returned
public static Item fromDataClass(Class<? extends BasicData> dataClass)
Item
object when you know the data class.
dataClass
- Data class for which the Item should be returned.
public static Item fromClass(Class<?> anyClass)
Item
object when you know either the item or
data class.
anyClass
- The class to get corresponding Item
for.
public static Item fromDataObject(BasicData data)
Item
object when you have a data layer object.
This method takes Hibernate proxies into account.
data
- The data layer object for which corresponding
Item
should be returned.
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |