Class BasicBatchKey

java.lang.Object
org.hibernate.engine.jdbc.batch.internal.BasicBatchKey
All Implemented Interfaces:
BatchKey

public class BasicBatchKey extends Object implements BatchKey
Normal implementation of BatchKey
Author:
Steve Ebersole
  • Constructor Details

    • BasicBatchKey

      public BasicBatchKey(String comparison)
      Constructs a BasicBatchKey with Expectations.NONE
    • BasicBatchKey

      public BasicBatchKey(String comparison, Expectation expectation)
      Constructs a BasicBatchKey
      Parameters:
      comparison - A string used to compare batch keys.
      expectation - The expectation for the batch
  • Method Details

    • getExpectation

      public Expectation getExpectation()
      Description copied from interface: BatchKey
      Get the expectation pertaining to the outcome of the Batch associated with this key.
      Specified by:
      getExpectation in interface BatchKey
      Returns:
      The expectations
    • getBatchedStatementCount

      public int getBatchedStatementCount()
      Description copied from interface: BatchKey
      How many statements will be in this batch?

      Note that this is distinctly different to the size of the batch.

      Specified by:
      getBatchedStatementCount in interface BatchKey
      Returns:
      The number of statements.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toLoggableString

      public String toLoggableString()
      Specified by:
      toLoggableString in interface BatchKey
    • toString

      public String toString()
      Overrides:
      toString in class Object