if (node.getState() != Node.VIRTUAL) {
if (node.getState() == Node.TRANSIENT) { DbMapping map = node.getDbMapping(); if (map == null || map.getTypeName() != null) return node; } else if (node.getState() != Node.VIRTUAL) {
    public Node getNonVirtualParent() {        Node node = this;        for (int i = 0; i < 5; i++) {            if (node == null) {                break;            }            if (node.getState() != Node.VIRTUAL) {                return node;            }            node = (Node) node.getParent();        }        return null;    }