class KernelStatement extends CloseableResourceManager implements TxStateHolder, Statement, AssertOpen {

    @Override
    public void assertOpen()
    {
        if ( referenceCount == 0 )
        {
            throw new NotInTransactionException( "The statement has been closed." );
        }

        Optional<Status> terminationReason = transaction.getReasonIfTerminated();
        terminationReason.ifPresent( status ->
        {
            throw new TransactionTerminatedException( status );
        } );
    }

    public  KernelStatement( KernelTransactionImplementation transaction,
            TxStateHolder txStateHolder,
            StorageReader storageReader,
            LockTracer systemLockTracer,
            StatementOperationParts statementOperations,
            ClockContext clockContext,
            VersionContextSupplier versionContextSupplier );

}