class SchemaRecordCheck implements RecordCheck<DynamicRecord, ConsistencyReport.SchemaConsistencyReport> {

    @Override
    public void check( DynamicRecord record,
                       CheckerEngine<DynamicRecord, ConsistencyReport.SchemaConsistencyReport> engine,
                       RecordAccess records )
    {
        if ( record.inUse() && record.isStartRecord() )
        {
            // parse schema rule
            SchemaRule rule;
            try
            {
                rule = ruleAccess.loadSingleSchemaRule( record.getId() );
            }
            catch ( MalformedSchemaRuleException e )
            {
                engine.report().malformedSchemaRule();
                return;
            }

            if ( rule instanceof StoreIndexDescriptor )
            {
                strategy.checkIndexRule( (StoreIndexDescriptor)rule, record, records, engine );
            }
            else if ( rule instanceof ConstraintRule )
            {
                strategy.checkConstraintRule( (ConstraintRule) rule, record, records, engine );
            }
            else
            {
                engine.report().unsupportedSchemaRuleKind( null );
            }
        }
    }

    public  SchemaRecordCheck( SchemaRuleAccess ruleAccess, IndexAccessors indexAccessors );
    private  SchemaRecordCheck(
            SchemaRuleAccess ruleAccess,
            IndexAccessors indexAccessors,
            Map<Long, DynamicRecord> indexObligations,
            Map<Long, DynamicRecord> constraintObligations,
            Map<SchemaRule, DynamicRecord> verifiedRulesWithRecords,
            CheckStrategy strategy );

}