if ((prel != null) && prel.hasAccessName()) { String propname = dbmap.columnNameToProperty(prel.accessName); String propvalue = getString(propname);
if (prel != null) { if (prel.groupby != null) { setName(getString("groupname")); anonymous = false; } else if (prel.accessName != null) { String propname = dbmap.columnNameToProperty(prel.accessName); String propvalue = getString(propname);
    public String getElementName() {        // if subnodes are also mounted as properties, try to get the "nice" prop value        // instead of the id by turning the anonymous flag off.        long lastmod = lastmodified;        if (dbmap != null) {            lastmod = Math.max(lastmod, dbmap.getLastTypeChange());        }        if ((parentHandle != null) && (lastNameCheck < lastmod)) {            try {                Node p = parentHandle.getNode(nmgr);                DbMapping parentmap = p.getDbMapping();                Relation prel = parentmap.getSubnodeRelation();                if ((prel != null) && prel.hasAccessName()) {                    String propname = dbmap.columnNameToProperty(prel.accessName);                    String propvalue = getString(propname);                    if ((propvalue != null) && (propvalue.length() > 0)) {                        setName(propvalue);                        anonymous = false;                        // nameProp = localrel.propName;                    } else if (!anonymous && (p.contains(this) > -1)) {                        anonymous = true;                    }                } else if (!anonymous && (p.contains(this) > -1)) {                    anonymous = true;                }            } catch (Exception ignore) {                // FIXME: add proper NullPointer checks in try statement                // just fall back to default method            }            lastNameCheck = System.currentTimeMillis();        }        return (anonymous || (name == null) || (name.length() == 0)) ? id : name;    }