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 class
ColumnOrderingStrategyStandard.ColumnComparator
protected static class
ColumnOrderingStrategyStandard.TemporaryTableColumnComparator
-
Field Summary
Fields Modifier and Type Field Description static ColumnOrderingStrategyStandard
INSTANCE
-
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.void
orderTemporaryTableColumns(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 int
physicalSizeInBytes(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:ColumnOrderingStrategy
Orders the columns of the table. May return null if columns were not ordered.- Specified by:
orderTableColumns
in interfaceColumnOrderingStrategy
-
orderUserDefinedTypeColumns
public List<Column> orderUserDefinedTypeColumns(UserDefinedObjectType userDefinedType, Metadata metadata)
Description copied from interface:ColumnOrderingStrategy
Orders the columns of the user defined type. May return null if columns were not ordered.- Specified by:
orderUserDefinedTypeColumns
in interfaceColumnOrderingStrategy
-
orderConstraintColumns
public List<Column> orderConstraintColumns(Constraint constraint, Metadata metadata)
Description copied from interface:ColumnOrderingStrategy
Orders the columns of the constraint. May return null if columns were not ordered.- Specified by:
orderConstraintColumns
in interfaceColumnOrderingStrategy
-
orderTemporaryTableColumns
public void orderTemporaryTableColumns(List<TemporaryTableColumn> temporaryTableColumns, Metadata metadata)
Description copied from interface:ColumnOrderingStrategy
Orders the columns of the temporary table.- Specified by:
orderTemporaryTableColumns
in interfaceColumnOrderingStrategy
-
orderColumns
protected List<Column> orderColumns(Collection<Column> columns, Metadata metadata)
-
-