Property prop = oid.getObjectType().getProperty(p.getName());
if (oid == null) { Object value = get(p); if (value != null) { throw new IllegalStateException ("key was null but value isn't"); } } else { if (!oid.isInitialized()) { throw new IllegalStateException ("Query does not fetch OID values."); } Property prop = oid.getObjectType().getProperty(p.getName());
    OID load(Session ssn) {        Collection paths = m_signature.getPaths();        ObjectType type = m_signature.getObjectType();        HashMap oids = new HashMap();        // First load up the OIDs.        for (Iterator it = paths.iterator(); it.hasNext(); ) {            Path p = (Path) it.next();            Path parent = p.getParent();            if (type.isKey(p)) {                OID oid;                if (oids.containsKey(parent)) {                    oid = (OID) oids.get(parent);                } else {                    if (parent == null) {                        oid = new OID(type);                    } else {                        oid = new OID(type.getType(parent));                    }                    oids.put(parent, oid);                }                oid.set(p.getName(), get(p));            }        }        // Now load up the values.        for (Iterator it = paths.iterator(); it.hasNext(); ) {            Path p = (Path) it.next();            Path parent = p.getParent();            OID oid = (OID) oids.get(parent);            if (!oid.isInitialized()) {                throw new IllegalStateException                    ("Query does not fetch OID values.");            }            Property prop = oid.getObjectType().getProperty(p.getName());            if (type.isKey(p)) {                ssn.load(oid, prop, oid.get(p.getName()));            } else {                ssn.load(oid, prop, get(p));            }        }        return (OID) oids.get(null);    }