protected void appendFilter(StringBuffer q, INode nonvirtual, String prefix) throws SQLException {
protected void appendFilter(StringBuffer q, INode nonvirtual, String prefix) {
    protected void appendFilter(StringBuffer q, INode nonvirtual, String prefix) throws SQLException {        q.append(prefix);        q.append('(');        if (filterFragments == null) {            q.append(filter);        } else {            Enumeration i = filterFragments.elements();            Enumeration j = filterPropertyRefs.elements();            while (i.hasMoreElements()) {                String fragment = (String) i.nextElement();                if (fragment == null) {                    /*                    // begin property version                    String propertyName = (String) j.nextElement();                    Object value = null;                    if (propertyName != null) {                        if (propertyName.equals("__id__") || propertyName.equals("_id")) {                            value = nonvirtual.getID();                        } else if (propertyName.equals("__name__")) {                            value = nonvirtual.getName();                        } else if (propertyName.equals("__prototype__") || propertyName.equals("_prototype")) {                            value = nonvirtual.getPrototype();                        } else {                            IProperty property = nonvirtual.get(propertyName);                            if (property != null) {                                value = property.getValue();                            }                        }                    }                    // end property version                    */                    // begin column version                    String columnName = (String) j.nextElement();                    Object value = null;                    if (columnName != null) {                        DbMapping dbmap = nonvirtual.getDbMapping();                        String propertyName = dbmap.columnNameToProperty(columnName);                        if (propertyName != null) {                            IProperty property = nonvirtual.get(propertyName);                            if (property != null) {                                value = property.getValue();                            }                        }                        if (value == null) {                            if (columnName.equals(dbmap.getIDField())) {                                value = nonvirtual.getID();                            } else if (columnName.equals(dbmap.getNameField())) {                                value = nonvirtual.getName();                            } else if (columnName.equals(dbmap.getPrototypeField())) {                                value = nonvirtual.getPrototype();                            }                        }                    }                    // end column version                    if (value != null) {                        q.append(escape(value.toString()));                    } else {                        q.append("NULL");                    }                } else {                    q.append(fragment);                }            }        }        q.append(')');    }