public enum Item extends Enum<Item>
Modifier and Type | Class and Description |
---|---|
private static class |
Item.DefinedPermissions
Helper class to make it easier to set up the defined permissions.
|
Modifier and Type | Field and Description |
---|---|
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 Method |
getQuery |
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 |
Modifier and Type | Method and Description |
---|---|
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.
|
ItemQuery<? extends BasicItem> |
getQuery()
Get a query returning items of this type.
|
int |
getValue()
Get the integer value that is used when storing an item to the database.
|
boolean |
isBasicItem()
Is this item representing a BasicItem object or not?
|
boolean |
supportsGetQuery()
Check if
getQuery() is supported by this
item type. |
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.
|
public static final Item SYSTEM
public static final Item PROJECTKEY
ProjectKey
.public static final Item PERMISSIONTEMPLATE
PermissionTemplate
.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 FILESERVER
FileServer
.public static final Item SYNCFILTER
SyncFilter
public static final Item CHANGEHISTORY
ChangeHistory
entry.public static final Item CHANGEHISTORY_VALUES
ChangeHistory
which need special access permissions.public static final Item ITEMSUBTYPE
ItemSubtype
.public static final Item ITEMSUBTYPEFILETYPE
ItemSubtypeFileType
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 REPORTERCLONETEMPLATE
ReporterCloneTemplate
.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 BIOMATERIALEVENT
BioMaterialEvent
.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 PLATEEVENT
PlateEvent
.public static final Item PLATEEVENTTYPE
PlateEventType
.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 ARRAYDESIGNPLATE
ArrayDesignPlate
connecter.public static final Item PHYSICALBIOASSAY
PhysicalBioAssay
.public static final Item DERIVEDBIOASSAY
DerivedBioAssay
.public static final Item RAWBIOASSAY
RawBioAssay
.public static final Item ROOTRAWBIOASSAY
RootRawBioAssay
.public static final Item SPOTIMAGES
SpotImages
.public static final Item PLUGINTYPE
PluginType
public static final Item PLUGINDEFINITION
PluginDefinition
public static final Item PLUGINCONFIGURATION
PluginConfiguration
public static final Item JOBAGENTSETTINGS
JobAgentSettings
public static final Item EXPERIMENT
Experiment
public static final Item BIOASSAYSET
BioAssaySet
public static final Item TRANSFORMATION
Transformation
public static final Item EXTRAVALUETYPE
ExtraValueType
public static final Item EXTRAVALUE
ExtraValue
public static final Item SPOTDATA
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 PLATFORMVARIANT
PlatformVariant
public static final Item PLATFORMFILETYPE
PlatformFileType
public static final Item FILESETMEMBER
FileSetMember
public static final Item DATAFILETYPE
DataFileType
static int MAX_VALUE
private final int value
private final String displayValue
private final String alias
private final Set<Permission> definedPermissions
private final transient Method getById
private final transient Method getQuery
private final transient Constructor<? extends BasicItem> constructor
private final float deletionOrder
public static final Comparator<Identifiable> DELETION_ORDER
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 nameNullPointerException
- if the argument is nullpublic int getValue()
public String getAlias()
Query.getRootAlias()
public boolean isBasicItem()
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 itemItemNotFoundException
- If an item with the specified id isn't foundPermissionDeniedException
- If the logged in user hasn't read
permission for the itemBaseException
- If there is another errorpublic boolean supportsGetQuery()
getQuery()
is supported by this
item type.public ItemQuery<? extends BasicItem> getQuery()
getQuery()
method in their
item class (eg. Sample.getQuery()
.Constructor<? 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 codepublic static Item fromItemClass(Class<? extends BasicItem> itemClass)
Item
object when you know the item class.itemClass
- Item class for which Item
object should be returnedpublic 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.