public abstract class AbstractDataModel extends Object implements IDataModel
| Modifier and Type | Field and Description |
|---|---|
protected String |
modelName
The name of the
AbstractDataModel. |
protected Hashtable<String,Object> |
properties
The properties of the
AbstractDataModel with an initial capacity
of 5 items. |
private static long |
serialVersionUID
The UID for serialization.
|
| Constructor and Description |
|---|
AbstractDataModel()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract AbstractDataModel |
clone() |
Hashtable<String,Object> |
copyProperties(Hashtable<String,Object> target)
Copies the properties
Hashtable of this data model to a given
instance. |
String |
getDataType() |
String |
getModelName()
Get the name of the model.
|
Hashtable<String,Object> |
getProperties()
Gets the properties
Hashtable of this data model. |
Object |
getProperty(String key)
Get the property specified by
key. |
void |
setDataType(String type) |
void |
setModelName(String name)
Get the name of the model.
|
void |
setProperties(Hashtable<String,Object> properties)
Sets the properties
Hashtable of this data model |
void |
setProperty(String key,
Object value)
Set a specific property by
key and value. |
private static final long serialVersionUID
protected String modelName
AbstractDataModel.protected Hashtable<String,Object> properties
AbstractDataModel with an initial capacity
of 5 items.public AbstractDataModel()
public String getModelName()
Object.toString() method is called and the String is set as the
name of the model.getModelName in interface IDataModelStringIDataModel.getModelName()public void setModelName(String name)
null, the
Object.toString() method is called and the String is set as the
name of the model.setModelName in interface IDataModelIDataModel.setModelName(java.lang.String)public Hashtable<String,Object> getProperties()
IDataModelHashtable of this data model.getProperties in interface IDataModelIDataModel.getProperties()public void setProperties(Hashtable<String,Object> properties)
IDataModelHashtable of this data modelsetProperties in interface IDataModelIDataModel.setProperties(Hashtable)public Object getProperty(String key)
IDataModelkey.getProperty in interface IDataModelIDataModel.getProperty(String)public void setProperty(String key, Object value)
IDataModelkey and value.setProperty in interface IDataModelIDataModel.setProperty(String, Object)public Hashtable<String,Object> copyProperties(Hashtable<String,Object> target)
IDataModelHashtable of this data model to a given
instance.
If null is passed, a new instance will be generated and its
reference returned.
copyProperties in interface IDataModeltarget - the target Hashtable, may be nullHashtable containing the object's
propertiesIDataModel.copyProperties(java.util.Hashtable)public abstract AbstractDataModel clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic void setDataType(String type)
public String getDataType()
Copyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.