Package net.sf.basedb.core.data
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:
CommonData
, Developer documentation: Basic classes and interfaces
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_DESCRIPTION_LENGTH
The maximum length of the description of the item that can be stored in the database.static int
MAX_NAME_LENGTH
The maximum length of the name of the item that can be stored in the database. -
Method Summary
Modifier and Type Method Description String
getDescription()
Get the description for the item.String
getName()
Get the name of the item.void
setDescription(String description)
Set the description for the item.void
setName(String name)
Set the name of the item.Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
-
Field Details
-
MAX_NAME_LENGTH
static final int MAX_NAME_LENGTHThe maximum length of the name of the item that can be stored in the database.- See Also:
setName(String)
, Constant Field Values
-
MAX_DESCRIPTION_LENGTH
static final int MAX_DESCRIPTION_LENGTHThe maximum length of the description of the item that can be stored in the database.- See Also:
setDescription(String)
, Constant Field Values
-
-
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
Set the name of the item. The name cannot be null and mustn't be longer than the value specified by theMAX_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
Set the description for the item. The description can be null but mustn't be longer than the value specified by theMAX_DESCRIPTION_LENGTH
constant.- Parameters:
description
- The new description for the item
-