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

public Class Database

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collection, .Collections, .HashMap, .List, .Map, .TreeMap, org.hibernate.boot.model.naming.Identifier, .PhysicalNamingStrategy, org.hibernate.boot.spi.MetadataBuildingOptions, org.hibernate.dialect.Dialect, .H2Dialect, org.hibernate.engine.jdbc.env.spi.JdbcEnvironment, org.hibernate.engine.jdbc.spi.JdbcServices, org.hibernate.service.ServiceRegistry

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final Map<String, AuxiliaryDatabaseObject>
private final Dialect
private List<InitCommand>
private final JdbcEnvironment
private final Map<Namespace.Name, Namespace>
private Namespace.Name
private final PhysicalNamingStrategy
private final ServiceRegistry

Constructor Summary

AccessConstructor and Description
public
public
Database(MetadataBuildingOptions buildingOptions, JdbcEnvironment jdbcEnvironment)

Method Summary

Modifier and TypeMethod and Description
public void
public void
public Namespace
adjustDefaultNamespace(Identifier catalogName, Identifier schemaName)

public Namespace
adjustDefaultNamespace(String implicitCatalogName, String implicitSchemaName)

private static Dialect
public Collection<AuxiliaryDatabaseObject>
public Namespace

Returns:

The default namespace, with a null catalog and schema which will have to be interpreted with defaults at runtime.
getDefaultNamespace
()

public Dialect
public Collection<InitCommand>
public JdbcEnvironment
public Iterable<Namespace>
public Namespace.Name

Returns:

The implicit name of the default namespace, with a null catalog and schema which will have to be interpreted with defaults at runtime.
getPhysicalImplicitNamespaceName
()

public PhysicalNamingStrategy
public ServiceRegistry
public Namespace
locateNamespace(Identifier catalogName, Identifier schemaName)

private Namespace
private void
public Identifier

Returns:

The wrapped Identifier form
toIdentifier
(String
The raw object name
text
)

Wrap the raw name of a database object in it's Identifier form accounting for quoting from any of:

  • explicit quoting in the name itself
  • global request to quote all identifiers
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

auxiliaryDatabaseObjectsback to summary
private final Map<String, AuxiliaryDatabaseObject> auxiliaryDatabaseObjects
dialectback to summary
private final Dialect dialect
initCommandsback to summary
private List<InitCommand> initCommands
jdbcEnvironmentback to summary
private final JdbcEnvironment jdbcEnvironment
namespaceMapback to summary
private final Map<Namespace.Name, Namespace> namespaceMap
physicalImplicitNamespaceNameback to summary
private Namespace.Name physicalImplicitNamespaceName
physicalNamingStrategyback to summary
private final PhysicalNamingStrategy physicalNamingStrategy
serviceRegistryback to summary
private final ServiceRegistry serviceRegistry

Constructor Detail

Databaseback to summary
public Database(MetadataBuildingOptions buildingOptions)
Databaseback to summary
public Database(MetadataBuildingOptions buildingOptions, JdbcEnvironment jdbcEnvironment)

Method Detail

addAuxiliaryDatabaseObjectback to summary
public void addAuxiliaryDatabaseObject(AuxiliaryDatabaseObject auxiliaryDatabaseObject)
addInitCommandback to summary
public void addInitCommand(InitCommand initCommand)
adjustDefaultNamespaceback to summary
public Namespace adjustDefaultNamespace(Identifier catalogName, Identifier schemaName)
adjustDefaultNamespaceback to summary
public Namespace adjustDefaultNamespace(String implicitCatalogName, String implicitSchemaName)
determineDialectback to summary
private static Dialect determineDialect(MetadataBuildingOptions buildingOptions)
getAuxiliaryDatabaseObjectsback to summary
public Collection<AuxiliaryDatabaseObject> getAuxiliaryDatabaseObjects()
getDefaultNamespaceback to summary
public Namespace getDefaultNamespace()
Returns:Namespace

The default namespace, with a null catalog and schema which will have to be interpreted with defaults at runtime.

See Also
SqlStringGenerationContext
getDialectback to summary
public Dialect getDialect()
getInitCommandsback to summary
public Collection<InitCommand> getInitCommands()
getJdbcEnvironmentback to summary
public JdbcEnvironment getJdbcEnvironment()
getNamespacesback to summary
public Iterable<Namespace> getNamespaces()
getPhysicalImplicitNamespaceNameback to summary
public Namespace.Name getPhysicalImplicitNamespaceName()
Returns:Namespace.Name

The implicit name of the default namespace, with a null catalog and schema which will have to be interpreted with defaults at runtime.

See Also
SqlStringGenerationContext
getPhysicalNamingStrategyback to summary
public PhysicalNamingStrategy getPhysicalNamingStrategy()
getServiceRegistryback to summary
public ServiceRegistry getServiceRegistry()
locateNamespaceback to summary
public Namespace locateNamespace(Identifier catalogName, Identifier schemaName)
makeNamespaceback to summary
private Namespace makeNamespace(Namespace.Name name)
setImplicitNamespaceNameback to summary
private void setImplicitNamespaceName(Identifier catalogName, Identifier schemaName)
toIdentifierback to summary
public Identifier toIdentifier(String text)

Wrap the raw name of a database object in it's Identifier form accounting for quoting from any of:

  • explicit quoting in the name itself
  • global request to quote all identifiers

NOTE : quoting from database keywords happens only when building physical identifiers

Parameters
text:String

The raw object name

Returns:Identifier

The wrapped Identifier form