Class AggregateSupportImpl

java.lang.Object
org.hibernate.dialect.aggregate.AggregateSupportImpl
All Implemented Interfaces:
AggregateSupport
Direct Known Subclasses:
CockroachDBAggregateSupport, DB2AggregateSupport, H2AggregateSupport, HANAAggregateSupport, MySQLAggregateSupport, OracleAggregateSupport, PostgreSQLAggregateSupport, SQLServerAggregateSupport, SybaseASEAggregateSupport

public class AggregateSupportImpl extends Object implements AggregateSupport
  • Field Details

  • Constructor Details

    • AggregateSupportImpl

      public AggregateSupportImpl()
  • Method Details

    • aggregateComponentCustomReadExpression

      public String aggregateComponentCustomReadExpression(String template, String placeholder, String aggregateParentReadExpression, String columnExpression, int aggregateColumnTypeCode, SqlTypedMapping column, TypeConfiguration typeConfiguration)
      Description copied from interface: AggregateSupport
      Returns the custom read expression to use for column. Replaces the given placeholder in the given template by the custom read expression to use for column.
      Specified by:
      aggregateComponentCustomReadExpression in interface AggregateSupport
      Parameters:
      template - The custom read expression template of the column
      placeholder - The placeholder to replace with the actual read expression
      aggregateParentReadExpression - The expression to the aggregate column, which contains the column
      columnExpression - The column within the aggregate type, for which to return the read expression
      aggregateColumnTypeCode - The SQL type code of the aggregate column
      column - The column within the aggregate type, for which to return the read expression
      typeConfiguration - The type configuration
    • aggregateComponentAssignmentExpression

      public String aggregateComponentAssignmentExpression(String aggregateParentAssignmentExpression, String columnExpression, int aggregateColumnTypeCode, Column column)
      Description copied from interface: AggregateSupport
      Returns the assignment expression to use for column, which is part of the aggregate type of aggregatePath.
      Specified by:
      aggregateComponentAssignmentExpression in interface AggregateSupport
      Parameters:
      aggregateParentAssignmentExpression - The expression to the aggregate column, which contains the column
      columnExpression - The column within the aggregate type, for which to return the assignment expression
      aggregateColumnTypeCode - The SQL type code of the aggregate column
      column - The column within the aggregate type, for which to return the assignment expression
    • aggregateCustomWriteExpression

      public String aggregateCustomWriteExpression(AggregateColumn aggregateColumn, List<Column> aggregatedColumns)
      Description copied from interface: AggregateSupport
      Returns the custom write expression to use for an aggregate column of the given column type, containing the given aggregated columns.
      Specified by:
      aggregateCustomWriteExpression in interface AggregateSupport
      Parameters:
      aggregateColumn - The type information for the aggregate column
      aggregatedColumns - The columns of the aggregate type
    • requiresAggregateCustomWriteExpressionRenderer

      public boolean requiresAggregateCustomWriteExpressionRenderer(int aggregateSqlTypeCode)
      Description copied from interface: AggregateSupport
      Whether AggregateSupport.aggregateCustomWriteExpressionRenderer(SelectableMapping, SelectableMapping[], TypeConfiguration) is needed when assigning an expression to individual aggregated columns in an update statement.
      Specified by:
      requiresAggregateCustomWriteExpressionRenderer in interface AggregateSupport
    • preferSelectAggregateMapping

      public boolean preferSelectAggregateMapping(int aggregateSqlTypeCode)
      Description copied from interface: AggregateSupport
      Whether to prefer selecting the aggregate column as a whole instead of individual parts.
      Specified by:
      preferSelectAggregateMapping in interface AggregateSupport
    • preferBindAggregateMapping

      public boolean preferBindAggregateMapping(int aggregateSqlTypeCode)
      Description copied from interface: AggregateSupport
      Whether to prefer binding the aggregate column as a whole instead of individual parts.
      Specified by:
      preferBindAggregateMapping in interface AggregateSupport
    • aggregateCustomWriteExpressionRenderer

      public AggregateSupport.WriteExpressionRenderer aggregateCustomWriteExpressionRenderer(SelectableMapping aggregateColumn, SelectableMapping[] columnsToUpdate, TypeConfiguration typeConfiguration)
      Specified by:
      aggregateCustomWriteExpressionRenderer in interface AggregateSupport
      Parameters:
      aggregateColumn - The mapping of the aggregate column
      columnsToUpdate - The mappings of the columns that should be updated
      typeConfiguration - The type configuration
    • aggregateAuxiliaryDatabaseObjects

      public List<AuxiliaryDatabaseObject> aggregateAuxiliaryDatabaseObjects(Namespace namespace, String aggregatePath, AggregateColumn aggregateColumn, List<Column> aggregatedColumns)
      Description copied from interface: AggregateSupport
      Allows to generate auxiliary database objects for an aggregate type.
      Specified by:
      aggregateAuxiliaryDatabaseObjects in interface AggregateSupport
    • aggregateComponentSqlTypeCode

      public int aggregateComponentSqlTypeCode(int aggregateColumnSqlTypeCode, int columnSqlTypeCode)
      Description copied from interface: AggregateSupport
      Returns the SqlTypes type code to use for the given column type code, when aggregated within a column of the given aggregate column type code. Allows to change types when a database does not allow to use certain types within an aggregate type, like DB2 doesn't allow the use of boolean within an object/struct type.
      Specified by:
      aggregateComponentSqlTypeCode in interface AggregateSupport
      Parameters:
      aggregateColumnSqlTypeCode - The SqlTypes type code of the aggregate column
      columnSqlTypeCode - The SqlTypes type code of the column
    • supportsComponentCheckConstraints

      public boolean supportsComponentCheckConstraints()
      Description copied from interface: AggregateSupport
      Returns whether the database supports the use of a check constraint on tables, to implement not-null and other constraints of an aggregate type.
      Specified by:
      supportsComponentCheckConstraints in interface AggregateSupport