|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface NameableData
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;
}
CommonData,
Developer documentation: Basic classes and interfaces| Field Summary | |
|---|---|
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 | |
|---|---|
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 Detail |
|---|
static final int MAX_NAME_LENGTH
setName(String),
Constant Field Valuesstatic final int MAX_DESCRIPTION_LENGTH
setDescription(String),
Constant Field Values| Method Detail |
|---|
String getName()
String with the name of the itemvoid setName(String name)
MAX_NAME_LENGTH constant.
name - The new name for the itemString getDescription()
String with a description of the itemvoid setDescription(String description)
MAX_DESCRIPTION_LENGTH constant.
description - The new description for the item
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||