*
* @param nodeToRemove
* The node to remove.
*/
public void removeNode(Object nodeToRemove) {
CriteriaTreeNode node = (CriteriaTreeNode) nodeToRemove;
// only remove the node if it is not the root node
if (node.getParent() != null) {
CriteriaNode parentNode = (CriteriaNode) node.getParent();
parentNode.removeChild(node);
}
}