private void removeEntryFromParent(Entry entry,Entry parent,boolean doNotUpdateSiblings){
  final String entryId=entry.getId();
  final String nextSiblingId=entry.getNextSiblingId();
  final String previousSiblingId=entry.getPreviousSiblingId();
  entry.setParentId(null);
  final String parentsFirstId=parent.getFirstChildId();
  if (parentsFirstId.equals(entryId)) {
    parent.setFirstChildId(nextSiblingId);
  }
  final String parentsLastId=parent.getLastChildId();
  if (parentsLastId.equals(entryId)) {
    parent.setLastChildId(previousSiblingId);
  }
  final Entry previousSibling=getEntryById(previousSiblingId);
  final Entry nextSibling=getEntryById(nextSiblingId);
  if (!doNotUpdateSiblings) {
    if (nextSibling != null) {
      nextSibling.setPreviousSiblingId(previousSiblingId);
    }
    if (previousSibling != null) {
      previousSibling.setNextSiblingId(nextSiblingId);
    }
  }
  entry.setNextSiblingId(null);
  entry.setPreviousSiblingId(null);
}

private void removeEntryFromParent ( Entry entry , Entry parent , boolean doNotUpdateSiblings ) { final String entryId = entry . getId ( ) ; final String nextSiblingId = entry . getNextSiblingId ( ) ; final String previousSiblingId = entry . getPreviousSiblingId ( ) ; entry . setParentId ( null ) ; final String parentsFirstId = parent . getFirstChildId ( ) ; if ( parentsFirstId . equals ( entryId ) ) { parent . setFirstChildId ( nextSiblingId ) ; } final String parentsLastId = parent . getLastChildId ( ) ; if ( parentsLastId . equals ( entryId ) ) { parent . setLastChildId ( previousSiblingId ) ; } final Entry previousSibling = getEntryById ( previousSiblingId ) ; final Entry nextSibling = getEntryById ( nextSiblingId ) ; if ( ! doNotUpdateSiblings ) { if ( nextSibling != null ) { nextSibling . setPreviousSiblingId ( previousSiblingId ) ; } if ( previousSibling != null ) { previousSibling . setNextSiblingId ( nextSiblingId ) ; } } entry . setNextSiblingId ( null ) ; entry . setPreviousSiblingId ( null ) ; }
helper method . removes the entry from its parent . after this method call the entry is unattached go any parent or sibling . this method updates the entry , its parents , and its siblings .
