Top Description Methods
org.hibernate.boot.model.relational

public Interface SqlStringGenerationContext

Known Direct Implementers
org.hibernate.boot.model.relational.internal.SqlStringGenerationContextImpl
Imports
org.hibernate.boot.model.naming.Identifier, org.hibernate.dialect.Dialect, org.hibernate.engine.jdbc.env.spi.IdentifierHelper

A context provided to methods responsible for generating SQL strings on startup.

Method Summary

Modifier and TypeMethod and Description
public Identifier

Returns:

The given identifier if non-null, or the default catalog otherwise.
catalogWithDefault
(Identifier
An explicitly configured catalog, or null.
explicitCatalogOrNull
)

public String

Returns:

The formatted name,
format
(QualifiedTableName
The table name
qualifiedName
)

Render a formatted a table name

public String

Returns:

The formatted name
format
(QualifiedSequenceName
The sequence name
qualifiedName
)

Render a formatted sequence name

public String

Returns:

The formatted name
format
(QualifiedName
The name
qualifiedName
)

Render a formatted non-table and non-sequence qualified name

public String

Returns:

The formatted name
formatWithoutCatalog
(QualifiedSequenceName
The sequence name
qualifiedName
)

Render a formatted sequence name, without the catalog (even the default one).

public Identifier

Returns:

The default catalog, used for table/sequence names that do not explicitly mention a catalog. May be null. This default is generally applied automatically by the format methods, but in some cases it can be useful to access it directly.
getDefaultCatalog
()

public Identifier

Returns:

The default schema, used for table/sequence names that do not explicitly mention a schema. May be null. This default is generally applied automatically by the format methods, but in some cases it can be useful to access it directly.
getDefaultSchema
()

public Dialect

Returns:

The database dialect of the current JDBC environment, to generate SQL fragments that are specific to each vendor.
getDialect
()

public IdentifierHelper

Returns:

The helper for dealing with identifiers in the current JDBC environment.

Note that the Identifiers returned from this helper already account for auto-quoting.

getIdentifierHelper
()

Deprecated Use toIdentifier(String) instead.
public boolean

Returns:

true if and only if this is a migration
isMigration
()

Is the generated SQL for use in schema migration?

public Identifier

Returns:

The given identifier if non-null, or the default schema otherwise.
schemaWithDefault
(Identifier
An explicitly configured schema, or null.
explicitSchemaOrNull
)

public Identifier

Returns:

The identifier form of the name.
toIdentifier
(String
The text form of a name as obtained from mapping information.
text
)

Generate an Identifier instance from its simple name as obtained from mapping information.

Method Detail

catalogWithDefaultback to summary
public Identifier catalogWithDefault(Identifier explicitCatalogOrNull)
Parameters
explicitCatalogOrNull:Identifier

An explicitly configured catalog, or null.

Returns:Identifier

The given identifier if non-null, or the default catalog otherwise.

formatback to summary
public String format(QualifiedTableName qualifiedName)

Render a formatted a table name

Parameters
qualifiedName:QualifiedTableName

The table name

Returns:String

The formatted name,

formatback to summary
public String format(QualifiedSequenceName qualifiedName)

Render a formatted sequence name

Parameters
qualifiedName:QualifiedSequenceName

The sequence name

Returns:String

The formatted name

formatback to summary
public String format(QualifiedName qualifiedName)

Render a formatted non-table and non-sequence qualified name

Parameters
qualifiedName:QualifiedName

The name

Returns:String

The formatted name

formatWithoutCatalogback to summary
public String formatWithoutCatalog(QualifiedSequenceName qualifiedName)

Render a formatted sequence name, without the catalog (even the default one).

Parameters
qualifiedName:QualifiedSequenceName

The sequence name

Returns:String

The formatted name

getDefaultCatalogback to summary
public Identifier getDefaultCatalog()
Returns:Identifier

The default catalog, used for table/sequence names that do not explicitly mention a catalog. May be null. This default is generally applied automatically by the format methods, but in some cases it can be useful to access it directly.

getDefaultSchemaback to summary
public Identifier getDefaultSchema()
Returns:Identifier

The default schema, used for table/sequence names that do not explicitly mention a schema. May be null. This default is generally applied automatically by the format methods, but in some cases it can be useful to access it directly.

getDialectback to summary
public Dialect getDialect()
Returns:Dialect

The database dialect of the current JDBC environment, to generate SQL fragments that are specific to each vendor.

getIdentifierHelperback to summary
public IdentifierHelper getIdentifierHelper()

Deprecated

Use toIdentifier(String) instead.

Returns:IdentifierHelper

The helper for dealing with identifiers in the current JDBC environment.

Note that the Identifiers returned from this helper already account for auto-quoting.

Annotations
@Deprecated
isMigrationback to summary
public boolean isMigration()

Is the generated SQL for use in schema migration?

Returns:boolean

true if and only if this is a migration

schemaWithDefaultback to summary
public Identifier schemaWithDefault(Identifier explicitSchemaOrNull)
Parameters
explicitSchemaOrNull:Identifier

An explicitly configured schema, or null.

Returns:Identifier

The given identifier if non-null, or the default schema otherwise.

toIdentifierback to summary
public Identifier toIdentifier(String text)

Generate an Identifier instance from its simple name as obtained from mapping information.

Note that Identifiers returned from here may be implicitly quoted based on 'globally quoted identifiers' or based on reserved words.

Parameters
text:String

The text form of a name as obtained from mapping information.

Returns:Identifier

The identifier form of the name.