@Override
	synchronized Reference getPrimaryRef(int opIndex) throws IOException {
		if (!isFrom) {
			return null;
		}
		RecordIterator iterator = table.iterator();
		while (iterator.hasNext()) {
			DBRecord rec = iterator.next();
			if (rec.getByteValue(OPINDEX_COL) != opIndex) {
				continue;
			}
			RefListFlagsV0 flags = new RefListFlagsV0(rec.getByteValue(FLAGS_COL));
			if (flags.isPrimary()) {
				return getRef(rec);
			}
		}
		return null;
	}
Construct reference list for existing record
@param rec existing refList record
@param adapter entry record storage adapter
@param addrMap address map for encoding/decoding addresses
@param program associated Program
@param cache RefList object cache
@param isFrom true for from-adapter use, false for to-adapter use
@throws IOException if database IO error occurs
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/BigRefListV0.java