Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.storage.sql.coremodel
Class SQLBaseProperty

java.lang.Object
  extended by org.nuxeo.ecm.core.storage.sql.coremodel.SQLBaseProperty
All Implemented Interfaces:
Property
Direct Known Subclasses:
SQLCollectionProperty, SQLComplexListProperty, SQLComplexProperty, SQLSimpleProperty

public abstract class SQLBaseProperty
extends java.lang.Object
implements Property

Author:
Florent Guillaume

Constructor Summary
SQLBaseProperty(Type type, boolean readonly)
           
 
Method Summary
 void checkWritable()
           
 java.util.Collection<Property> getProperties()
          Gets the collection of the children properties.
 Property getProperty(java.lang.String name)
          Gets the children property given its name.
 java.util.Iterator<Property> getPropertyIterator()
          Gets an iterator over the children properties.
 Type getType()
          Gets the property type.
 boolean isNull()
          Tests whether or not this property is null.
 boolean isPropertySet(java.lang.String name)
          Checks whether this property has child property with the given name.
 void setNull()
          Nullify this property.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.core.model.Property
getName, getValue, setValue
 

Constructor Detail

SQLBaseProperty

public SQLBaseProperty(Type type,
                       boolean readonly)
Method Detail

checkWritable

public void checkWritable()
                   throws DocumentException
Throws:
DocumentException

getType

public Type getType()
Description copied from interface: Property
Gets the property type.

Specified by:
getType in interface Property
Returns:
the property type

isNull

public boolean isNull()
Description copied from interface: Property
Tests whether or not this property is null.

A null property means that it is defined by the container schema but was not yet set (so it may not exists as a persistent object)

If the property is null the first time a write operation is done on it the property will be created by the underlying storage

Specified by:
isNull in interface Property
Returns:
true if the property is null, false otherwise

setNull

public void setNull()
             throws DocumentException
Description copied from interface: Property
Nullify this property.

The property is set to null which may result in being removed from the storage (this aspect depends on the implementation)

Specified by:
setNull in interface Property
Throws:
DocumentException

isPropertySet

public boolean isPropertySet(java.lang.String name)
                      throws DocumentException
Description copied from interface: Property
Checks whether this property has child property with the given name.

Specified by:
isPropertySet in interface Property
Returns:
true if this property has children properties, false otherwise
Throws:
DocumentException

getProperty

public Property getProperty(java.lang.String name)
                     throws DocumentException
Description copied from interface: Property
Gets the children property given its name.

Specified by:
getProperty in interface Property
Parameters:
name - the property name
Returns:
the property
Throws:
DocumentException

getProperties

public java.util.Collection<Property> getProperties()
                                             throws DocumentException
Description copied from interface: Property
Gets the collection of the children properties.

Specified by:
getProperties in interface Property
Returns:
an iterator over the children properties
Throws:
DocumentException

getPropertyIterator

public java.util.Iterator<Property> getPropertyIterator()
                                                 throws DocumentException
Description copied from interface: Property
Gets an iterator over the children properties.

Specified by:
getPropertyIterator in interface Property
Returns:
an iterator over the children properties
Throws:
DocumentException

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.