Package org.hibernate.dialect.aggregate
Class PostgreSQLAggregateSupport
- java.lang.Object
-
- org.hibernate.dialect.aggregate.AggregateSupportImpl
-
- org.hibernate.dialect.aggregate.PostgreSQLAggregateSupport
-
- All Implemented Interfaces:
AggregateSupport
public class PostgreSQLAggregateSupport extends AggregateSupportImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.dialect.aggregate.AggregateSupport
AggregateSupport.AggregateColumnWriteExpression, AggregateSupport.WriteExpressionRenderer
-
-
Constructor Summary
Constructors Constructor Description PostgreSQLAggregateSupport()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
aggregateComponentAssignmentExpression(String aggregateParentAssignmentExpression, String columnExpression, AggregateColumn aggregateColumn, Column column)
Returns the assignment expression to use forcolumn
, which is part of the aggregate type ofaggregatePath
.String
aggregateComponentCustomReadExpression(String template, String placeholder, String aggregateParentReadExpression, String columnExpression, AggregateColumn aggregateColumn, Column column)
Returns the custom read expression to use forcolumn
.AggregateSupport.WriteExpressionRenderer
aggregateCustomWriteExpressionRenderer(SelectableMapping aggregateColumn, SelectableMapping[] columnsToUpdate, TypeConfiguration typeConfiguration)
boolean
preferSelectAggregateMapping(int aggregateSqlTypeCode)
Whether to prefer selecting the aggregate column as a whole instead of individual parts.boolean
requiresAggregateCustomWriteExpressionRenderer(int aggregateSqlTypeCode)
WhetherAggregateSupport.aggregateCustomWriteExpressionRenderer(SelectableMapping, SelectableMapping[], TypeConfiguration)
is needed when assigning an expression to individual aggregated columns in an update statement.static AggregateSupport
valueOf(Dialect dialect)
-
Methods inherited from class org.hibernate.dialect.aggregate.AggregateSupportImpl
aggregateAuxiliaryDatabaseObjects, aggregateComponentSqlTypeCode, aggregateCustomWriteExpression, preferBindAggregateMapping, supportsComponentCheckConstraints
-
-
-
-
Method Detail
-
valueOf
public static AggregateSupport valueOf(Dialect dialect)
-
aggregateComponentCustomReadExpression
public String aggregateComponentCustomReadExpression(String template, String placeholder, String aggregateParentReadExpression, String columnExpression, AggregateColumn aggregateColumn, Column column)
Description copied from interface:AggregateSupport
Returns the custom read expression to use forcolumn
. Replaces the givenplaceholder
in the giventemplate
by the custom read expression to use forcolumn
.- Specified by:
aggregateComponentCustomReadExpression
in interfaceAggregateSupport
- Overrides:
aggregateComponentCustomReadExpression
in classAggregateSupportImpl
- Parameters:
template
- The custom read expression template of the columnplaceholder
- The placeholder to replace with the actual read expressionaggregateParentReadExpression
- The expression to the aggregate column, which contains the columncolumnExpression
- The column within the aggregate type, for which to return the read expressionaggregateColumn
- The type information for the aggregate columncolumn
- The column within the aggregate type, for which to return the read expression
-
aggregateComponentAssignmentExpression
public String aggregateComponentAssignmentExpression(String aggregateParentAssignmentExpression, String columnExpression, AggregateColumn aggregateColumn, Column column)
Description copied from interface:AggregateSupport
Returns the assignment expression to use forcolumn
, which is part of the aggregate type ofaggregatePath
.- Specified by:
aggregateComponentAssignmentExpression
in interfaceAggregateSupport
- Overrides:
aggregateComponentAssignmentExpression
in classAggregateSupportImpl
- Parameters:
aggregateParentAssignmentExpression
- The expression to the aggregate column, which contains the columncolumnExpression
- The column within the aggregate type, for which to return the assignment expressionaggregateColumn
- The type information for the aggregate columncolumn
- The column within the aggregate type, for which to return the assignment expression
-
requiresAggregateCustomWriteExpressionRenderer
public boolean requiresAggregateCustomWriteExpressionRenderer(int aggregateSqlTypeCode)
Description copied from interface:AggregateSupport
WhetherAggregateSupport.aggregateCustomWriteExpressionRenderer(SelectableMapping, SelectableMapping[], TypeConfiguration)
is needed when assigning an expression to individual aggregated columns in an update statement.- Specified by:
requiresAggregateCustomWriteExpressionRenderer
in interfaceAggregateSupport
- Overrides:
requiresAggregateCustomWriteExpressionRenderer
in classAggregateSupportImpl
-
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 interfaceAggregateSupport
- Overrides:
preferSelectAggregateMapping
in classAggregateSupportImpl
-
aggregateCustomWriteExpressionRenderer
public AggregateSupport.WriteExpressionRenderer aggregateCustomWriteExpressionRenderer(SelectableMapping aggregateColumn, SelectableMapping[] columnsToUpdate, TypeConfiguration typeConfiguration)
- Specified by:
aggregateCustomWriteExpressionRenderer
in interfaceAggregateSupport
- Overrides:
aggregateCustomWriteExpressionRenderer
in classAggregateSupportImpl
- Parameters:
aggregateColumn
- The mapping of the aggregate columncolumnsToUpdate
- The mappings of the columns that should be updatedtypeConfiguration
- The type configuration
-
-