Top Inners Fields Constructors Methods
org.hibernate.dialect.aggregate

public Class DB2AggregateSupport

extends AggregateSupportImpl
Class Inheritance
Imports
java.util.ArrayList, .Collections, .LinkedHashMap, .List, .Locale, .Map, .Set, org.hibernate.boot.model.relational.AuxiliaryDatabaseObject, .NamedAuxiliaryDatabaseObject, .Namespace, org.hibernate.dialect.DB2Dialect, .DB2StructJdbcType, .XmlHelper, org.hibernate.engine.jdbc.Size, org.hibernate.mapping.AggregateColumn, .Column, org.hibernate.metamodel.mapping.EmbeddableMappingType, .SelectableMapping, .SelectablePath, .SqlExpressible, org.hibernate.sql.ast.SqlAstNodeRenderingMode, .SqlAstTranslator, org.hibernate.sql.ast.spi.SqlAppender, org.hibernate.tool.schema.extract.spi.ColumnTypeInformation, org.hibernate.type.descriptor.sql.DdlType, org.hibernate.type.spi.TypeConfiguration

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
pack-priv static interface
private static class
private static class

Field Summary

Modifier and TypeField and Description
public static final AggregateSupport

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public List<AuxiliaryDatabaseObject>
aggregateAuxiliaryDatabaseObjects(Namespace namespace, String aggregatePath, ColumnTypeInformation aggregateColumnType, List<Column> aggregatedColumns)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.aggregateAuxiliaryDatabaseObjects.

Implements org.hibernate.dialect.aggregate.AggregateSupport.aggregateAuxiliaryDatabaseObjects.

Allows to generate auxiliary database objects for an aggregate type.
public String
aggregateComponentAssignmentExpression(String
The expression to the aggregate column, which contains the column
aggregateParentAssignmentExpression
,
String
The column within the aggregate type, for which to return the assignment expression
column
,
ColumnTypeInformation
The type information for the aggregate column
aggregateColumnType
,
ColumnTypeInformation
The type information for the column within the aggregate type
columnType
)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.aggregateComponentAssignmentExpression.

Implements org.hibernate.dialect.aggregate.AggregateSupport.aggregateComponentAssignmentExpression.

Returns the assignment expression to use for column, which is part of the aggregate type of aggregatePath.
public String
aggregateComponentCustomReadExpression(String
The custom read expression template of the column
template
,
String
The placeholder to replace with the actual read expression
placeholder
,
String
The expression to the aggregate column, which contains the column
aggregateParentReadExpression
,
String
The column within the aggregate type, for which to return the read expression
column
,
ColumnTypeInformation
The type information for the aggregate column
aggregateColumnType
,
ColumnTypeInformation
The type information for the column within the aggregate type
columnType
)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.aggregateComponentCustomReadExpression.

Implements org.hibernate.dialect.aggregate.AggregateSupport.aggregateComponentCustomReadExpression.

Returns the custom read expression to use for column.
public int
aggregateComponentSqlTypeCode(int
The org.hibernate.type.SqlTypes type code of the aggregate column
aggregateColumnSqlTypeCode
,
int
The org.hibernate.type.SqlTypes type code of the column
columnSqlTypeCode
)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.aggregateComponentSqlTypeCode.

Implements org.hibernate.dialect.aggregate.AggregateSupport.aggregateComponentSqlTypeCode.

Returns the org.hibernate.type.SqlTypes type code to use for the given column type code, when aggregated within a column of the given aggregate column type code.
public String
aggregateCustomWriteExpression(ColumnTypeInformation
The type information for the aggregate column
aggregateColumnType
,
List<Column>
The columns of the aggregate type
aggregatedColumns
)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.aggregateCustomWriteExpression.

Implements org.hibernate.dialect.aggregate.AggregateSupport.aggregateCustomWriteExpression.

Returns the custom write expression to use for an aggregate column of the given column type, containing the given aggregated columns.
public AggregateSupport.WriteExpressionRenderer
aggregateCustomWriteExpressionRenderer(SelectableMapping
The mapping of the aggregate column
aggregateColumn
,
SelectableMapping[]
The mappings of the columns that should be updated
columnsToUpdate
,
TypeConfiguration
The type configuration
typeConfiguration
)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.aggregateCustomWriteExpressionRenderer.

Implements org.hibernate.dialect.aggregate.AggregateSupport.aggregateCustomWriteExpressionRenderer.

private static void
appendDeserializerColumns(List<Column> aggregatedColumns, StringBuilder deserializerSb, char sep, String prefix)

private static void
appendDeserializerConstructor(List<Column> aggregatedColumns, StringBuilder deserializerSb, String prefix)

private static void
appendSerializer(List<Column> aggregatedColumns, StringBuilder serializerSb, String prefix)

private static void
private static String
private static boolean
public boolean
preferBindAggregateMapping(int aggregateSqlTypeCode)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.preferBindAggregateMapping.

Implements org.hibernate.dialect.aggregate.AggregateSupport.preferBindAggregateMapping.

Whether to prefer binding the aggregate column as a whole instead of individual parts.
public boolean
preferSelectAggregateMapping(int aggregateSqlTypeCode)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.preferSelectAggregateMapping.

Implements org.hibernate.dialect.aggregate.AggregateSupport.preferSelectAggregateMapping.

Whether to prefer selecting the aggregate column as a whole instead of individual parts.
public boolean
private AggregateSupport.WriteExpressionRenderer
Inherited from org.hibernate.dialect.aggregate.AggregateSupportImpl:
supportsComponentCheckConstraints

Field Detail

INSTANCEback to summary
public static final AggregateSupport INSTANCE

Hides org.hibernate.dialect.aggregate.AggregateSupportImpl.INSTANCE.

Constructor Detail

DB2AggregateSupportback to summary
public DB2AggregateSupport()

Method Detail

aggregateAuxiliaryDatabaseObjectsback to summary
public List<AuxiliaryDatabaseObject> aggregateAuxiliaryDatabaseObjects(Namespace namespace, String aggregatePath, ColumnTypeInformation aggregateColumnType, List<Column> aggregatedColumns)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.aggregateAuxiliaryDatabaseObjects.

Implements org.hibernate.dialect.aggregate.AggregateSupport.aggregateAuxiliaryDatabaseObjects.

Doc from org.hibernate.dialect.aggregate.AggregateSupport.aggregateAuxiliaryDatabaseObjects.

Allows to generate auxiliary database objects for an aggregate type.

Annotations
@Override
aggregateComponentAssignmentExpressionback to summary
public String aggregateComponentAssignmentExpression(String aggregateParentAssignmentExpression, String column, ColumnTypeInformation aggregateColumnType, ColumnTypeInformation columnType)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.aggregateComponentAssignmentExpression.

Implements org.hibernate.dialect.aggregate.AggregateSupport.aggregateComponentAssignmentExpression.

Doc from org.hibernate.dialect.aggregate.AggregateSupport.aggregateComponentAssignmentExpression.

Returns the assignment expression to use for column, which is part of the aggregate type of aggregatePath.

Parameters
aggregateParentAssignmentExpression:String

The expression to the aggregate column, which contains the column

column:String

The column within the aggregate type, for which to return the assignment expression

aggregateColumnType:ColumnTypeInformation

The type information for the aggregate column

columnType:ColumnTypeInformation

The type information for the column within the aggregate type

Annotations
@Override
aggregateComponentCustomReadExpressionback to summary
public String aggregateComponentCustomReadExpression(String template, String placeholder, String aggregateParentReadExpression, String column, ColumnTypeInformation aggregateColumnType, ColumnTypeInformation columnType)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.aggregateComponentCustomReadExpression.

Implements org.hibernate.dialect.aggregate.AggregateSupport.aggregateComponentCustomReadExpression.

Doc from org.hibernate.dialect.aggregate.AggregateSupport.aggregateComponentCustomReadExpression.

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.

Parameters
template:String

The custom read expression template of the column

placeholder:String

The placeholder to replace with the actual read expression

aggregateParentReadExpression:String

The expression to the aggregate column, which contains the column

column:String

The column within the aggregate type, for which to return the read expression

aggregateColumnType:ColumnTypeInformation

The type information for the aggregate column

columnType:ColumnTypeInformation

The type information for the column within the aggregate type

Annotations
@Override
aggregateComponentSqlTypeCodeback to summary
public int aggregateComponentSqlTypeCode(int aggregateColumnSqlTypeCode, int columnSqlTypeCode)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.aggregateComponentSqlTypeCode.

Implements org.hibernate.dialect.aggregate.AggregateSupport.aggregateComponentSqlTypeCode.

Doc from org.hibernate.dialect.aggregate.AggregateSupport.aggregateComponentSqlTypeCode.

Returns the org.hibernate.type.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.

Parameters
aggregateColumnSqlTypeCode:int

The org.hibernate.type.SqlTypes type code of the aggregate column

columnSqlTypeCode:int

The org.hibernate.type.SqlTypes type code of the column

Annotations
@Override
aggregateCustomWriteExpressionback to summary
public String aggregateCustomWriteExpression(ColumnTypeInformation aggregateColumnType, List<Column> aggregatedColumns)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.aggregateCustomWriteExpression.

Implements org.hibernate.dialect.aggregate.AggregateSupport.aggregateCustomWriteExpression.

Doc from org.hibernate.dialect.aggregate.AggregateSupport.aggregateCustomWriteExpression.

Returns the custom write expression to use for an aggregate column of the given column type, containing the given aggregated columns.

Parameters
aggregateColumnType:ColumnTypeInformation

The type information for the aggregate column

aggregatedColumns:List<Column>

The columns of the aggregate type

Annotations
@Override
aggregateCustomWriteExpressionRendererback to summary
public AggregateSupport.WriteExpressionRenderer aggregateCustomWriteExpressionRenderer(SelectableMapping aggregateColumn, SelectableMapping[] columnsToUpdate, TypeConfiguration typeConfiguration)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.aggregateCustomWriteExpressionRenderer.

Implements org.hibernate.dialect.aggregate.AggregateSupport.aggregateCustomWriteExpressionRenderer.

Parameters
aggregateColumn:SelectableMapping

Doc from org.hibernate.dialect.aggregate.AggregateSupport.aggregateCustomWriteExpressionRenderer.

The mapping of the aggregate column

columnsToUpdate:SelectableMapping[]

Doc from org.hibernate.dialect.aggregate.AggregateSupport.aggregateCustomWriteExpressionRenderer.

The mappings of the columns that should be updated

typeConfiguration:TypeConfiguration

Doc from org.hibernate.dialect.aggregate.AggregateSupport.aggregateCustomWriteExpressionRenderer.

The type configuration

Annotations
@Override
appendDeserializerColumnsback to summary
private static void appendDeserializerColumns(List<Column> aggregatedColumns, StringBuilder deserializerSb, char sep, String prefix)
appendDeserializerConstructorback to summary
private static void appendDeserializerConstructor(List<Column> aggregatedColumns, StringBuilder deserializerSb, String prefix)
appendSerializerback to summary
private static void appendSerializer(List<Column> aggregatedColumns, StringBuilder serializerSb, String prefix)
appendStructCustomWriteExpressionback to summary
private static void appendStructCustomWriteExpression(ColumnTypeInformation aggregateColumnType, List<Column> aggregatedColumns, StringBuilder sb)
determineTypeNameback to summary
private static String determineTypeName(SelectableMapping column, TypeConfiguration typeConfiguration)
needsVarcharForBitDataCastback to summary
private static boolean needsVarcharForBitDataCast(String columnType)
preferBindAggregateMappingback to summary
public boolean preferBindAggregateMapping(int aggregateSqlTypeCode)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.preferBindAggregateMapping.

Implements org.hibernate.dialect.aggregate.AggregateSupport.preferBindAggregateMapping.

Doc from org.hibernate.dialect.aggregate.AggregateSupport.preferBindAggregateMapping.

Whether to prefer binding the aggregate column as a whole instead of individual parts.

Annotations
@Override
preferSelectAggregateMappingback to summary
public boolean preferSelectAggregateMapping(int aggregateSqlTypeCode)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.preferSelectAggregateMapping.

Implements org.hibernate.dialect.aggregate.AggregateSupport.preferSelectAggregateMapping.

Doc from org.hibernate.dialect.aggregate.AggregateSupport.preferSelectAggregateMapping.

Whether to prefer selecting the aggregate column as a whole instead of individual parts.

Annotations
@Override
requiresAggregateCustomWriteExpressionRendererback to summary
public boolean requiresAggregateCustomWriteExpressionRenderer(int aggregateSqlTypeCode)

Overrides org.hibernate.dialect.aggregate.AggregateSupportImpl.requiresAggregateCustomWriteExpressionRenderer.

Implements org.hibernate.dialect.aggregate.AggregateSupport.requiresAggregateCustomWriteExpressionRenderer.

Doc from org.hibernate.dialect.aggregate.AggregateSupport.requiresAggregateCustomWriteExpressionRenderer.

Whether aggregateCustomWriteExpressionRenderer(SelectableMapping, SelectableMapping[], TypeConfiguration) is needed when assigning an expression to individual aggregated columns in an update statement.

Annotations
@Override
structAggregateColumnWriterback to summary
private AggregateSupport.WriteExpressionRenderer structAggregateColumnWriter(SelectableMapping aggregateColumn, SelectableMapping[] columns, TypeConfiguration typeConfiguration)
org.hibernate.dialect.aggregate back to summary

private Class DB2AggregateSupport.AggregateStructWriteExpression

extends Object
implements AggregateWriteExpression
Class Inheritance
  • java.lang.Object
  • org.hibernate.dialect.aggregate.DB2AggregateSupport.AggregateStructWriteExpression
All Implemented Interfaces
org.hibernate.dialect.aggregate.DB2AggregateSupport.AggregateWriteExpression
Known Direct Subclasses
org.hibernate.dialect.aggregate.DB2AggregateSupport.RootStructWriteExpression

Field Summary

Modifier and TypeField and Description
protected final EmbeddableMappingType
protected final boolean
protected final String
private final LinkedHashMap<String, DB2AggregateSupport.AggregateWriteExpression>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

embeddableMappingTypeback to summary
protected final EmbeddableMappingType embeddableMappingType
nullableback to summary
protected final boolean nullable
structTypeNameback to summary
protected final String structTypeName
subExpressionsback to summary
private final LinkedHashMap<String, DB2AggregateSupport.AggregateWriteExpression> subExpressions

Constructor Detail

AggregateStructWriteExpressionback to summary
public AggregateStructWriteExpression(SelectableMapping selectableMapping)

Method Detail

appendback to summary
public void append(SqlAppender sb, String path, SqlAstTranslator<?> translator, AggregateSupport.AggregateColumnWriteExpression expression)

Implements org.hibernate.dialect.aggregate.DB2AggregateSupport.AggregateWriteExpression.append.

Annotations
@Override
initializeSubExpressionsback to summary
protected void initializeSubExpressions(SelectableMapping[] columns, TypeConfiguration typeConfiguration)
org.hibernate.dialect.aggregate back to summary

pack-priv Interface DB2AggregateSupport.AggregateWriteExpression

Known Direct Implementers
org.hibernate.dialect.aggregate.DB2AggregateSupport.AggregateStructWriteExpression, org.hibernate.dialect.aggregate.DB2AggregateSupport.BasicStructWriteExpression

Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

appendback to summary
public void append(SqlAppender sb, String path, SqlAstTranslator<?> translator, AggregateSupport.AggregateColumnWriteExpression expression)
org.hibernate.dialect.aggregate back to summary

private Class DB2AggregateSupport.BasicStructWriteExpression

extends Object
implements AggregateWriteExpression
Class Inheritance
  • java.lang.Object
  • org.hibernate.dialect.aggregate.DB2AggregateSupport.BasicStructWriteExpression
All Implemented Interfaces
org.hibernate.dialect.aggregate.DB2AggregateSupport.AggregateWriteExpression

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final SelectableMapping
private final String

Constructor Summary

AccessConstructor and Description
pack-priv
BasicStructWriteExpression(SelectableMapping selectableMapping, String typeName, String customWriteExpression)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

customWriteExpressionEndback to summary
private final String customWriteExpressionEnd
customWriteExpressionStartback to summary
private final String customWriteExpressionStart
selectableMappingback to summary
private final SelectableMapping selectableMapping
typeNameback to summary
private final String typeName

Constructor Detail

BasicStructWriteExpressionback to summary
pack-priv BasicStructWriteExpression(SelectableMapping selectableMapping, String typeName, String customWriteExpression)

Method Detail

appendback to summary
public void append(SqlAppender sb, String path, SqlAstTranslator<?> translator, AggregateSupport.AggregateColumnWriteExpression expression)

Implements org.hibernate.dialect.aggregate.DB2AggregateSupport.AggregateWriteExpression.append.

Annotations
@Override
org.hibernate.dialect.aggregate back to summary

private Class DB2AggregateSupport.RootStructWriteExpression

extends AggregateStructWriteExpression
implements WriteExpressionRenderer
Class Inheritance
All Implemented Interfaces
org.hibernate.dialect.aggregate.AggregateSupport.WriteExpressionRenderer

Field Summary

Modifier and TypeField and Description
private final String
Inherited from org.hibernate.dialect.aggregate.DB2AggregateSupport.AggregateStructWriteExpression:
embeddableMappingTypenullablestructTypeName

Constructor Summary

AccessConstructor and Description
pack-priv
RootStructWriteExpression(SelectableMapping aggregateColumn, SelectableMapping[] columns, TypeConfiguration typeConfiguration)

Method Summary

Modifier and TypeMethod and Description
public void
render(SqlAppender sqlAppender, SqlAstTranslator<?> translator, AggregateSupport.AggregateColumnWriteExpression aggregateColumnWriteExpression, String qualifier)

Implements org.hibernate.dialect.aggregate.AggregateSupport.WriteExpressionRenderer.render.

Renders the qualified custom write expression to the SqlAppender with the value expressions for each selectable as returned by AggregateColumnWriteExpression#getValueExpression(SelectableMapping).
Inherited from org.hibernate.dialect.aggregate.DB2AggregateSupport.AggregateStructWriteExpression:
appendinitializeSubExpressions

Field Detail

selectableNameback to summary
private final String selectableName

Constructor Detail

RootStructWriteExpressionback to summary
pack-priv RootStructWriteExpression(SelectableMapping aggregateColumn, SelectableMapping[] columns, TypeConfiguration typeConfiguration)

Method Detail

renderback to summary
public void render(SqlAppender sqlAppender, SqlAstTranslator<?> translator, AggregateSupport.AggregateColumnWriteExpression aggregateColumnWriteExpression, String qualifier)

Implements org.hibernate.dialect.aggregate.AggregateSupport.WriteExpressionRenderer.render.

Doc from org.hibernate.dialect.aggregate.AggregateSupport.WriteExpressionRenderer.render.

Renders the qualified custom write expression to the SqlAppender with the value expressions for each selectable as returned by AggregateColumnWriteExpression#getValueExpression(SelectableMapping).

Annotations
@Override