/** * Determine whether the specified field is a reference field. */ boolean isReferenceField(int storageId) { final IndexInfo info = this.indexInfoMap.get(storageId); return info instanceof SimpleFieldIndexInfo && ((SimpleFieldIndexInfo)info).getFieldType() instanceof ReferenceFieldType; }
protected String toStringPrefix() { return this.getClass().getSimpleName() + "[storageId=" + this.getStorageId() + ",fieldType=" + this.getFieldType() + (this.enumType != null ? ",enumType=" + this.enumType : ""); }
private void gatherForwardCascadeRefs(ObjId id, String cascadeName, ObjIdSet visitedIds, ObjIdSet toVisitIds) { final JClass<?> jclass = this.jdb.jclasses.get(id.getStorageId()); if (jclass == null) return; final List<JReferenceField> fieldList = jclass.forwardCascadeMap.get(cascadeName); if (fieldList == null) return; for (JReferenceField field : fieldList) { final SimpleFieldIndexInfo info = (SimpleFieldIndexInfo)this.jdb.indexInfoMap.get(field.storageId); assert info.getFieldType() instanceof ReferenceFieldType; if (info instanceof ComplexSubFieldIndexInfo) { final ComplexSubFieldIndexInfo subFieldInfo = (ComplexSubFieldIndexInfo)info; this.gatherRefs(subFieldInfo.iterateReferences(this.tx, id).iterator(), visitedIds, toVisitIds); } else { final ObjId referrent = (ObjId)this.tx.readSimpleField(id, field.storageId, false); if (referrent != null && visitedIds.add(referrent)) toVisitIds.add(referrent); } } }
this.wrapRaw(path.getTargetFieldTypes()), fieldIndexInfo.getFieldType()));
assert info == null || info.getFieldType() instanceof ReferenceFieldType; if (info instanceof ComplexSubFieldIndexInfo) { final ComplexSubFieldIndexInfo subFieldInfo = (ComplexSubFieldIndexInfo)info;