Package org.hibernate.dialect.aggregate
Class DB2AggregateSupport
- java.lang.Object
-
- org.hibernate.dialect.aggregate.AggregateSupportImpl
-
- org.hibernate.dialect.aggregate.DB2AggregateSupport
-
- All Implemented Interfaces:
AggregateSupport
public class DB2AggregateSupport extends AggregateSupportImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.dialect.aggregate.AggregateSupport
AggregateSupport.AggregateColumnWriteExpression, AggregateSupport.WriteExpressionRenderer
-
-
Field Summary
Fields Modifier and Type Field Description static AggregateSupportINSTANCE
-
Constructor Summary
Constructors Constructor Description DB2AggregateSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AuxiliaryDatabaseObject>aggregateAuxiliaryDatabaseObjects(Namespace namespace, String aggregatePath, AggregateColumn aggregateColumn, List<Column> aggregatedColumns)Allows to generate auxiliary database objects for an aggregate type.StringaggregateComponentAssignmentExpression(String aggregateParentAssignmentExpression, String columnExpression, AggregateColumn aggregateColumn, Column column)Returns the assignment expression to use forcolumn, which is part of the aggregate type ofaggregatePath.StringaggregateComponentCustomReadExpression(String template, String placeholder, String aggregateParentReadExpression, String columnExpression, AggregateColumn aggregateColumn, Column column)Returns the custom read expression to use forcolumn.intaggregateComponentSqlTypeCode(int aggregateColumnSqlTypeCode, int columnSqlTypeCode)Returns theSqlTypestype code to use for the given column type code, when aggregated within a column of the given aggregate column type code.StringaggregateCustomWriteExpression(AggregateColumn aggregateColumn, List<Column> aggregatedColumns)Returns the custom write expression to use for an aggregate column of the given column type, containing the given aggregated columns.AggregateSupport.WriteExpressionRendereraggregateCustomWriteExpressionRenderer(SelectableMapping aggregateColumn, SelectableMapping[] columnsToUpdate, TypeConfiguration typeConfiguration)booleanpreferBindAggregateMapping(int aggregateSqlTypeCode)Whether to prefer binding the aggregate column as a whole instead of individual parts.booleanpreferSelectAggregateMapping(int aggregateSqlTypeCode)Whether to prefer selecting the aggregate column as a whole instead of individual parts.booleanrequiresAggregateCustomWriteExpressionRenderer(int aggregateSqlTypeCode)WhetherAggregateSupport.aggregateCustomWriteExpressionRenderer(SelectableMapping, SelectableMapping[], TypeConfiguration)is needed when assigning an expression to individual aggregated columns in an update statement.-
Methods inherited from class org.hibernate.dialect.aggregate.AggregateSupportImpl
supportsComponentCheckConstraints
-
-
-
-
Field Detail
-
INSTANCE
public static final AggregateSupport INSTANCE
-
-
Method Detail
-
aggregateComponentCustomReadExpression
public String aggregateComponentCustomReadExpression(String template, String placeholder, String aggregateParentReadExpression, String columnExpression, AggregateColumn aggregateColumn, Column column)
Description copied from interface:AggregateSupportReturns the custom read expression to use forcolumn. Replaces the givenplaceholderin the giventemplateby the custom read expression to use forcolumn.- Specified by:
aggregateComponentCustomReadExpressionin interfaceAggregateSupport- Overrides:
aggregateComponentCustomReadExpressionin 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:AggregateSupportReturns the assignment expression to use forcolumn, which is part of the aggregate type ofaggregatePath.- Specified by:
aggregateComponentAssignmentExpressionin interfaceAggregateSupport- Overrides:
aggregateComponentAssignmentExpressionin 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
-
aggregateCustomWriteExpression
public String aggregateCustomWriteExpression(AggregateColumn aggregateColumn, List<Column> aggregatedColumns)
Description copied from interface:AggregateSupportReturns the custom write expression to use for an aggregate column of the given column type, containing the given aggregated columns.- Specified by:
aggregateCustomWriteExpressionin interfaceAggregateSupport- Overrides:
aggregateCustomWriteExpressionin classAggregateSupportImpl- Parameters:
aggregateColumn- The type information for the aggregate columnaggregatedColumns- The columns of the aggregate type
-
aggregateComponentSqlTypeCode
public int aggregateComponentSqlTypeCode(int aggregateColumnSqlTypeCode, int columnSqlTypeCode)Description copied from interface:AggregateSupportReturns theSqlTypestype 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 ofbooleanwithin an object/struct type.- Specified by:
aggregateComponentSqlTypeCodein interfaceAggregateSupport- Overrides:
aggregateComponentSqlTypeCodein classAggregateSupportImpl- Parameters:
aggregateColumnSqlTypeCode- TheSqlTypestype code of the aggregate columncolumnSqlTypeCode- TheSqlTypestype code of the column
-
requiresAggregateCustomWriteExpressionRenderer
public boolean requiresAggregateCustomWriteExpressionRenderer(int aggregateSqlTypeCode)
Description copied from interface:AggregateSupportWhetherAggregateSupport.aggregateCustomWriteExpressionRenderer(SelectableMapping, SelectableMapping[], TypeConfiguration)is needed when assigning an expression to individual aggregated columns in an update statement.- Specified by:
requiresAggregateCustomWriteExpressionRendererin interfaceAggregateSupport- Overrides:
requiresAggregateCustomWriteExpressionRendererin classAggregateSupportImpl
-
aggregateCustomWriteExpressionRenderer
public AggregateSupport.WriteExpressionRenderer aggregateCustomWriteExpressionRenderer(SelectableMapping aggregateColumn, SelectableMapping[] columnsToUpdate, TypeConfiguration typeConfiguration)
- Specified by:
aggregateCustomWriteExpressionRendererin interfaceAggregateSupport- Overrides:
aggregateCustomWriteExpressionRendererin classAggregateSupportImpl- Parameters:
aggregateColumn- The mapping of the aggregate columncolumnsToUpdate- The mappings of the columns that should be updatedtypeConfiguration- The type configuration
-
preferSelectAggregateMapping
public boolean preferSelectAggregateMapping(int aggregateSqlTypeCode)
Description copied from interface:AggregateSupportWhether to prefer selecting the aggregate column as a whole instead of individual parts.- Specified by:
preferSelectAggregateMappingin interfaceAggregateSupport- Overrides:
preferSelectAggregateMappingin classAggregateSupportImpl
-
preferBindAggregateMapping
public boolean preferBindAggregateMapping(int aggregateSqlTypeCode)
Description copied from interface:AggregateSupportWhether to prefer binding the aggregate column as a whole instead of individual parts.- Specified by:
preferBindAggregateMappingin interfaceAggregateSupport- Overrides:
preferBindAggregateMappingin classAggregateSupportImpl
-
aggregateAuxiliaryDatabaseObjects
public List<AuxiliaryDatabaseObject> aggregateAuxiliaryDatabaseObjects(Namespace namespace, String aggregatePath, AggregateColumn aggregateColumn, List<Column> aggregatedColumns)
Description copied from interface:AggregateSupportAllows to generate auxiliary database objects for an aggregate type.- Specified by:
aggregateAuxiliaryDatabaseObjectsin interfaceAggregateSupport- Overrides:
aggregateAuxiliaryDatabaseObjectsin classAggregateSupportImpl
-
-