2.17.2: 2011-06-17

net.sf.basedb.core
Interface Identifiable

All Superinterfaces:
AccessControlled
All Known Subinterfaces:
Annotatable, AnnotatableProxy, DiskConsumable, FileAttachable, FileStoreEnabled, Nameable, Ownable, Registered, Removable, Shareable, SystemItem
All Known Implementing Classes:
AnnotatedItem, Annotation, AnnotationSet, AnnotationType, AnnotationTypeCategory, AnyToAny, ArrayBatch, ArrayDesign, ArrayDesignBlock, ArrayDesignPlate, ArraySlide, BasicChildItem, BasicItem, BioAssay, BioAssaySet, BioMaterial, BioMaterialEvent, BioMaterialList, BioPlate, BioPlateEvent, BioPlateEventParticipant, BioPlateEventType, BioPlateType, BioSource, BioWell, ChangeHistory, ChildItem, Client, ClientDefaultSetting, CommonItem, DataCube, DataCubeColumn, DataCubeExtraValue, DataCubeFilter, DataCubeLayer, DataFileType, Directory, DiskUsage, Experiment, Extract, ExtraValue, ExtraValueType, File, FileServer, FileSet, FileSetMember, FileType, Formula, GlobalDefaultSetting, Group, Hardware, HardwareType, Help, Hybridization, Image, ItemKey, Job, JobAgent, JobAgentSettings, Key, Label, LabeledExtract, MeasuredBioMaterial, Message, MimeType, NameablePluginAdaptor, News, OwnedItem, PermissionTemplate, Plate, PlateEvent, PlateEventType, PlateGeometry, PlateMapping, PlateType, Platform, PlatformFileType, PlatformVariant, PluginConfiguration, PluginDefinition, PluginType, Project, ProjectKey, Protocol, ProtocolType, Quantity, Quota, QuotaType, RawBioAssay, ReporterList, ReporterType, Role, RoleKey, Sample, Scan, Session, Setting, SharedItem, Software, SoftwareType, SpotImages, Transformation, Unit, User, UserClientSetting, UserDefaultSetting, VirtualDb, Well

public interface Identifiable
extends AccessControlled

An Identifiable item is an item which has an id a type and a version. The id value is always greater than 0 for an existing item, and 0 for a new item that has not yet been saved to the database.

The type is an value selected from the constants defined by the Item enumeration.

Version:
2.0
Author:
Nicklas
See Also:
BasicItem, Item
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Method Summary
 int getId()
          Get the id for the item.
 Item getType()
          Get the type of item represented by the object.
 int getVersion()
          Get the version number of the item.
 
Methods inherited from interface net.sf.basedb.core.AccessControlled
checkPermission, getPermissions, hasPermission
 

Method Detail

getId

int getId()
Get the id for the item. If it hasn't yet been saved to the database 0 is returned.

Returns:
The id of the item or 0

getType

Item getType()
Get the type of item represented by the object. The returned value is one of the values defined in the Item enumeration.

Returns:
A value indicating the type of item

getVersion

int getVersion()
Get the version number of the item. The version number is incremented each time the item is updated and is used to prevent that the same item is updated at the same time by two or more different threads or processes.


2.17.2: 2011-06-17