Search in sources :

Example 1 with QueryRegistrationOperations

use of org.neo4j.kernel.impl.api.operations.QueryRegistrationOperations in project neo4j by neo4j.

the class NeoStoreDataSource method buildStatementOperations.

private StatementOperationContainer buildStatementOperations(StoreReadLayer storeReadLayer, AutoIndexing autoIndexing, ConstraintIndexCreator constraintIndexCreator, UpdateableSchemaState updateableSchemaState, Guard guard, LegacyIndexStore legacyIndexStore) {
    // The passed in StoreReadLayer is the bottom most layer: Read-access to committed data.
    // To it we add:
    // + Transaction state handling
    StateHandlingStatementOperations stateHandlingContext = new StateHandlingStatementOperations(storeReadLayer, autoIndexing, constraintIndexCreator, legacyIndexStore);
    QueryRegistrationOperations queryRegistrationOperations = new StackingQueryRegistrationOperations(clock);
    StatementOperationParts parts = new StatementOperationParts(stateHandlingContext, stateHandlingContext, stateHandlingContext, stateHandlingContext, stateHandlingContext, stateHandlingContext, new SchemaStateConcern(updateableSchemaState), null, stateHandlingContext, stateHandlingContext, stateHandlingContext, queryRegistrationOperations);
    // + Constraints
    ConstraintEnforcingEntityOperations constraintEnforcingEntityOperations = new ConstraintEnforcingEntityOperations(constraintSemantics, parts.entityWriteOperations(), parts.entityReadOperations(), parts.schemaWriteOperations(), parts.schemaReadOperations());
    // + Data integrity
    DataIntegrityValidatingStatementOperations dataIntegrityContext = new DataIntegrityValidatingStatementOperations(parts.keyWriteOperations(), parts.schemaReadOperations(), constraintEnforcingEntityOperations);
    parts = parts.override(null, dataIntegrityContext, constraintEnforcingEntityOperations, constraintEnforcingEntityOperations, null, dataIntegrityContext, null, null, null, null, null, null);
    // + Locking
    LockingStatementOperations lockingContext = new LockingStatementOperations(parts.entityReadOperations(), parts.entityWriteOperations(), parts.schemaReadOperations(), parts.schemaWriteOperations(), parts.schemaStateOperations());
    parts = parts.override(null, null, null, lockingContext, lockingContext, lockingContext, lockingContext, lockingContext, null, null, null, null);
    // + Guard
    GuardingStatementOperations guardingOperations = new GuardingStatementOperations(parts.entityWriteOperations(), parts.entityReadOperations(), guard);
    StatementOperationParts guardedParts = parts.override(null, null, guardingOperations, guardingOperations, null, null, null, null, null, null, null, null);
    return new StatementOperationContainer(guardedParts, parts);
}
Also used : StackingQueryRegistrationOperations(org.neo4j.kernel.impl.api.StackingQueryRegistrationOperations) QueryRegistrationOperations(org.neo4j.kernel.impl.api.operations.QueryRegistrationOperations) SchemaStateConcern(org.neo4j.kernel.impl.api.SchemaStateConcern) StatementOperationParts(org.neo4j.kernel.impl.api.StatementOperationParts) LockingStatementOperations(org.neo4j.kernel.impl.api.LockingStatementOperations) StateHandlingStatementOperations(org.neo4j.kernel.impl.api.StateHandlingStatementOperations) ConstraintEnforcingEntityOperations(org.neo4j.kernel.impl.api.ConstraintEnforcingEntityOperations) StackingQueryRegistrationOperations(org.neo4j.kernel.impl.api.StackingQueryRegistrationOperations) GuardingStatementOperations(org.neo4j.kernel.impl.api.GuardingStatementOperations) StatementOperationContainer(org.neo4j.kernel.impl.api.StatementOperationContainer) DataIntegrityValidatingStatementOperations(org.neo4j.kernel.impl.api.DataIntegrityValidatingStatementOperations)

Aggregations

ConstraintEnforcingEntityOperations (org.neo4j.kernel.impl.api.ConstraintEnforcingEntityOperations)1 DataIntegrityValidatingStatementOperations (org.neo4j.kernel.impl.api.DataIntegrityValidatingStatementOperations)1 GuardingStatementOperations (org.neo4j.kernel.impl.api.GuardingStatementOperations)1 LockingStatementOperations (org.neo4j.kernel.impl.api.LockingStatementOperations)1 SchemaStateConcern (org.neo4j.kernel.impl.api.SchemaStateConcern)1 StackingQueryRegistrationOperations (org.neo4j.kernel.impl.api.StackingQueryRegistrationOperations)1 StateHandlingStatementOperations (org.neo4j.kernel.impl.api.StateHandlingStatementOperations)1 StatementOperationContainer (org.neo4j.kernel.impl.api.StatementOperationContainer)1 StatementOperationParts (org.neo4j.kernel.impl.api.StatementOperationParts)1 QueryRegistrationOperations (org.neo4j.kernel.impl.api.operations.QueryRegistrationOperations)1