Top Description Fields Constructors Methods
org.hibernate.loader

public Class DefaultEntityAliases

extends Object
implements EntityAliases
Class Inheritance
All Implemented Interfaces
org.hibernate.loader.EntityAliases
Known Direct Subclasses
org.hibernate.loader.ColumnEntityAliases
Imports
java.util.Collections, .Map, org.hibernate.dialect.Dialect, org.hibernate.internal.util.StringHelper, org.hibernate.persister.entity.Loadable

EntityAliases which handles the logic of selecting user provided aliases (via return-property), before using the default aliases.
Author
max

Field Summary

Modifier and TypeField and Description
private static final String[][]
private final String
private final String
private final String
private final String[]
private final String[][]
private final String[]
private final Map<K, V>

Constructor Summary

AccessConstructor and Description
public
DefaultEntityAliases(Map<K, V>
The explicit aliases provided in a result-set mapping.
userProvidedAliases
,
Loadable
The persister for which we are generating select aliases
persister
,
String
The calculated suffix.
suffix
)

Calculate and cache select-clause aliases

public
private
DefaultEntityAliases(Map<K, V> userProvidedAliases, Loadable persister, String suffix, boolean interns)

Method Summary

Modifier and TypeMethod and Description
private String
private String[]
determineKeyAlias(Loadable persister, String suffix)

private String[][]
private String[]
protected String
protected String[]
protected String[]
getPropertyAliases(Loadable persister, int j)

public String
getRowIdAlias()

Implements org.hibernate.loader.EntityAliases.getRowIdAlias.

The result set column alias for the Oracle row id
public String
getSuffix()

Implements org.hibernate.loader.EntityAliases.getSuffix.

Returns the suffix used to generate the aliases.
public String
getSuffixedDiscriminatorAlias()

Implements org.hibernate.loader.EntityAliases.getSuffixedDiscriminatorAlias.

The result set column aliases for the discriminator columns
public String[]
getSuffixedKeyAliases()

Implements org.hibernate.loader.EntityAliases.getSuffixedKeyAliases.

The result set column aliases for the primary key columns
public String[][]
getSuffixedPropertyAliases(Loadable persister)

Implements org.hibernate.loader.EntityAliases.getSuffixedPropertyAliases.

The result set column aliases for the property columns of a subclass
public String[][]
getSuffixedPropertyAliases()

Implements org.hibernate.loader.EntityAliases.getSuffixedPropertyAliases.

The result set column aliases for the property columns
public String[]
getSuffixedVersionAliases()

Implements org.hibernate.loader.EntityAliases.getSuffixedVersionAliases.

The result set column aliases for the version columns
private String
getUserProvidedAlias(String propertyPath, String defaultAlias)

private String[]
getUserProvidedAliases(String propertyPath, String[] defaultAliases)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTY_ARRAY_OF_ARRAY_OF_STRINGSback to summary
private static final String[][] EMPTY_ARRAY_OF_ARRAY_OF_STRINGS
rowIdAliasback to summary
private final String rowIdAlias
suffixback to summary
private final String suffix
suffixedDiscriminatorColumnback to summary
private final String suffixedDiscriminatorColumn
suffixedKeyColumnsback to summary
private final String[] suffixedKeyColumns
suffixedPropertyColumnsback to summary
private final String[][] suffixedPropertyColumns
suffixedVersionColumnback to summary
private final String[] suffixedVersionColumn
userProvidedAliasesback to summary
private final Map<K, V> userProvidedAliases

Constructor Detail

DefaultEntityAliasesback to summary
public DefaultEntityAliases(Map<K, V> userProvidedAliases, Loadable persister, String suffix)

Calculate and cache select-clause aliases

Parameters
userProvidedAliases:Map<K, V>

The explicit aliases provided in a result-set mapping.

persister:Loadable

The persister for which we are generating select aliases

suffix:String

The calculated suffix.

DefaultEntityAliasesback to summary
public DefaultEntityAliases(Loadable persister, String suffix)
DefaultEntityAliasesback to summary
private DefaultEntityAliases(Map<K, V> userProvidedAliases, Loadable persister, String suffix, boolean interns)

Method Detail

determineDiscriminatorAliasback to summary
private String determineDiscriminatorAlias(Loadable persister, String suffix)
determineKeyAliasback to summary
private String[] determineKeyAlias(Loadable persister, String suffix)
determinePropertyAliasesback to summary
private String[][] determinePropertyAliases(Loadable persister)
determineVersionAliasback to summary
private String[] determineVersionAlias(Loadable persister)
getDiscriminatorAliasback to summary
protected String getDiscriminatorAlias(Loadable persister, String suffix)
getIdentifierAliasesback to summary
protected String[] getIdentifierAliases(Loadable persister, String suffix)
getPropertyAliasesback to summary
protected String[] getPropertyAliases(Loadable persister, int j)
getRowIdAliasback to summary
public String getRowIdAlias()

Implements org.hibernate.loader.EntityAliases.getRowIdAlias.

Doc from org.hibernate.loader.EntityAliases.getRowIdAlias.

The result set column alias for the Oracle row id

Annotations
@Override
getSuffixback to summary
public String getSuffix()

Implements org.hibernate.loader.EntityAliases.getSuffix.

Doc from org.hibernate.loader.EntityAliases.getSuffix.

Returns the suffix used to generate the aliases.

Returns:String

the suffix used to generate the aliases.

Annotations
@Override
getSuffixedDiscriminatorAliasback to summary
public String getSuffixedDiscriminatorAlias()

Implements org.hibernate.loader.EntityAliases.getSuffixedDiscriminatorAlias.

Doc from org.hibernate.loader.EntityAliases.getSuffixedDiscriminatorAlias.

The result set column aliases for the discriminator columns

Annotations
@Override
getSuffixedKeyAliasesback to summary
public String[] getSuffixedKeyAliases()

Implements org.hibernate.loader.EntityAliases.getSuffixedKeyAliases.

Doc from org.hibernate.loader.EntityAliases.getSuffixedKeyAliases.

The result set column aliases for the primary key columns

Annotations
@Override
getSuffixedPropertyAliasesback to summary
public String[][] getSuffixedPropertyAliases(Loadable persister)

Implements org.hibernate.loader.EntityAliases.getSuffixedPropertyAliases.

Doc from org.hibernate.loader.EntityAliases.getSuffixedPropertyAliases.

The result set column aliases for the property columns of a subclass

Annotations
@Override
getSuffixedPropertyAliasesback to summary
public String[][] getSuffixedPropertyAliases()

Implements org.hibernate.loader.EntityAliases.getSuffixedPropertyAliases.

Doc from org.hibernate.loader.EntityAliases.getSuffixedPropertyAliases.

The result set column aliases for the property columns

Annotations
@Override
getSuffixedVersionAliasesback to summary
public String[] getSuffixedVersionAliases()

Implements org.hibernate.loader.EntityAliases.getSuffixedVersionAliases.

Doc from org.hibernate.loader.EntityAliases.getSuffixedVersionAliases.

The result set column aliases for the version columns

Annotations
@Override
getUserProvidedAliasback to summary
private String getUserProvidedAlias(String propertyPath, String defaultAlias)
getUserProvidedAliasesback to summary
private String[] getUserProvidedAliases(String propertyPath, String[] defaultAliases)