|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ExtendableData
This class is inherited by data classes that supports per-server additions of columns to the underlying database table.
The added columns must be described in the extended-properties.xml
configuration file. The format of the XML file is forced by a DTD. In summary:
<?xml version="1.0" ?> <!DOCTYPE extended-properties SYSTEM "extended-properties.dtd" > <extended-properties> </extended-properties>
The name attribute of the <class> tag is the
name of the data class that the extra property should be added to. That
class must of course implement this interface. The <class>
tag may contain one or more <property> tags. Here is a
short description of the attributes for the <property> tag.
| Attribute | Description |
|---|---|
| name (required) |
The property name of the extended property.
See ExtendedProperty.getName().
|
| title |
The display title for the extended property.
See ExtendedProperty.getTitle().
|
| description |
A short description of the extended property.
See ExtendedProperty.getDescription().
|
| column (required) |
The database column name of the extended property. This value
must of course be unique for each class.
See ExtendedProperty.getColumn().
|
| type (required) |
The type of the column. Allowed values are:
ExtendedProperty.getType().
|
| length |
The maximum allowed length of the value if it is a string property.
See ExtendedProperty.getLength().
The default value is 255.
|
| null |
If the column supports null values or not. Allowed
values are:
ExtendedProperty.isNullable().
|
| insert |
If the value for this property should be inserted into the database
or not.
ExtendedProperty.isInsertable().
|
| update |
If the value for this property should be updated in the database
or not.
ExtendedProperty.isUpdateable().
|
Reference implementation
private Map<String, Object> extendedProperties;
public Object getExtended(String name)
{
return extendedProperties == null ? null : extendedProperties.get(name);
}
public void setExtended(String name, Object value)
{
if (extendedProperties == null) extendedProperties = new HashMap<String, Object>();
extendedProperties.put(name, value);
}
ExtendedProperties,
ExtendedProperty| Method Summary | |
|---|---|
Object |
getExtended(String name)
Get the value of an extended property. |
void |
setExtended(String name,
Object value)
Set the value of an extended property. |
| Methods inherited from interface org.proteios.core.data.IdentifiableData |
|---|
getId, getVersion |
| Method Detail |
|---|
Object getExtended(String name)
name - The name of the property
void setExtended(String name,
Object value)
name - The name of the propertyvalue - The new value for the property
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||