Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.storage.sql
Class Node

java.lang.Object
  extended by org.nuxeo.ecm.core.storage.sql.Node

public class Node
extends Object

A Node implementation. The actual data is stored in contained objects that are Fragments.


Method Summary
 boolean addMixinType(String mixin)
          Adds a mixin.
 boolean equals(Object other)
           
 Set<String> getAllMixinTypes()
          Gets the mixins.
 CollectionProperty getCollectionProperty(String name)
          Gets a collection property from the node, given its name.
 Serializable getId()
          Gets the node unique id, usually a Long or a String.
 String[] getMixinTypes()
          Gets the instance mixins.
 String getName()
           
 String getParentId()
           
 String getPath()
          Gets the path that was assigned at Node construction time.
 String getPrimaryType()
           
 BaseProperty getProperty(String name)
           
 SimpleProperty getSimpleProperty(String name)
          Gets a simple property from the node, given its name.
 int hashCode()
           
 boolean hasMixinType(String mixin)
          Checks the mixins.
 boolean isProxy()
           
 boolean isVersion()
           
 boolean removeMixinType(String mixin)
          Removes a mixin.
 void setCollectionProperty(String name, Serializable[] value)
           
 void setSimpleProperty(String name, Serializable value)
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getId

public Serializable getId()
Gets the node unique id, usually a Long or a String.

Returns:
the node id

getName

public String getName()

getPrimaryType

public String getPrimaryType()

getParentId

public String getParentId()

getPath

public String getPath()
Gets the path that was assigned at Node construction time. Then it's reset to null. Should only be used once.

Returns:
the path, or null for unknown

isVersion

public boolean isVersion()

isProxy

public boolean isProxy()

getMixinTypes

public String[] getMixinTypes()
Gets the instance mixins. Mixins from the type are not returned.

Never returns null.


getAllMixinTypes

public Set<String> getAllMixinTypes()
Gets the mixins. Includes mixins from the type. Returns a fresh set.


hasMixinType

public boolean hasMixinType(String mixin)
Checks the mixins. Includes mixins from the type.


addMixinType

public boolean addMixinType(String mixin)
Adds a mixin.


removeMixinType

public boolean removeMixinType(String mixin)
Removes a mixin.


getSimpleProperty

public SimpleProperty getSimpleProperty(String name)
                                 throws StorageException
Gets a simple property from the node, given its name.

Parameters:
name - the property name
Returns:
the property
Throws:
IllegalArgumentException - if the name is invalid
StorageException

getCollectionProperty

public CollectionProperty getCollectionProperty(String name)
                                         throws StorageException
Gets a collection property from the node, given its name.

Parameters:
name - the property name
Returns:
the property
Throws:
IllegalArgumentException - if the name is invalid
StorageException

getProperty

public BaseProperty getProperty(String name)
                         throws StorageException
Throws:
StorageException

setSimpleProperty

public void setSimpleProperty(String name,
                              Serializable value)
                       throws StorageException
Throws:
StorageException

setCollectionProperty

public void setCollectionProperty(String name,
                                  Serializable[] value)
                           throws StorageException
Throws:
StorageException

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.