org.jboss.dna.connector.store.jpa.model.basic
Class ChildEntity
java.lang.Object
org.jboss.dna.connector.store.jpa.model.basic.ChildEntity
public class ChildEntity
- extends Object
An entity representing the parent-child relationship between two nodes. 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-sibiling
indexInParent (if there is one).
- Author:
- Randall Hauch
ChildEntity
public ChildEntity()
ChildEntity
public ChildEntity(ChildId id,
int indexInParent,
NamespaceEntity ns,
String name)
ChildEntity
public ChildEntity(ChildId id,
int indexInParent,
NamespaceEntity ns,
String name,
int sameNameSiblingIndex)
getId
public ChildId getId()
- Returns:
- parent
setId
public void setId(ChildId childId)
- Parameters:
childId
- Sets parent to the specified value.
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.
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)
Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.