Interface IdentifiableData

All Known Subinterfaces:
AnnotatableData, BatchableData, DiskConsumableData, ExtendableData, FileAttachableData, FileStoreEnabledData, NameableData, OwnableData, RegisteredData, RemovableData, ShareableData, SystemData
All Known Implementing Classes:
AnnotatedData, AnnotationData, AnnotationSetData, AnnotationTypeCategoryData, AnnotationTypeData, AnyToAnyData, ArrayBatchData, ArrayDesignBlockData, ArrayDesignData, ArrayDesignPlateData, ArraySlideData, BaseFileImporter.RawDataProxy, BaseFileImporter.ReporterProxy, BasicData, BioAssayData, BioAssaySetData, BioMaterialData, BioMaterialEventData, BioMaterialEventSourceData, BioPlateData, BioPlateEventData, BioPlateEventParticipantData, BioPlateEventTypeData, BioPlateTypeData, BioSourceData, BioWellData, BooleanParameterValueData, ChangeHistoryData, ChangeHistoryDetailData, ClientData, ClientDefaultSettingData, CommonData, ContextData, DataCubeColumnData, DataCubeData, DataCubeExtraValueData, DataCubeFilterData, DataCubeLayerData, DataFileTypeData, DateParameterValueData, DerivedBioAssayData, DirectoryData, DiskUsageData, DoubleParameterValueData, ExperimentData, ExtractData, ExtraValueData, ExtraValueTypeData, FeatureData, FileData, FileServerData, FileSetData, FileSetMemberData, FloatParameterValueData, FormulaData, GlobalDefaultSettingData, GroupData, HardwareData, HelpData, IntegerParameterValueData, ItemKeyData, ItemListData, ItemListSyncFilterData, ItemParameterValueData, ItemSubtypeData, ItemSubtypeFileTypeData, JobAgentData, JobAgentSettingsData, JobData, KeyData, KitData, LongParameterValueData, MeasuredBioMaterialData, MessageData, MimeTypeData, NewsData, OwnedData, ParameterValueData, PasswordData, PermissionTemplateData, PhysicalBioAssayData, PlateData, PlateEventData, PlateEventTypeData, PlateGeometryData, PlateMappingData, PlateTypeData, PlatformData, PlatformFileTypeData, PlatformVariantData, PluginConfigurationData, PluginDefinitionData, PluginTypeData, ProjectData, ProjectKeyData, ProtocolData, QuantityData, QuotaData, QuotaTypeData, RawBioAssayData, RawData, RawDataBatcher.FeatureProxy, RawDataBatcher.ReporterProxy, ReporterCloneTemplateData, ReporterData, ReporterListData, ReporterTypeData, RoleData, RoleKeyData, RootRawBioAssayData, SampleData, SchemaVersionData, SessionData, SettingData, SharedData, SoftwareData, StringParameterValueData, TagData, TextParameterValueData, TimestampParameterValueData, TransformationData, UnitData, UnitSymbolData, UserClientSettingData, UserData, UserDefaultSettingData, UserDeviceData, VirtualDbData, WellData

public interface IdentifiableData
An identifiable item is an item which has an id and a version. The id is always greater than 0 for an item which has been saved to the database, and 0 for a new item that has not yet been saved to the database.

The version number is used by Hibernate to prevent concurrent modifications by different threads or processes. It does this by incrementing the version number each time the information is updated in the database. If the version number in the database is different from the version on the object it is interpreted as another process has modified the item and an exception is thrown.

This interface is implemented by the BasicData class, which also provides the Hibernate mapping for the id property.

Hibernate also requires a setId() and a setVersion() method, so this must also be implemented even though it is not required by this interface.

See Also:
  • Method Summary

    Modifier and Type
    Get the id for the item.
    Get the version of this item.
  • Method Details

    • getId

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

      int getVersion()
      Get the version of this item. The version starts at 0, and is increased each time the information is updated. The version number is controlled by Hibernate.