DataModelImpl
instead.@Deprecated public static class SimpleDocumentModel.SimpleDataModel extends Object implements DataModel
Modifier and Type | Field and Description |
---|---|
Map<String,Object> |
data
Deprecated.
|
String |
schema
Deprecated.
|
Constructor and Description |
---|
SimpleDataModel(String schema)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Object |
getData(String key)
Deprecated.
Gets the named field value.
|
Collection<String> |
getDirtyFields()
Deprecated.
Gets the collection of the dirty fields in this data model.
|
Map<String,Object> |
getMap()
Deprecated.
Gets all the fields set in this data model.
|
String |
getSchema()
Deprecated.
Gets the schema of this data model.
|
Object |
getValue(String path)
Deprecated.
Gets a value given its path.
|
boolean |
isDirty()
Deprecated.
Tests whether or not this data model is dirty (i.e.
|
boolean |
isDirty(String name)
Deprecated.
Tests whether or not the specified field from this data model is dirty.
|
void |
setData(String key,
Object value)
Deprecated.
Sets the name field.
|
void |
setDirty(String name)
Deprecated.
Marks the specified field from this data model as dirty.
|
void |
setMap(Map<String,Object> data)
Deprecated.
Sets several field at once.
|
Object |
setValue(String path,
Object value)
Deprecated.
Sets a value to a property given its path.
|
public SimpleDataModel(String schema)
public void setData(String key, Object value) throws PropertyException
DataModel
setData
in interface DataModel
key
- the field namevalue
- the value to set. Accept null values.PropertyException
public Object getData(String key) throws PropertyException
DataModel
getData
in interface DataModel
key
- the field keyPropertyException
public String getSchema()
DataModel
public Map<String,Object> getMap() throws PropertyException
DataModel
It is not guaranteed that the returned map will contain all the fields defined by the schema. It may even be empty.
The returned map is null if the data model was not yet loaded.
getMap
in interface DataModel
PropertyException
public void setMap(Map<String,Object> data) throws PropertyException
DataModel
setMap
in interface DataModel
data
- the fields to set as a mapPropertyException
public boolean isDirty()
DataModel
public boolean isDirty(String name) throws PropertyNotFoundException
DataModel
isDirty
in interface DataModel
name
- the field name to testsPropertyNotFoundException
public void setDirty(String name) throws PropertyNotFoundException
DataModel
setDirty
in interface DataModel
name
- the field name to be dirtyPropertyNotFoundException
public Collection<String> getDirtyFields()
DataModel
getDirtyFields
in interface DataModel
public Object getValue(String path) throws PropertyException
DataModel
The path is a subset of XPath: / and [] are supported.
getValue
in interface DataModel
path
- the property pathPropertyException
public Object setValue(String path, Object value) throws PropertyException
DataModel
setValue
in interface DataModel
PropertyException
Copyright © 2015 Nuxeo SA. All rights reserved.