Exemplo n.º 1
0
        public override void CheckReference(RECORD record, DynamicRecord dynamicRecord, CheckerEngine <RECORD, REPORT> engine, RecordAccess records)
        {
            _recordIds.put(dynamicRecord.Id, dynamicRecord);

            if (dynamicRecord.InUse())
            {
                _recordList.Add(dynamicRecord);
            }
            else
            {
                _allInUse = false;
                _validator.onRecordNotInUse(dynamicRecord, engine);
            }

            long nextBlock = dynamicRecord.NextBlock;

            if (Record.NO_NEXT_BLOCK.@is(nextBlock))
            {
                if (_allInUse)
                {
                    // only validate label ids if all dynamic records seen were in use
                    _validator.onWellFormedChain(LabelIds(_recordList), engine, records);
                }
            }
            else
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.kernel.impl.store.record.DynamicRecord nextRecord = recordIds.get(nextBlock);
                DynamicRecord nextRecord = _recordIds.get(nextBlock);
                if (nextRecord != null)
                {
                    _validator.onRecordChainCycle(nextRecord, engine);
                }
                else
                {
                    engine.ComparativeCheck(records.NodeLabels(nextBlock), this);
                }
            }
        }
Exemplo n.º 2
0
 public override RecordReference <DynamicRecord> NodeLabels(long id)
 {
     return(@delegate.NodeLabels(id));
 }