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

public Interface AuxiliaryDatabaseObject

extends Exportable, Serializable
Known Direct Implementers
org.hibernate.boot.model.relational.AbstractAuxiliaryDatabaseObject
Imports
java.io.Serializable, org.hibernate.dialect.Dialect

An auxiliary database object is a trigger, function, stored procedure, or anything similar which is defined using explicit handwritten DDL create and drop statements in the mapping metadata.

This SPI allows Hibernate to export and clean up these objects along with the rest of the schema.

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
AuxiliaryDatabaseObject.Expandable

Additional, optional interface for AuxiliaryDatabaseObjects that want to allow expansion of allowable dialects via mapping.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

True if this database object does apply to the given dialect.
appliesToDialect
(Dialect
The dialect to check against.
dialect
)

Does this database object apply to the given dialect?

public boolean

Returns:

true indicates this object should be created before tables; false indicates it should be created after tables.
beforeTablesOnCreation
()

Defines a simple precedence.

public String[]

Returns:

the SQL strings for creating the database object.
sqlCreateStrings
(SqlStringGenerationContext
A context to help generate the SQL creation strings
context
)

Gets the SQL strings for creating the database object.

public String[]

Returns:

the SQL strings for dropping the database object.
sqlDropStrings
(SqlStringGenerationContext
A context to help generate the SQL drop strings
context
)

Gets the SQL strings for dropping the database object.

Inherited from org.hibernate.boot.model.relational.Exportable:
getExportIdentifier

Method Detail

appliesToDialectback to summary
public boolean appliesToDialect(Dialect dialect)

Does this database object apply to the given dialect?

Parameters
dialect:Dialect

The dialect to check against.

Returns:boolean

True if this database object does apply to the given dialect.

beforeTablesOnCreationback to summary
public boolean beforeTablesOnCreation()

Defines a simple precedence. Should creation of this auxiliary object happen before creation of tables?

  • If true, the auxiliary object creation will happen after any explicit schema creation but before creation of tables and sequences.
  • If false, the auxiliary object creation will happen after explicit schema creation and after creation of tables and sequences.

This precedence is automatically inverted for when the schema is dropped.

Returns:boolean

true indicates this object should be created before tables; false indicates it should be created after tables.

sqlCreateStringsback to summary
public String[] sqlCreateStrings(SqlStringGenerationContext context)

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.

sqlDropStringsback to summary
public String[] sqlDropStrings(SqlStringGenerationContext context)

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.

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

public Interface AuxiliaryDatabaseObject.Expandable

Known Direct Implementers
org.hibernate.boot.model.relational.AbstractAuxiliaryDatabaseObject

Additional, optional interface for AuxiliaryDatabaseObjects that want to allow expansion of allowable dialects via mapping.

Method Summary

Modifier and TypeMethod and Description
public void
addDialectScope(String dialectName)

Method Detail

addDialectScopeback to summary
public void addDialectScope(String dialectName)