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 java.lang.String |
alias |
private static java.util.Map<java.lang.String,Item> |
aliasMapping |
private java.lang.reflect.Constructor<? extends BasicItem> |
constructor |
private java.lang.Class<? extends BasicData> |
dataClass |
private static java.util.Map<java.lang.Class<? extends BasicData>,Item> |
dataClassMapping |
private java.util.Set<Permission> |
definedPermissions |
static java.util.Comparator<Identifiable> |
DELETION_ORDER |
private float |
deletionOrder |
private java.lang.String |
displayValue |
private java.lang.reflect.Method |
getById |
private java.lang.Class<? extends BasicItem> |
itemClass |
private static java.util.Map<java.lang.Class<? extends BasicItem>,Item> |
itemClassMapping |
(package private) static int |
MAX_VALUE |
private int |
value |
private static java.util.Map<java.lang.Integer,Item> |
valueMapping |
Modifier and Type | Method and Description |
---|---|
static Item |
fromClass(java.lang.Class<?> anyClass)
Get the
Item object when you know either the item or
data class. |
static Item |
fromDataClass(java.lang.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(java.lang.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. |
java.lang.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) java.lang.reflect.Constructor<? extends BasicItem> |
getConstructor()
Get the default constructor for new objects of this type.
|
java.lang.Class<? extends BasicData> |
getDataClass()
Get the data object that is used to store information in the
database for items of this type.
|
java.util.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.
|
java.lang.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.
|
boolean |
isBasicItem()
Is this item representing a BasicItem object or not?
|
java.lang.String |
toString() |
static Item |
valueOf(java.lang.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 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 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 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 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 static final java.util.Map<java.lang.Integer,Item> valueMapping
private static final java.util.Map<java.lang.String,Item> aliasMapping
private static final java.util.Map<java.lang.Class<? extends BasicItem>,Item> itemClassMapping
private static final java.util.Map<java.lang.Class<? extends BasicData>,Item> dataClassMapping
private final int value
private final java.lang.String displayValue
private final java.lang.String alias
private final java.lang.Class<? extends BasicItem> itemClass
private final java.lang.Class<? extends BasicData> dataClass
private final java.util.Set<Permission> definedPermissions
private final transient java.lang.reflect.Method getById
private final transient java.lang.reflect.Constructor<? extends BasicItem> constructor
private final float deletionOrder
public static final java.util.Comparator<Identifiable> DELETION_ORDER
public static Item[] values()
for (Item c : Item.values()) System.out.println(c);
public static Item valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()
toString
in class java.lang.Enum<Item>
public int getValue()
public java.lang.String getAlias()
Query.getRootAlias()
public boolean isBasicItem()
public java.lang.Class<? extends BasicItem> getItemClass()
public java.lang.Class<? extends BasicData> getDataClass()
public java.util.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 errorjava.lang.reflect.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(java.lang.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(java.lang.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(java.lang.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.