org.modeshape.jcr.cache.change

## Class AbstractNodeChange

- java.lang.Object
- - org.modeshape.jcr.cache.change.Change
  - - org.modeshape.jcr.cache.change.AbstractNodeChange

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    AbstractPropertyChange, AbstractSequencingChange, NodeAdded, NodeChanged, NodeMoved, NodeRemoved, NodeRenamed, NodeReordered

      public abstract class AbstractNodeChange
      extends Change

  Abstract base class for all internal events.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Path` | `path`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractNodeChange(NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, boolean queryable)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `NodeKey` | `getKey()`
    `Set<Name>` | `getMixinTypes()` Returns the mixins for this node.
    `Path` | `getPath()` Get the path to the node involved in the change.
    `Name` | `getPrimaryType()` Returns the primary type of the node
    `boolean` | `isQueryable()` Return whether this node is queryable.
    `boolean` | `isType(Name nodeTypeName, NodeTypes nodeTypes)` Determine if the `primary type` or any of the `mixin types` of the changed node exactly matches at least one of the supplied node types.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### path

          protected final Path path

  - ### Constructor Detail

    - #### AbstractNodeChange

          protected AbstractNodeChange(NodeKey key,
                            Path path,
                            Name primaryType,
                            Set<Name> mixinTypes,
                            boolean queryable)

  - ### Method Detail

    - #### getPath

          public Path getPath()

      Get the path to the node involved in the change.
      Returns:
        the path; may not be null

    - #### getKey

          public NodeKey getKey()

      Returns:
        key

    - #### getPrimaryType

          public Name getPrimaryType()

      Returns the primary type of the node
      Returns:
        a `Name` instance; never `null`

    - #### getMixinTypes

          public Set<Name> getMixinTypes()

      Returns the mixins for this node.
      Returns:
        a `Set`; never `null` but possibly empty.

    - #### isType

          public boolean isType(Name nodeTypeName,
                       NodeTypes nodeTypes)

      Determine if the `primary type` or any of the `mixin types` of the changed node exactly matches at least one of the supplied node types.
      Parameters:
        `nodeTypeName` - the name of the node types to be considered; may not be null
        `nodeTypes` - the immutable snapshot of node types; may not be null
      Returns:
        true if the changed node is of the supplied node type or one of its supertypes, or false if none match

    - #### isQueryable

          public boolean isQueryable()

      Return whether this node is queryable.
      Returns:
        true if this node is queryable, or false otherwise

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.