public interface NameableData extends IdentifiableData
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; }
CommonData
,
Developer documentation: Basic classes and interfacesModifier and Type | Field and 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.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Get the description for the item.
|
java.lang.String |
getName()
Get the name of the item.
|
void |
setDescription(java.lang.String description)
Set the description for the item.
|
void |
setName(java.lang.String name)
Set the name of the item.
|
getId, getVersion
static final int MAX_NAME_LENGTH
setName(String)
,
Constant Field Valuesstatic final int MAX_DESCRIPTION_LENGTH
setDescription(String)
,
Constant Field Valuesjava.lang.String getName()
String
with the name of the itemvoid setName(java.lang.String name)
MAX_NAME_LENGTH
constant.name
- The new name for the itemjava.lang.String getDescription()
String
with a description of the itemvoid setDescription(java.lang.String description)
MAX_DESCRIPTION_LENGTH
constant.description
- The new description for the item