org.modeshape.jcr.index.local

## Class IndexChangeAdapters.AbstractPropertyChangeAdapter<T>

- java.lang.Object
- - org.modeshape.jcr.cache.change.ChangeSetAdapter
  - - org.modeshape.jcr.spi.index.provider.IndexChangeAdapter
    - - org.modeshape.jcr.index.local.IndexChangeAdapters.AbstractPropertyChangeAdapter<T>

- All Implemented Interfaces:
    ChangeSetListener
  Direct Known Subclasses:
    IndexChangeAdapters.EnumeratedPropertyChangeAdapter, IndexChangeAdapters.PropertyChangeAdapter, IndexChangeAdapters.UniquePropertyChangeAdapter
  Enclosing class:
    IndexChangeAdapters

      protected abstract static class IndexChangeAdapters.AbstractPropertyChangeAdapter<T>
      extends IndexChangeAdapter

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.modeshape.jcr.cache.change.ChangeSetAdapter

      `ChangeSetAdapter.NodeTypePredicate`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Name` | `propertyName`
    `protected ValueFactory<T>` | `valueFactory`

    - ### Fields inherited from class org.modeshape.jcr.cache.change.ChangeSetAdapter

      `context, predicate`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexChangeAdapters.AbstractPropertyChangeAdapter(ExecutionContext context, ChangeSetAdapter.NodeTypePredicate matcher, String workspaceName, Name propertyName, ValueFactory<T> valueFactory)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addNode(String workspaceName, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, CachedNode.Properties properties, boolean queryable)` Handle the addition of a node.
    `protected abstract void` | `addValue(NodeKey key, Object value)`
    `protected abstract void` | `addValues(NodeKey key, Property property)`
    `protected T` | `convert(Object value)`
    `protected void` | `modifyProperties(NodeKey key, Map<Name,AbstractPropertyChange> propChanges)` Handle the addition, change, and removal of one or more properties of a single node.
    `protected void` | `reindexNode(String workspaceName, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, CachedNode.Properties properties, boolean queryable)` Handle the reindexing of a node.
    `protected void` | `removeNode(String workspaceName, NodeKey key, NodeKey parentKey, Path path, Name primaryType, Set<Name> mixinTypes, boolean queryable)` Handle the removal of a node.
    `protected abstract void` | `removeValues(NodeKey key)`

    - ### Methods inherited from class org.modeshape.jcr.spi.index.provider.IndexChangeAdapter

      `includesWorkspace, index`

    - ### Methods inherited from class org.modeshape.jcr.cache.change.ChangeSetAdapter

      `addWorkspace, beginChanges, beginWorkspaceChanges, binaryValueUnused, changeNode, completeChanges, completeWorkspaceChanges, moveNode, notify, removeWorkspace, renameNode, reorderNode, repositoryMetadataChanged, sequenced, sequenceFailure`

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

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

- - ### Field Detail

    - #### propertyName

          protected final Name propertyName

    - #### valueFactory

          protected final ValueFactory<T> valueFactory

  - ### Constructor Detail

    - #### IndexChangeAdapters.AbstractPropertyChangeAdapter

          public IndexChangeAdapters.AbstractPropertyChangeAdapter(ExecutionContext context,
                                                           ChangeSetAdapter.NodeTypePredicate matcher,
                                                           String workspaceName,
                                                           Name propertyName,
                                                           ValueFactory<T> valueFactory)

  - ### Method Detail

    - #### convert

          protected final T convert(Object value)

    - #### addValues

          protected abstract void addValues(NodeKey key,
                       Property property)

    - #### addValue

          protected abstract void addValue(NodeKey key,
                      Object value)

    - #### removeValues

          protected abstract void removeValues(NodeKey key)

    - #### addNode

          protected void addNode(String workspaceName,
                     NodeKey key,
                     Path path,
                     Name primaryType,
                     Set<Name> mixinTypes,
                     CachedNode.Properties properties,
                     boolean queryable)

      Description copied from class: `ChangeSetAdapter`
      Handle the addition of a node.
      Overrides:
        `addNode` in class `ChangeSetAdapter`
      Parameters:
        `workspaceName` - the workspace in which the node information should be available; may not be null
        `key` - the unique key for the node; may not be null
        `path` - the path of the node; may not be null
        `primaryType` - the primary type of the node; may not be null
        `mixinTypes` - the mixin types for the node; may not be null but may be empty
        `properties` - the properties of the node; may not be null but may be empty
        `queryable` - true if the node is queryable, false otherwise

    - #### reindexNode

          protected void reindexNode(String workspaceName,
                         NodeKey key,
                         Path path,
                         Name primaryType,
                         Set<Name> mixinTypes,
                         CachedNode.Properties properties,
                         boolean queryable)

      Description copied from class: `ChangeSetAdapter`
      Handle the reindexing of a node.
      Overrides:
        `reindexNode` in class `ChangeSetAdapter`
      Parameters:
        `workspaceName` - the workspace in which the node information should be available; may not be null
        `key` - the unique key for the node; may not be null
        `path` - the path of the node; may not be null
        `primaryType` - the primary type of the node; may not be null
        `mixinTypes` - the mixin types for the node; may not be null but may be empty
        `properties` - the properties of the node; may not be null but may be empty
        `queryable` - true if the node is queryable, false otherwise

    - #### modifyProperties

          protected void modifyProperties(NodeKey key,
                              Map<Name,AbstractPropertyChange> propChanges)

      Description copied from class: `ChangeSetAdapter`
      Handle the addition, change, and removal of one or more properties of a single node. This method is called once for each existing node whose properties are modified.
      Overrides:
        `modifyProperties` in class `ChangeSetAdapter`
      Parameters:
        `key` - the unique key for the node; may not be null
        `propChanges` - the map of property modification events, keyed by the names of the properties; never null and never empty

    - #### removeNode

          protected void removeNode(String workspaceName,
                        NodeKey key,
                        NodeKey parentKey,
                        Path path,
                        Name primaryType,
                        Set<Name> mixinTypes,
                        boolean queryable)

      Description copied from class: `ChangeSetAdapter`
      Handle the removal of a node.
      Overrides:
        `removeNode` in class `ChangeSetAdapter`
      Parameters:
        `workspaceName` - the workspace in which the node information should be available; may not be null
        `key` - the unique key for the node; may not be null
        `parentKey` - the unique key for the parent of the node; may not be null
        `path` - the path of the node; may not be null
        `primaryType` - the primary type of the node; may not be null
        `mixinTypes` - the mixin types for the node; may not be null but may be empty
        `queryable` - true if the node is queryable, false otherwise

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