Interface StatementFactory.KeyspaceProvider

Enclosing class:
StatementFactory
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface StatementFactory.KeyspaceProvider
Function interface to determine a keyspace for a given CassandraPersistentEntity and tableName. Classes implementing this interface can choose to return a keyspace or null to use the default keyspace.
Since:
4.4
  • Method Summary

    Modifier and Type
    Method
    Description
    com.datastax.oss.driver.api.core.CqlIdentifier
    getKeyspace(CassandraPersistentEntity<?> entity, com.datastax.oss.driver.api.core.CqlIdentifier tableName)
    Determine a keyspace for a given CassandraPersistentEntity and tableName.
  • Method Details

    • getKeyspace

      @Nullable com.datastax.oss.driver.api.core.CqlIdentifier getKeyspace(CassandraPersistentEntity<?> entity, com.datastax.oss.driver.api.core.CqlIdentifier tableName)
      Determine a keyspace for a given CassandraPersistentEntity and tableName.
      Parameters:
      entity - the persistent entity for which the operation is applied.
      tableName - the table of the operation.
      Returns:
      a keyspace to use a dedicated keyspace for a Statement or null to use the default session keyspace.