Top Description Inners Fields Constructors Methods
org.hibernate.boot.model.relational

public Class ColumnOrderingStrategyStandard

extends Object
implements ColumnOrderingStrategy
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.model.relational.ColumnOrderingStrategy
Imports
java.util.ArrayList, .Collection, .Collections, .Comparator, .List, org.hibernate.boot.Metadata, org.hibernate.dialect.Dialect, org.hibernate.dialect.temptable.TemporaryTableColumn, org.hibernate.engine.jdbc.Size, org.hibernate.mapping.Column, .Constraint, .PrimaryKey, .Table, .UniqueKey, .UserDefinedType

Standard implementation that orders columns by size and name following roughly this ordering: order by max(physicalSizeBytes, 4), physicalSizeBytes > 2048, name

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
protected static class

Field Summary

Modifier and TypeField and Description
private static final double
public static final ColumnOrderingStrategyStandard

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected List<Column>
orderColumns(Collection<Column> columns, Metadata metadata)

Deprecated as a consequence of Metadata being deprecated.
public List<Column>
orderConstraintColumns(Constraint constraint, Metadata metadata)

Implements org.hibernate.boot.model.relational.ColumnOrderingStrategy.orderConstraintColumns.

Deprecated as a consequence of Metadata being deprecated.
Orders the columns of the constraint.
public List<Column>
orderTableColumns(Table table, Metadata metadata)

Implements org.hibernate.boot.model.relational.ColumnOrderingStrategy.orderTableColumns.

Deprecated as a consequence of Metadata being deprecated.
Orders the columns of the table.
public void
orderTemporaryTableColumns(List<TemporaryTableColumn> temporaryTableColumns, Metadata metadata)

Implements org.hibernate.boot.model.relational.ColumnOrderingStrategy.orderTemporaryTableColumns.

Deprecated as a consequence of Metadata being deprecated.
Orders the columns of the temporary table.
public List<Column>
orderUserDefinedTypeColumns(UserDefinedType userDefinedType, Metadata metadata)

Implements org.hibernate.boot.model.relational.ColumnOrderingStrategy.orderUserDefinedTypeColumns.

Deprecated as a consequence of Metadata being deprecated.
Orders the columns of the user defined type.
protected static int
physicalSizeInBytes(int sqlTypeCode, Size columnSize, Metadata metadata)

Deprecated as a consequence of Metadata being deprecated.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DECIMAL_TO_BYTES_QUOTIENTback to summary
private static final double DECIMAL_TO_BYTES_QUOTIENT
INSTANCEback to summary
public static final ColumnOrderingStrategyStandard INSTANCE

Constructor Detail

ColumnOrderingStrategyStandardback to summary
public ColumnOrderingStrategyStandard()

Method Detail

orderColumnsback to summary
protected List<Column> orderColumns(Collection<Column> columns, Metadata metadata)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

orderConstraintColumnsback to summary
public List<Column> orderConstraintColumns(Constraint constraint, Metadata metadata)

Implements org.hibernate.boot.model.relational.ColumnOrderingStrategy.orderConstraintColumns.

Doc from org.hibernate.boot.model.relational.ColumnOrderingStrategy.orderConstraintColumns.

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

Orders the columns of the constraint. May return null if columns were not ordered.

Annotations
@Override
orderTableColumnsback to summary
public List<Column> orderTableColumns(Table table, Metadata metadata)

Implements org.hibernate.boot.model.relational.ColumnOrderingStrategy.orderTableColumns.

Doc from org.hibernate.boot.model.relational.ColumnOrderingStrategy.orderTableColumns.

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

Orders the columns of the table. May return null if columns were not ordered.

Annotations
@Override
orderTemporaryTableColumnsback to summary
public void orderTemporaryTableColumns(List<TemporaryTableColumn> temporaryTableColumns, Metadata metadata)

Implements org.hibernate.boot.model.relational.ColumnOrderingStrategy.orderTemporaryTableColumns.

Doc from org.hibernate.boot.model.relational.ColumnOrderingStrategy.orderTemporaryTableColumns.

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

Orders the columns of the temporary table.

Annotations
@Override
orderUserDefinedTypeColumnsback to summary
public List<Column> orderUserDefinedTypeColumns(UserDefinedType userDefinedType, Metadata metadata)

Implements org.hibernate.boot.model.relational.ColumnOrderingStrategy.orderUserDefinedTypeColumns.

Doc from org.hibernate.boot.model.relational.ColumnOrderingStrategy.orderUserDefinedTypeColumns.

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

Orders the columns of the user defined type. May return null if columns were not ordered.

Annotations
@Override
physicalSizeInBytesback to summary
protected static int physicalSizeInBytes(int sqlTypeCode, Size columnSize, Metadata metadata)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

org.hibernate.boot.model.relational back to summary

protected Class ColumnOrderingStrategyStandard.ColumnComparator

extends Object
implements Comparator<Column>
Class Inheritance
  • java.lang.Object
  • org.hibernate.boot.model.relational.ColumnOrderingStrategyStandard.ColumnComparator
All Implemented Interfaces
java.util.Comparator

Field Summary

Modifier and TypeField and Description
private final Metadata
metadata

Deprecated as a consequence of Metadata being deprecated.

Constructor Summary

AccessConstructor and Description
protected
ColumnComparator(Metadata metadata)

Deprecated as a consequence of Metadata being deprecated.

Method Summary

Modifier and TypeMethod and Description
public int
compare(Column
the first object to be compared.
o1
,
Column
the second object to be compared.
o2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

metadataback to summary
private final Metadata metadata

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

Constructor Detail

ColumnComparatorback to summary
protected ColumnComparator(Metadata metadata)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

Method Detail

compareback to summary
public int compare(Column o1, Column o2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
o1:Column

the first object to be compared.

o2:Column

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Annotations
@Override
org.hibernate.boot.model.relational back to summary

protected Class ColumnOrderingStrategyStandard.TemporaryTableColumnComparator

extends Object
implements Comparator<TemporaryTableColumn>
Class Inheritance
  • java.lang.Object
  • org.hibernate.boot.model.relational.ColumnOrderingStrategyStandard.TemporaryTableColumnComparator
All Implemented Interfaces
java.util.Comparator

Field Summary

Modifier and TypeField and Description
private final Metadata
metadata

Deprecated as a consequence of Metadata being deprecated.

Constructor Summary

AccessConstructor and Description
protected
TemporaryTableColumnComparator(Metadata metadata)

Deprecated as a consequence of Metadata being deprecated.

Method Summary

Modifier and TypeMethod and Description
public int
compare(TemporaryTableColumn
the first object to be compared.
o1
,
TemporaryTableColumn
the second object to be compared.
o2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

metadataback to summary
private final Metadata metadata

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

Constructor Detail

TemporaryTableColumnComparatorback to summary
protected TemporaryTableColumnComparator(Metadata metadata)

Deprecated

as a consequence of Metadata being deprecated. See corresponding docs for further information.

Method Detail

compareback to summary
public int compare(TemporaryTableColumn o1, TemporaryTableColumn o2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
o1:TemporaryTableColumn

the first object to be compared.

o2:TemporaryTableColumn

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

Annotations
@Override