Class Node

    • Field Detail

      • hierFragment

        protected final SimpleFragment hierFragment
        The hierarchy/main fragment.
      • fragments

        protected final org.nuxeo.ecm.core.storage.sql.FragmentsMap fragments
        Fragment information for each additional mixin or inherited fragment.
      • path

        protected String path
        Path, only for immediate consumption after construction (will be reset to null afterwards).
    • Constructor Detail

      • Node

        protected Node​(PersistenceContext context,
                       org.nuxeo.ecm.core.storage.sql.FragmentGroup fragmentGroup,
                       String path)
        Creates a Node.
        Parameters:
        context - the persistence context
        fragmentGroup - the group of fragments for the node
        path - the path, if known at construction time
    • 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()
      • getPos

        public Long getPos()
      • getPrimaryType

        public String getPrimaryType()
      • 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()
      • isRecord

        public boolean isRecord()
      • isFlexibleRecord

        public boolean isFlexibleRecord()
        Since:
        2023.1
      • getMixinTypes

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

        Never returns null.

      • getRetainedProperties

        public String[] getRetainedProperties()
        Gets the retained properties.

        Never returns null.

        Since:
        2021.32
      • setRetainedProperties

        public void setRetainedProperties​(String[] retainedProps)
        Sets the retained properties.
        Parameters:
        retainedProps - the retained properties.
        Since:
        2021.32
      • 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.
      • clearCache

        protected void clearCache()
        Clears the properties cache, used when removing mixins.
      • getSimpleProperty

        public SimpleProperty getSimpleProperty​(String name)
        Gets a simple property from the node, given its name.
        Parameters:
        name - the property name
        Returns:
        the property
        Throws:
        PropertyNotFoundException - if the name is invalid
      • getCollectionProperty

        public CollectionProperty getCollectionProperty​(String name)
        Gets a collection property from the node, given its name.
        Parameters:
        name - the property name
        Returns:
        the property
        Throws:
        PropertyNotFoundException - if the name is invalid
      • setSimpleProperty

        public void setSimpleProperty​(String name,
                                      Object value)
      • setCollectionProperty

        public void setCollectionProperty​(String name,
                                          Object[] value)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object