Class AbstractStatement

java.lang.Object
com.tangosol.util.Base
com.tangosol.coherence.dslquery.statement.AbstractStatement
All Implemented Interfaces:
Statement
Direct Known Subclasses:
AbstractSnapshotStatement, BackupStatementBuilder.BackupStatement, CreateCacheStatementBuilder.CreateCacheStatement, CreateIndexStatementBuilder.CreateIndexStatement, DeleteStatementBuilder.DeleteStatement, DropCacheStatementBuilder.DropCacheStatement, DropIndexStatementBuilder.DropIndexStatement, ForceRecoveryStatementBuilder.ForceRecoveryStatement, InsertStatementBuilder.InsertStatement, ListArchiverStatementBuilder.ListArchiverStatement, ListServicesStatementBuilder.ListServicesStatement, ListSnapshotsStatementBuilder.ListSnapshotsStatement, QueryRecorderStatementBuilder.QueryRecorderStatement, RestoreStatementBuilder.RestoreStatement, ResumeServiceStatementBuilder.ResumeServiceStatement, SelectStatementBuilder.SelectStatement, SourceStatementBuilder.SourceStatement, SuspendServiceStatementBuilder.SuspendServiceStatement, TruncateCacheStatementBuilder.TruncateCacheStatement, UpdateStatementBuilder.UpdateStatement, ValidateSnapshotStatementBuilder.ValidateSnapshotStatement

public abstract class AbstractStatement extends Base implements Statement
A base class for Statement implementations.
Since:
Coherence 12.2.1
Author:
jk 2013.12.10
  • Constructor Details

    • AbstractStatement

      public AbstractStatement()
  • Method Details

    • sanityCheck

      public void sanityCheck(ExecutionContext ctx)
      Description copied from interface: Statement
      Perform sanity checks on the statement that will be executed.

      Implementations can fail sanity checking by throwing an unchecked exception (RuntimeException).

      Specified by:
      sanityCheck in interface Statement
      Parameters:
      ctx - the context to use
    • getExecutionConfirmation

      public String getExecutionConfirmation(ExecutionContext ctx)
      Description copied from interface: Statement
      Return a string that will be used as a question to confirm execution of a statement. If null is returned then no confirmation is required.
      Specified by:
      getExecutionConfirmation in interface Statement
      Parameters:
      ctx - the context to use
      Returns:
      a String that will be used to confirm execution of a statement
    • assertCacheName

      protected void assertCacheName(String sName, ExecutionContext ctx)
      Test to see whether the given String is a known cache name.
      Parameters:
      sName - the cache name
      ctx - the execution context of the CohQL query
      Throws:
      AssertionError - if a cache with the given name does not exist.