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

public Class SimpleAuxiliaryDatabaseObject

extends AbstractAuxiliaryDatabaseObject
Class Inheritance
Known Direct Subclasses
org.hibernate.boot.model.relational.NamedAuxiliaryDatabaseObject
Imports
java.util.Set, org.hibernate.boot.model.naming.Identifier, org.hibernate.boot.model.relational.internal.SqlStringGenerationContextImpl, org.hibernate.dialect.Dialect, org.hibernate.internal.util.StringHelper

A simple implementation of AbstractAuxiliaryDatabaseObject in which the CREATE and DROP strings are provided up front. Contains simple facilities for templating the catalog and schema names into the provided strings.

This is the form created when the mapping documents use <create/> and <drop/>.

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private static final String
private final String
private final String[]
private final String[]
private static final String
private final String

Constructor Summary

AccessConstructor and Description
public
SimpleAuxiliaryDatabaseObject(Namespace namespace, String createString, String dropString, Set<String> dialectScopes)

public
SimpleAuxiliaryDatabaseObject(Namespace namespace, String[] createStrings, String[] dropStrings, Set<String> dialectScopes)

public
SimpleAuxiliaryDatabaseObject(Set<String> dialectScopes, String catalogName, String schemaName, String[] createStrings, String[] dropStrings)

Method Summary

Modifier and TypeMethod and Description
private static String
extractName(Identifier identifier)

protected String
protected String
private String
public String[]
sqlCreateStrings(Dialect
The dialect for which to generate the SQL creation strings
dialect
)

Overrides default org.hibernate.boot.model.relational.AuxiliaryDatabaseObject.sqlCreateStrings.

Deprecated
Gets the SQL strings for creating the database object.
public String[]
sqlCreateStrings(SqlStringGenerationContext
A context to help generate the SQL creation strings
context
)

Overrides default org.hibernate.boot.model.relational.AuxiliaryDatabaseObject.sqlCreateStrings.

Gets the SQL strings for creating the database object.
public String[]
sqlDropStrings(Dialect
The dialect for which to generate the SQL drop strings
dialect
)

Overrides default org.hibernate.boot.model.relational.AuxiliaryDatabaseObject.sqlDropStrings.

Deprecated
Gets the SQL strings for dropping the database object.
public String[]
sqlDropStrings(SqlStringGenerationContext
A context to help generate the SQL drop strings
context
)

Overrides default org.hibernate.boot.model.relational.AuxiliaryDatabaseObject.sqlDropStrings.

Gets the SQL strings for dropping the database object.
Inherited from org.hibernate.boot.model.relational.AbstractAuxiliaryDatabaseObject:
addDialectScopeappliesToDialectbeforeTablesOnCreationgetDialectScopesgetExportIdentifier

Field Detail

CATALOG_NAME_PLACEHOLDERback to summary
private static final String CATALOG_NAME_PLACEHOLDER
catalogNameback to summary
private final String catalogName
createStringsback to summary
private final String[] createStrings
dropStringsback to summary
private final String[] dropStrings
SCHEMA_NAME_PLACEHOLDERback to summary
private static final String SCHEMA_NAME_PLACEHOLDER
schemaNameback to summary
private final String schemaName

Constructor Detail

SimpleAuxiliaryDatabaseObjectback to summary
public SimpleAuxiliaryDatabaseObject(Namespace namespace, String createString, String dropString, Set<String> dialectScopes)
SimpleAuxiliaryDatabaseObjectback to summary
public SimpleAuxiliaryDatabaseObject(Namespace namespace, String[] createStrings, String[] dropStrings, Set<String> dialectScopes)
SimpleAuxiliaryDatabaseObjectback to summary
public SimpleAuxiliaryDatabaseObject(Set<String> dialectScopes, String catalogName, String schemaName, String[] createStrings, String[] dropStrings)

Method Detail

extractNameback to summary
private static String extractName(Identifier identifier)
getCatalogNameback to summary
protected String getCatalogName()
getSchemaNameback to summary
protected String getSchemaName()
injectCatalogAndSchemaback to summary
private String injectCatalogAndSchema(String ddlString, SqlStringGenerationContext context)
sqlCreateStringsback to summary
public String[] sqlCreateStrings(Dialect dialect)

Overrides default org.hibernate.boot.model.relational.AuxiliaryDatabaseObject.sqlCreateStrings.

Doc from org.hibernate.boot.model.relational.AuxiliaryDatabaseObject.sqlCreateStrings.

Deprecated

Gets the SQL strings for creating the database object.

Parameters
dialect:Dialect

The dialect for which to generate the SQL creation strings

Returns:String[]

the SQL strings for creating the database object.

Annotations
@Override
@Deprecated
sqlCreateStringsback to summary
public String[] sqlCreateStrings(SqlStringGenerationContext context)

Overrides default org.hibernate.boot.model.relational.AuxiliaryDatabaseObject.sqlCreateStrings.

Doc from org.hibernate.boot.model.relational.AuxiliaryDatabaseObject.sqlCreateStrings.

Gets the SQL strings for creating the database object.

Parameters
context:SqlStringGenerationContext

A context to help generate the SQL creation strings

Returns:String[]

the SQL strings for creating the database object.

Annotations
@Override
sqlDropStringsback to summary
public String[] sqlDropStrings(Dialect dialect)

Overrides default org.hibernate.boot.model.relational.AuxiliaryDatabaseObject.sqlDropStrings.

Doc from org.hibernate.boot.model.relational.AuxiliaryDatabaseObject.sqlDropStrings.

Deprecated

Gets the SQL strings for dropping the database object.

Parameters
dialect:Dialect

The dialect for which to generate the SQL drop strings

Returns:String[]

the SQL strings for dropping the database object.

Annotations
@Override
@Deprecated
sqlDropStringsback to summary
public String[] sqlDropStrings(SqlStringGenerationContext context)

Overrides default org.hibernate.boot.model.relational.AuxiliaryDatabaseObject.sqlDropStrings.

Doc from org.hibernate.boot.model.relational.AuxiliaryDatabaseObject.sqlDropStrings.

Gets the SQL strings for dropping the database object.

Parameters
context:SqlStringGenerationContext

A context to help generate the SQL drop strings

Returns:String[]

the SQL strings for dropping the database object.

Annotations
@Override