|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.connector.store.jpa.model.simple.NodeEntity
@Entity public class NodeEntity
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).
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 |
---|
public NodeEntity()
public NodeEntity(long id, NodeEntity parent, String nodeUuidString, long workspaceId, int indexInParent, NamespaceEntity ns, String name)
public NodeEntity(long id, NodeEntity parent, String nodeUuidString, long workspaceId, int indexInParent, NamespaceEntity ns, String name, int sameNameSiblingIndex)
Method Detail |
---|
public long getNodeId()
public void setNodeId(long id)
id
- Sets this node's unique identifierpublic NodeEntity getParent()
public void setParent(NodeEntity parent)
parent
- the parent identifierpublic String getNodeUuidString()
public void setNodeUuidString(String nodeUuidString)
nodeUuidString
- the node UUID stringpublic long getWorkspaceId()
public void setWorkspaceId(long workspaceId)
workspaceId
- the identifier of the workspace containing this nodepublic int getIndexInParent()
public void setIndexInParent(int index)
index
- Sets indexInParent to the specified value.public String getChildName()
public void setChildName(String childName)
childName
- Sets childName to the specified value.public NamespaceEntity getChildNamespace()
public void setChildNamespace(NamespaceEntity childNamespace)
childNamespace
- Sets childNamespace to the specified value.public int getSameNameSiblingIndex()
public void setSameNameSiblingIndex(int sameNameSiblingIndex)
sameNameSiblingIndex
- Sets sameNameSiblingIndex to the specified value.public boolean getAllowsSameNameChildren()
public void setAllowsSameNameChildren(boolean allowsSameNameChildren)
allowsSameNameChildren
- Sets allowsSameNameChildren to the specified value.public byte[] getData()
packed
properties.
public void setData(byte[] data)
packed
properties.
data
- the raw data representing the propertiespublic int getPropertyCount()
public void setPropertyCount(int propertyCount)
propertyCount
- Sets propertyCount to the specified value.public boolean isCompressed()
public void setCompressed(boolean compressed)
compressed
- Sets compressed to the specified value.public List<NodeEntity> getChildren()
public void addChild(NodeEntity child)
public void addChild(int index, NodeEntity child)
public boolean removeChild(int index)
public Collection<LargeValueEntity> getLargeValues()
public boolean isReferentialIntegrityEnforced()
public void setReferentialIntegrityEnforced(boolean referentialIntegrityEnforced)
referentialIntegrityEnforced
- Sets referentialIntegrityEnforced to the specified value.public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public static void adjustSnsIndexesAndIndexesAfterRemoving(javax.persistence.EntityManager entities, Long workspaceId, String uuidParent, String childName, long childNamespaceIndex, int childIndex)
public static int adjustSnsIndexesAndIndexes(javax.persistence.EntityManager entities, Long workspaceId, String uuidParent, int afterIndex, int untilIndex, long childNamespaceIndex, String childName, int modifier)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |