Interface RemovableData

All Superinterfaces:
IdentifiableData
All Known Implementing Classes:
AnnotatedData, AnnotationTypeCategoryData, AnnotationTypeData, ArrayBatchData, ArrayDesignData, ArraySlideData, BioAssaySetData, BioMaterialData, BioPlateData, BioPlateEventData, BioPlateEventTypeData, BioPlateTypeData, BioSourceData, ClientData, CommonData, DataFileTypeData, DerivedBioAssayData, DirectoryData, ExperimentData, ExtractData, ExtraValueTypeData, FileData, FileServerData, FormulaData, GroupData, HardwareData, ItemListData, ItemSubtypeData, JobAgentData, JobData, KitData, MeasuredBioMaterialData, MessageData, MimeTypeData, NewsData, PermissionTemplateData, PhysicalBioAssayData, PlateData, PlateEventTypeData, PlateGeometryData, PlateMappingData, PlateTypeData, PlatformData, PlatformVariantData, PluginConfigurationData, PluginDefinitionData, PluginTypeData, ProjectData, ProtocolData, QuantityData, QuotaData, RawBioAssayData, ReporterCloneTemplateData, ReporterListData, ReporterTypeData, RoleData, SampleData, SoftwareData, TagData, TransformationData, UnitData, UserData

public interface RemovableData
extends IdentifiableData
A removable item is an item that can be flagged as removed. This doesn't remove the information about the item from the database, but can be used by client applications to hide items that the user is not interested in.

For example, all methods generating lists of items, will by default not include items that are flagged as removed.

A cleaning application is usually run at regular intervals to remove items that have been flagged as removed.

This interface defines Hibernate database mapping for the removedBy property to the database column removed_by. The column is an integer column holding the ID of the user that flagged the item or null if the item has not been flagged.

If a subclass wants to map these properties to other columns, it should override the getRemovedBy() method and add a Hibernate tag in the comment.

Reference implementation

private Integer removedBy;
public Integer getRemovedBy()
{
   return removedBy;
}
public void setRemovedBy(Integer userId)
{
   this.removedBy = userId;
}
Version:
2.0
Author:
Nicklas
See Also:
Developer documentation: Basic classes and interfaces
  • Method Summary

    Modifier and Type Method Description
    Integer getRemovedBy()
    Get the ID of the user that removed this item.
    void setRemovedBy​(Integer userId)
    Set the ID of the user that removed this item or null to restore the item.

    Methods inherited from interface net.sf.basedb.core.data.IdentifiableData

    getId, getVersion
  • Method Details

    • getRemovedBy

      Integer getRemovedBy()
      Get the ID of the user that removed this item.
      Returns:
      The ID of a user or null if the item is not removed
      Since:
      3.7
      Hibernate: property
      column="`removed_by`" type="int" not-null="false"
    • setRemovedBy

      void setRemovedBy​(Integer userId)
      Set the ID of the user that removed this item or null to restore the item.
      Since:
      3.7