Interface NameableData

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

public interface NameableData extends IdentifiableData
A nameable item is an item that has a name and, optionally, a description.

This interface defines Hibernate database mappings for the name and description properties to database columns with the same name. If a subclass wants to map these properties to other columns, it should override the getName() and/or getDescription() methods and add a Hibernate tag in the comment.

Reference implementation

private String name;
public String getName()
{
   return name;
}
public void setName(String name)
{
   this.name = name;
}
private String description;
public String getDescription()
{
   return description;
}
public void setDescription(String description)
{
   this.description = description;
}
Version:
2.0
Author:
Nicklas
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The maximum length of the description of the item that can be stored in the database.
    static final int
    The maximum length of the name of the item that can be stored in the database.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the description for the item.
    Get the name of the item.
    void
    setDescription(String description)
    Set the description for the item.
    void
    Set the name of the item.

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

    getId, getVersion
  • Field Details

  • Method Details

    • getName

      String getName()
      Get the name of the item.
      Returns:
      A String with the name of the item
      Hibernate: property
      type="string"
      Hibernate: column
      name="`name`" length="255" not-null="true" index="name_idx"
    • setName

      void setName(String name)
      Set the name of the item. The name cannot be null and mustn't be longer than the value specified by the MAX_NAME_LENGTH constant.
      Parameters:
      name - The new name for the item
    • getDescription

      String getDescription()
      Get the description for the item.
      Returns:
      A String with a description of the item
      Hibernate: property
      column="`description`" type="text" not-null="false"
    • setDescription

      void setDescription(String description)
      Set the description for the item. The description can be null but mustn't be longer than the value specified by the MAX_DESCRIPTION_LENGTH constant.
      Parameters:
      description - The new description for the item