Record Class SqlGenerationRequest

java.lang.Object
java.lang.Record
org.hibernate.dialect.testing.SqlGenerationRequest

@Incubating(since="8.0", group="dialect-testkit") @SPI(USE) public record SqlGenerationRequest(String hql, @Nullable Class<?> expectedResultType, Map<String,Object> parameterValues, @Nullable Pagination pagination, @Nullable LockMode lockMode) extends Record

Inputs for translating one HQL statement through the test kit's fixed internal mapping model.

Only named parameters are supported. Parameter values establish binding types and are never sent to a database.

Since:
8.0
  • Constructor Details

    • SqlGenerationRequest

      public SqlGenerationRequest(String hql, @Nullable Class<?> expectedResultType, Map<String,Object> parameterValues, @Nullable Pagination pagination, @Nullable LockMode lockMode)
      Creates an instance of a SqlGenerationRequest record class.
      Parameters:
      hql - the value for the hql record component
      expectedResultType - the value for the expectedResultType record component
      parameterValues - the value for the parameterValues record component
      pagination - the value for the pagination record component
      lockMode - the value for the lockMode record component
  • Method Details

    • hql

      public static SqlGenerationRequest hql(String hql)
      Create the simplest request for an HQL statement.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hql

      public String hql()
      Returns the value of the hql record component.
      Returns:
      the value of the hql record component
    • expectedResultType

      @Nullable public Class<?> expectedResultType()
      Returns the value of the expectedResultType record component.
      Returns:
      the value of the expectedResultType record component
    • parameterValues

      public Map<String,Object> parameterValues()
      Returns the value of the parameterValues record component.
      Returns:
      the value of the parameterValues record component
    • pagination

      @Nullable public Pagination pagination()
      Returns the value of the pagination record component.
      Returns:
      the value of the pagination record component
    • lockMode

      @Nullable public LockMode lockMode()
      Returns the value of the lockMode record component.
      Returns:
      the value of the lockMode record component