public class SQLComplexListProperty extends SQLBaseProperty implements PropertyContainer
SQLComplexListProperty gives access to a wrapped collection of
SQL-level Nodes.DC_ISSUED, RELATED_TEXT_RESOURCES| Constructor and Description |
|---|
SQLComplexListProperty(Node node,
ListType type,
String name,
SQLSession session,
boolean readonly)
Creates a
SQLComplexListProperty to wrap a collection of
Nodes. |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
exportFlatMap(String[] schemas)
Exports a flat view of properties in this document.
|
Map<String,Object> |
exportMap(String schemaName) |
Map<String,Map<String,Object>> |
exportMap(String[] schemas)
Exports the properties belonging to the given schemas as a java Map.
|
boolean |
getBoolean(String name)
Gets the value of a scalar property as a
boolean. |
Blob |
getContent(String name)
Gets the value of the named content property.
|
Calendar |
getDate(String name)
Gets the value of a scalar property as a
date. |
List<String> |
getDirtyFields()
Returns fields that were modified.
|
double |
getDouble(String name)
Gets the value of a scalar property as a
double. |
long |
getLong(String name)
Gets the value of a scalar property as a
long. |
String |
getName()
Gets the name used to identify this property by its container.
|
List<Property> |
getProperties()
Gets the collection of the children properties.
|
Property |
getProperty(String posString)
Gets the children property given its name.
|
Iterator<Property> |
getPropertyIterator()
Gets an iterator over the children properties.
|
Object |
getPropertyValue(String name)
Generic method to retrieve a property value.
|
String |
getString(String name)
Gets the value of a scalar property as a
string. |
List<Object> |
getValue()
Gets the value of this property.
|
void |
importFlatMap(Map<String,Object> map)
Imports a flat map of properties into this document.
|
void |
importMap(Map<String,Map<String,Object>> map)
Imports the tree properties from the given Java Map.
|
boolean |
isPropertySet(String name)
Checks whether this property has child property with the given name.
|
void |
removeProperty(String name)
Removes the property with the given name.
|
void |
setBoolean(String name,
boolean value)
Sets the scalar property value to the given boolean value.
|
void |
setContent(String name,
Blob value)
Sets the content property to the given value.
|
void |
setDate(String name,
Calendar value)
Sets the scalar property value to the given date value.
|
void |
setDouble(String name,
double value)
Set the scalar property value to the given double value.
|
void |
setList(List<?> list) |
void |
setList(ListDiff list) |
void |
setLong(String name,
long value)
Sets the scalar property value to the given long value.
|
void |
setPropertyValue(String name,
Object value)
Generic method to set a property value.
|
void |
setString(String name,
String value)
Sets the scalar property value to the given string value.
|
void |
setValue(Object value)
Sets the value of this property.
|
checkWritable, getType, isNull, isSpecialSystemProperty, setNullpublic SQLComplexListProperty(Node node, ListType type, String name, SQLSession session, boolean readonly)
SQLComplexListProperty to wrap a collection of
Nodes.public String getName()
PropertyIf the container of this property is not supporting accessing properties by names, returns the empty string.
public List<Object> getValue() throws DocumentException
PropertygetValue in interface PropertyDocumentExceptionpublic void setValue(Object value) throws DocumentException
PropertysetValue in interface Propertyvalue - the value to setDocumentExceptionpublic Property getProperty(String posString) throws DocumentException
PropertygetProperty in interface PropertygetProperty in interface PropertyContainergetProperty in class SQLBasePropertyposString - the property nameDocumentException - if any error occurspublic List<Property> getProperties() throws DocumentException
PropertygetProperties in interface PropertygetProperties in interface PropertyContainergetProperties in class SQLBasePropertyDocumentException - if any error occurspublic Iterator<Property> getPropertyIterator() throws DocumentException
PropertygetPropertyIterator in interface PropertygetPropertyIterator in interface PropertyContainergetPropertyIterator in class SQLBasePropertyDocumentException - if any error occurspublic boolean isPropertySet(String name) throws DocumentException
PropertyisPropertySet in interface PropertyisPropertySet in interface PropertyContainerisPropertySet in class SQLBasePropertyname - the path to testDocumentException - if any error occurspublic Map<String,Object> exportFlatMap(String[] schemas) throws DocumentException
PropertyContainerIf the given schemas array is null then all schemas will be exported.
exportFlatMap in interface PropertyContainerDocumentException - if any error occurspublic Map<String,Map<String,Object>> exportMap(String[] schemas) throws DocumentException
PropertyContainerIf the given schemas array is null then all schemas will be exported
The properties are grouped by schemas
The property tree is recursively traversed and all property in that schema exported as entry of the Map
exportMap in interface PropertyContainerDocumentException - if any error occurspublic Map<String,Object> exportMap(String schemaName) throws DocumentException
exportMap in interface PropertyContainerDocumentExceptionpublic void importFlatMap(Map<String,Object> map) throws DocumentException
PropertyContainerimportFlatMap in interface PropertyContainerDocumentException - if any error occurspublic void importMap(Map<String,Map<String,Object>> map) throws DocumentException
PropertyContainerThe property tree is recursively traversed and all property exported as entry of the Map.
importMap in interface PropertyContainerDocumentException - if any error occurspublic List<String> getDirtyFields()
PropertyContainerXXX AT: compatibility method for NXP-666
getDirtyFields in interface PropertyContainerpublic Object getPropertyValue(String name) throws DocumentException
PropertyContainer
This is a shortcut for getProperty(String).getValue()
getPropertyValue in interface PropertyContainername - the name of the property to setnull if the property is not
set.DocumentException - if any error occursfor the list of supported value
objectspublic String getString(String name) throws DocumentException
PropertyContainerstring.
This is a shortcut for getScalar(name).getString()
getString in interface PropertyContainerDocumentException - if any error occursSimpleProperty#getString()};public boolean getBoolean(String name) throws DocumentException
PropertyContainerboolean.
This is a shortcut for getScalar(name).getBoolean()
getBoolean in interface PropertyContainerDocumentException - if any error occursSimpleProperty#getBoolean()};public long getLong(String name) throws DocumentException
PropertyContainerlong.
This is a shortcut for getScalar(name).getLong()
getLong in interface PropertyContainerDocumentException - if any error occursSimpleProperty#getLong()};public double getDouble(String name) throws DocumentException
PropertyContainerdouble.
This is a shortcut for getScalar(name).getDouble()
getDouble in interface PropertyContainerDocumentException - if any error occursSimpleProperty#getDouble()};public Calendar getDate(String name) throws DocumentException
PropertyContainerdate.
This is a shortcut for getScalar(name).getDate()
getDate in interface PropertyContainerDocumentException - if any error occursSimpleProperty#getDate()};public Blob getContent(String name) throws DocumentException
PropertyContainergetContent in interface PropertyContainerDocumentException - if any error occurspublic void setPropertyValue(String name, Object value) throws DocumentException
PropertyContainer
This is a shortcut for getProperty(String).setValue(Object)
The following type of objects can be used as values depending on the property type:
setPropertyValue in interface PropertyContainername - the name of the property to setvalue - the value to setDocumentException - if any error occurspublic void setString(String name, String value) throws DocumentException
PropertyContainerIf the property with that name doesn't exists, it will be created.
This is a shortcut to create or set string properties.
setString in interface PropertyContainerDocumentException - if any error occursSimpleProperty#setString(String)}public void setBoolean(String name, boolean value) throws DocumentException
PropertyContainerIf the property with that name doesn't exists, it will be created.
This is a shortcut to create or set boolean properties.
setBoolean in interface PropertyContainerDocumentException - if any error occursSimpleProperty#setBoolean(boolean)}public void setLong(String name, long value) throws DocumentException
PropertyContainerIf the property with that name doesn't exists, it will be created.
This is a shortcut to create or set long properties.
setLong in interface PropertyContainerDocumentException - if any error occursSimpleProperty#setLong(long)}public void setDouble(String name, double value) throws DocumentException
PropertyContainerIf the property with that name doesn't exists, it will be created.
This is a shortcut to create or set double properties
setDouble in interface PropertyContainerDocumentException - if any error occursSimpleProperty#setDouble(double)}public void setDate(String name, Calendar value) throws DocumentException
PropertyContainerIf the property with that name doesn't exists, it will be created
This is a shortcut to create or set date properties.
setDate in interface PropertyContainerDocumentException - if any error occursSimpleProperty#setDate(Calendar)}public void setContent(String name, Blob value) throws DocumentException
PropertyContainerIf the property with that name doesn't exists, it will be created
setContent in interface PropertyContainerDocumentException - if any error occurspublic void removeProperty(String name) throws DocumentException
PropertyContainerremoveProperty in interface PropertyContainername - the property to removeDocumentException - if any error occurspublic void setList(List<?> list) throws DocumentException
DocumentExceptionpublic void setList(ListDiff list)
Copyright © 2011 Nuxeo SA. All Rights Reserved.