Class ColumnOrderingStrategyStandard
- java.lang.Object
-
- org.hibernate.boot.model.relational.ColumnOrderingStrategyStandard
-
- All Implemented Interfaces:
ColumnOrderingStrategy
public class ColumnOrderingStrategyStandard extends Object implements ColumnOrderingStrategy
Standard implementation that orders columns by size and name following roughly this ordering:order by max(physicalSizeBytes, 4), physicalSizeBytes > 2048, name
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classColumnOrderingStrategyStandard.ColumnComparatorprotected static classColumnOrderingStrategyStandard.TemporaryTableColumnComparator
-
Field Summary
Fields Modifier and Type Field Description static ColumnOrderingStrategyStandardINSTANCE
-
Constructor Summary
Constructors Constructor Description ColumnOrderingStrategyStandard()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<Column>orderColumns(Collection<Column> columns, Metadata metadata)List<Column>orderConstraintColumns(Constraint constraint, Metadata metadata)Orders the columns of the constraint.List<Column>orderTableColumns(Table table, Metadata metadata)Orders the columns of the table.voidorderTemporaryTableColumns(List<TemporaryTableColumn> temporaryTableColumns, Metadata metadata)Orders the columns of the temporary table.List<Column>orderUserDefinedTypeColumns(UserDefinedObjectType userDefinedType, Metadata metadata)Orders the columns of the user defined type.protected static intphysicalSizeInBytes(int sqlTypeCode, Size columnSize, Metadata metadata)
-
-
-
Field Detail
-
INSTANCE
public static final ColumnOrderingStrategyStandard INSTANCE
-
-
Method Detail
-
orderTableColumns
public List<Column> orderTableColumns(Table table, Metadata metadata)
Description copied from interface:ColumnOrderingStrategyOrders the columns of the table. May return null if columns were not ordered.- Specified by:
orderTableColumnsin interfaceColumnOrderingStrategy
-
orderUserDefinedTypeColumns
public List<Column> orderUserDefinedTypeColumns(UserDefinedObjectType userDefinedType, Metadata metadata)
Description copied from interface:ColumnOrderingStrategyOrders the columns of the user defined type. May return null if columns were not ordered.- Specified by:
orderUserDefinedTypeColumnsin interfaceColumnOrderingStrategy
-
orderConstraintColumns
public List<Column> orderConstraintColumns(Constraint constraint, Metadata metadata)
Description copied from interface:ColumnOrderingStrategyOrders the columns of the constraint. May return null if columns were not ordered.- Specified by:
orderConstraintColumnsin interfaceColumnOrderingStrategy
-
orderTemporaryTableColumns
public void orderTemporaryTableColumns(List<TemporaryTableColumn> temporaryTableColumns, Metadata metadata)
Description copied from interface:ColumnOrderingStrategyOrders the columns of the temporary table.- Specified by:
orderTemporaryTableColumnsin interfaceColumnOrderingStrategy
-
orderColumns
protected List<Column> orderColumns(Collection<Column> columns, Metadata metadata)
-
-