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 NodeEntity

    java.lang.Object
      org.modeshape.connector.store.jpa.model.simple.NodeEntity

All Implemented Interfaces:
  Serializable

    @Entity
    public class NodeEntity

extends Object
implements Serializable

An entity a node and its properties. In addition to the references to the parent and child nodes, this entity also maintains the indexInParent of the indexInParent within the parent node's list of all children, the child's name ( `local part` and `namespace`), and the same-name-sibling indexInParent (if there is one).

See Also:
  Serialized Form

Constructor Summary
`NodeEntity()`
`NodeEntity(long id, NodeEntity parent, String nodeUuidString, long workspaceId, int indexInParent, NamespaceEntity ns, String name)`
`NodeEntity(long id, NodeEntity parent, String nodeUuidString, long workspaceId, int indexInParent, NamespaceEntity ns, String name, int sameNameSiblingIndex)`

Method Summary
`void` | `addChild(int index, NodeEntity child)`
`void` | `addChild(NodeEntity child)`
`static int` | `adjustSnsIndexesAndIndexes(javax.persistence.EntityManager entities, Long workspaceId, String uuidParent, int afterIndex, int untilIndex, long childNamespaceIndex, String childName, int modifier)`
`static void` | `adjustSnsIndexesAndIndexesAfterRemoving(javax.persistence.EntityManager entities, Long workspaceId, String uuidParent, String childName, long childNamespaceIndex, int childIndex)`
`boolean` | `equals(Object obj)`
`boolean` | `getAllowsSameNameChildren()`
`String` | `getChildName()`
`NamespaceEntity` | `getChildNamespace()`
`List<NodeEntity>` | `getChildren()`
`byte[]` | `getData()` Get the data that represents the `packed` properties.
`int` | `getIndexInParent()` Get the zero-based index of this child within the parent's list of children
`Collection<LargeValueEntity>` | `getLargeValues()`
`long` | `getNodeId()` Returns this node's unique identifier
`String` | `getNodeUuidString()` Returns the node UUID string
`NodeEntity` | `getParent()` Returns the parent identifier
`int` | `getPropertyCount()`
`int` | `getSameNameSiblingIndex()`
`long` | `getWorkspaceId()` Returns the identifier of the workspace containing this node
`int` | `hashCode()`
`boolean` | `isCompressed()`
`boolean` | `isReferentialIntegrityEnforced()`
`boolean` | `removeChild(int index)`
`void` | `setAllowsSameNameChildren(boolean allowsSameNameChildren)`
`void` | `setChildName(String childName)`
`void` | `setChildNamespace(NamespaceEntity childNamespace)`
`void` | `setCompressed(boolean compressed)`
`void` | `setData(byte[] data)` Set the data that represents the `packed` properties.
`void` | `setIndexInParent(int index)`
`void` | `setNodeId(long id)`
`void` | `setNodeUuidString(String nodeUuidString)` Sets the node UUID string
`void` | `setParent(NodeEntity parent)` Sets the parent identifier
`void` | `setPropertyCount(int propertyCount)`
`void` | `setReferentialIntegrityEnforced(boolean referentialIntegrityEnforced)`
`void` | `setSameNameSiblingIndex(int sameNameSiblingIndex)`
`void` | `setWorkspaceId(long workspaceId)` Sets the identifier of the workspace containing this node
`String` | `toString()`

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

Constructor Detail

### NodeEntity

    public NodeEntity()

### NodeEntity

    public NodeEntity(long id,
                      NodeEntity parent,
                      String nodeUuidString,
                      long workspaceId,
                      int indexInParent,
                      NamespaceEntity ns,
                      String name)

### NodeEntity

    public NodeEntity(long id,
                      NodeEntity parent,
                      String nodeUuidString,
                      long workspaceId,
                      int indexInParent,
                      NamespaceEntity ns,
                      String name,
                      int sameNameSiblingIndex)

Method Detail

### getNodeId

    public long getNodeId()

  Returns this node's unique identifier

  Returns:
    this node's unique identifier

### setNodeId

    public void setNodeId(long id)

  Parameters:
    `id` - Sets this node's unique identifier

### getParent

    public NodeEntity getParent()

  Returns the parent identifier

  Returns:
    the parent identifier

### setParent

    public void setParent(NodeEntity parent)

  Sets the parent identifier

  Parameters:
    `parent` - the parent identifier

### getNodeUuidString

    public String getNodeUuidString()

  Returns the node UUID string

  Returns:
    the node UUID string

### setNodeUuidString

    public void setNodeUuidString(String nodeUuidString)

  Sets the node UUID string

  Parameters:
    `nodeUuidString` - the node UUID string

### getWorkspaceId

    public long getWorkspaceId()

  Returns the identifier of the workspace containing this node

  Returns:
    the identifier of the workspace containing this node

### setWorkspaceId

    public void setWorkspaceId(long workspaceId)

  Sets the identifier of the workspace containing this node

  Parameters:
    `workspaceId` - the identifier of the workspace containing this node

### getIndexInParent

    public int getIndexInParent()

  Get the zero-based index of this child within the parent's list of children

  Returns:
    the zero-based index of this child

### setIndexInParent

    public void setIndexInParent(int index)

  Parameters:
    `index` - Sets indexInParent to the specified value.

### getChildName

    public String getChildName()

  Returns:
    childName

### setChildName

    public void setChildName(String childName)

  Parameters:
    `childName` - Sets childName to the specified value.

### getChildNamespace

    public NamespaceEntity getChildNamespace()

  Returns:
    childNamespace

### setChildNamespace

    public void setChildNamespace(NamespaceEntity childNamespace)

  Parameters:
    `childNamespace` - Sets childNamespace to the specified value.

### getSameNameSiblingIndex

    public int getSameNameSiblingIndex()

  Returns:
    sameNameSiblingIndex

### setSameNameSiblingIndex

    public void setSameNameSiblingIndex(int sameNameSiblingIndex)

  Parameters:
    `sameNameSiblingIndex` - Sets sameNameSiblingIndex to the specified value.

### getAllowsSameNameChildren

    public boolean getAllowsSameNameChildren()

  Returns:
    allowsSameNameChildren

### setAllowsSameNameChildren

    public void setAllowsSameNameChildren(boolean allowsSameNameChildren)

  Parameters:
    `allowsSameNameChildren` - Sets allowsSameNameChildren to the specified value.

### getData

    public byte[] getData()

  Get the data that represents the `packed` properties.

  Returns:
    the raw data representing the properties

### setData

    public void setData(byte[] data)

  Set the data that represents the `packed` properties.

  Parameters:
    `data` - the raw data representing the properties

### getPropertyCount

    public int getPropertyCount()

  Returns:
    propertyCount

### setPropertyCount

    public void setPropertyCount(int propertyCount)

  Parameters:
    `propertyCount` - Sets propertyCount to the specified value.

### isCompressed

    public boolean isCompressed()

  Returns:
    compressed

### setCompressed

    public void setCompressed(boolean compressed)

  Parameters:
    `compressed` - Sets compressed to the specified value.

### getChildren

    public List<NodeEntity> getChildren()

### addChild

    public void addChild(NodeEntity child)

### addChild

    public void addChild(int index,
                         NodeEntity child)

### removeChild

    public boolean removeChild(int index)

### getLargeValues

    public Collection<LargeValueEntity> getLargeValues()

  Returns:
    largeValues

### isReferentialIntegrityEnforced

    public boolean isReferentialIntegrityEnforced()

  Returns:
    referentialIntegrityEnforced

### setReferentialIntegrityEnforced

    public void setReferentialIntegrityEnforced(boolean referentialIntegrityEnforced)

  Parameters:
    `referentialIntegrityEnforced` - Sets referentialIntegrityEnforced to the specified value.

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`
  See Also:
    `Object.hashCode()`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`
  See Also:
    `Object.equals(java.lang.Object)`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`
  See Also:
    `Object.toString()`

### adjustSnsIndexesAndIndexesAfterRemoving

    public static void adjustSnsIndexesAndIndexesAfterRemoving(javax.persistence.EntityManager entities,
                                                               Long workspaceId,
                                                               String uuidParent,
                                                               String childName,
                                                               long childNamespaceIndex,
                                                               int childIndex)

### adjustSnsIndexesAndIndexes

    public static int adjustSnsIndexesAndIndexes(javax.persistence.EntityManager entities,
                                                 Long workspaceId,
                                                 String uuidParent,
                                                 int afterIndex,
                                                 int untilIndex,
                                                 long childNamespaceIndex,
                                                 String childName,
                                                 int modifier)

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.