Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.connector.store.jpa.model.simple
Class SimpleJpaRepository.JpaNode

    java.lang.Object
      org.modeshape.connector.store.jpa.model.simple.SimpleJpaRepository.JpaNode

All Implemented Interfaces:
  MapNode

Enclosing class:
  SimpleJpaRepository

    @NotThreadSafe
    protected class SimpleJpaRepository.JpaNode

extends Object
implements MapNode

Adapter between the `persistent entity for nodes` and the `map repository interface for nodes`.

Constructor Summary
`protected` | `SimpleJpaRepository.JpaNode(NodeEntity entity)`
`` | `SimpleJpaRepository.JpaNode(UUID uuid)`

Method Summary
`void` | `addChild(int index, MapNode child)` Inserts the specified child at the specified position in the list of children.
`void` | `addChild(MapNode child)` Adds the given child to the end of the list of children for this node
`void` | `clearChildren()` Removes all of the children for this node in a single operation.
`boolean` | `equals(Object obj)`
`List<MapNode>` | `getChildren()`
`Path.Segment` | `getName()` Returns the name of this node along with its SNS index within its parent's children
`MapNode` | `getParent()` Returns the parent of this node or null if the node is the root node for its workspace.
`Map<Name,Property>` | `getProperties()` Returns a map of property names to the property for the given name
`Property` | `getProperty(ExecutionContext context, String name)` Returns the named property
`Property` | `getProperty(Name name)` Returns the named property
`Set<Name>` | `getUniqueChildNames()` Returns the set of child names for this node
`UUID` | `getUuid()` Returns the UUID for this node
`int` | `hashCode()`
`boolean` | `removeChild(MapNode child)` Removes the given child from the list of children
`MapNode` | `removeProperty(Name propertyName)` Removes the property with the given name
`void` | `setName(Path.Segment name)`
`void` | `setParent(MapNode parent)`
`MapNode` | `setProperties(Iterable<Property> properties, Iterable<Name> removedProperties)` Sets the given properties in a single operation, overwriting any previous properties for the same name This bulk mutator should be used when multiple properties are being set in order to allow underlying implementations to optimize their access to their respective persistent storage mechanism.
`MapNode` | `setProperty(ExecutionContext context, String name, Object... values)` Sets the property with the given name, overwriting any previous property for the given name
`MapNode` | `setProperty(Property property)` Sets the property with the given name, overwriting any previous property for the given name
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SimpleJpaRepository.JpaNode

    protected SimpleJpaRepository.JpaNode(NodeEntity entity)

### SimpleJpaRepository.JpaNode

    public SimpleJpaRepository.JpaNode(UUID uuid)

Method Detail

### addChild

    public void addChild(int index,
                         MapNode child)

  Description copied from interface: `MapNode`
  Inserts the specified child at the specified position in the list of children. Shifts the child currently at that position (if any) and any subsequent children to the right (adds one to their indices).

  Specified by:
    `addChild` in interface `MapNode`
  Parameters:
    `index` - index at which the specified child is to be inserted
    `child` - the child to be inserted

### addChild

    public void addChild(MapNode child)

  Description copied from interface: `MapNode`
  Adds the given child to the end of the list of children for this node

  Specified by:
    `addChild` in interface `MapNode`
  Parameters:
    `child` - the child to add to this node

### getChildren

    public List<MapNode> getChildren()

  Specified by:
    `getChildren` in interface `MapNode`
  Returns:
    children

### getName

    public Path.Segment getName()

  Description copied from interface: `MapNode`
  Returns the name of this node along with its SNS index within its parent's children

  Specified by:
    `getName` in interface `MapNode`
  Returns:
    the name of this node along with its SNS index within its parent's children

### getParent

    public MapNode getParent()

  Description copied from interface: `MapNode`
  Returns the parent of this node or null if the node is the root node for its workspace.

  Specified by:
    `getParent` in interface `MapNode`
  Returns:
    the parent of this node; may be null if the node is the root node for its workspace

### removeProperty

    public MapNode removeProperty(Name propertyName)

  Description copied from interface: `MapNode`
  Removes the property with the given name

  Specified by:
    `removeProperty` in interface `MapNode`
  Parameters:
    `propertyName` - the name of the property to remove
  Returns:
    this map node

### getProperties

    public Map<Name,Property> getProperties()

  Description copied from interface: `MapNode`
  Returns a map of property names to the property for the given name

  Specified by:
    `getProperties` in interface `MapNode`
  Returns:
    a map of property names to the property for the given name

### getProperty

    public Property getProperty(ExecutionContext context,
                                String name)

  Description copied from interface: `MapNode`
  Returns the named property

  Specified by:
    `getProperty` in interface `MapNode`
  Parameters:
    `context` - the current execution context, used to get a `name factory`
    `name` - the name of the property to return
  Returns:
    the property for the given name

### getProperty

    public Property getProperty(Name name)

  Description copied from interface: `MapNode`
  Returns the named property

  Specified by:
    `getProperty` in interface `MapNode`
  Parameters:
    `name` - the name of the property to return
  Returns:
    the property for the given name

### getUniqueChildNames

    public Set<Name> getUniqueChildNames()

  Description copied from interface: `MapNode`
  Returns the set of child names for this node

  Specified by:
    `getUniqueChildNames` in interface `MapNode`
  Returns:
    the set of child names for this node

### getUuid

    public UUID getUuid()

  Description copied from interface: `MapNode`
  Returns the UUID for this node

  Specified by:
    `getUuid` in interface `MapNode`
  Returns:
    the UUID for this node

### removeChild

    public boolean removeChild(MapNode child)

  Description copied from interface: `MapNode`
  Removes the given child from the list of children

  Specified by:
    `removeChild` in interface `MapNode`
  Parameters:
    `child` - the child to be removed
  Returns:
    true if the child was one of this node's children (and was removed); false otherwise

### clearChildren

    public void clearChildren()

  Description copied from interface: `MapNode`
  Removes all of the children for this node in a single operation.

  Specified by:
    `clearChildren` in interface `MapNode`

### setName

    public void setName(Path.Segment name)

  Specified by:
    `setName` in interface `MapNode`
  Parameters:
    `name` - Sets name to the specified value.

### setParent

    public void setParent(MapNode parent)

  Specified by:
    `setParent` in interface `MapNode`
  Parameters:
    `parent` - Sets parent to the specified value.

### setProperty

    public MapNode setProperty(ExecutionContext context,
                               String name,
                               Object... values)

  Description copied from interface: `MapNode`
  Sets the property with the given name, overwriting any previous property for the given name

  Specified by:
    `setProperty` in interface `MapNode`
  Parameters:
    `context` - the current execution context, used to get a `name factory` and `property factory`.
    `name` - the name of the property
    `values` - the values for the property
  Returns:
    this map node

### setProperty

    public MapNode setProperty(Property property)

  Description copied from interface: `MapNode`
  Sets the property with the given name, overwriting any previous property for the given name

  Specified by:
    `setProperty` in interface `MapNode`
  Parameters:
    `property` - the property to set
  Returns:
    this map node

### setProperties

    public MapNode setProperties(Iterable<Property> properties,
                                 Iterable<Name> removedProperties)

  Description copied from interface: `MapNode`
  Sets the given properties in a single operation, overwriting any previous properties for the same name This bulk mutator should be used when multiple properties are being set in order to allow underlying implementations to optimize their access to their respective persistent storage mechanism.

  Specified by:
    `setProperties` in interface `MapNode`
  Parameters:
    `properties` - the properties to set or update
    `removedProperties` - the names of the properties that are to be removed; may be null if there are none
  Returns:
    this map node

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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