本文整理了Java中org.hibernate.boot.model.relational.Namespace.getPhysicalName()
方法的一些代码示例,展示了Namespace.getPhysicalName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Namespace.getPhysicalName()
方法的具体详情如下:
包路径:org.hibernate.boot.model.relational.Namespace
类名称:Namespace
方法名:getPhysicalName
暂无
代码示例来源:origin: hibernate/hibernate-orm
public Table(
Namespace namespace,
Identifier physicalTableName,
boolean isAbstract) {
this.catalog = namespace.getPhysicalName().getCatalog();
this.schema = namespace.getPhysicalName().getSchema();
this.name = physicalTableName;
this.isAbstract = isAbstract;
}
代码示例来源:origin: hibernate/hibernate-orm
public Table(Namespace namespace, Identifier physicalTableName, String subselect, boolean isAbstract) {
this.catalog = namespace.getPhysicalName().getCatalog();
this.schema = namespace.getPhysicalName().getSchema();
this.name = physicalTableName;
this.subselect = subselect;
this.isAbstract = isAbstract;
}
代码示例来源:origin: hibernate/hibernate-orm
public Table(Namespace namespace, String subselect, boolean isAbstract) {
this.catalog = namespace.getPhysicalName().getCatalog();
this.schema = namespace.getPhysicalName().getSchema();
this.subselect = subselect;
this.isAbstract = isAbstract;
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
public NameSpaceTablesInformation getTablesInformation(Namespace namespace) {
return extractor.getTables( namespace.getPhysicalName().getCatalog(), namespace.getPhysicalName().getSchema() );
}
代码示例来源:origin: hibernate/hibernate-orm
public SimpleAuxiliaryDatabaseObject(
Namespace namespace,
String[] createStrings,
String[] dropStrings,
Set<String> dialectScopes) {
this(
dialectScopes,
extractName( namespace.getPhysicalName().getCatalog() ),
extractName( namespace.getPhysicalName().getSchema() ),
createStrings,
dropStrings
);
}
代码示例来源:origin: hibernate/hibernate-orm
protected void migrateTable(
Table table,
TableInformation tableInformation,
Dialect dialect,
Metadata metadata,
Formatter formatter,
ExecutionOptions options,
GenerationTarget... targets) {
final Database database = metadata.getDatabase();
//noinspection unchecked
applySqlStrings(
false,
table.sqlAlterStrings(
dialect,
metadata,
tableInformation,
database.getDefaultNamespace().getPhysicalName().getCatalog(),
database.getDefaultNamespace().getPhysicalName().getSchema()
),
formatter,
options,
targets
);
}
代码示例来源:origin: hibernate/hibernate-orm
if ( tryToCreateCatalogs ) {
final Identifier catalogLogicalName = namespace.getName().getCatalog();
final Identifier catalogPhysicalName = namespace.getPhysicalName().getCatalog();
&& namespace.getPhysicalName().getSchema() != null
&& !existingDatabase.schemaExists( namespace.getName() ) ) {
applySqlStrings(
false,
dialect.getCreateSchemaCommand( namespace.getPhysicalName().getSchema().render( dialect ) ),
formatter,
options,
代码示例来源:origin: hibernate/hibernate-orm
if ( database.getDefaultNamespace().getPhysicalName().getSchema() != null ) {
params.setProperty(
PersistentIdentifierGenerator.SCHEMA,
database.getDefaultNamespace().getPhysicalName().getSchema().render( database.getDialect() )
);
if ( database.getDefaultNamespace().getPhysicalName().getCatalog() != null ) {
params.setProperty(
PersistentIdentifierGenerator.CATALOG,
database.getDefaultNamespace().getPhysicalName().getCatalog().render( database.getDialect() )
);
代码示例来源:origin: hibernate/hibernate-orm
if ( tryToDropSchemas && namespace.getPhysicalName().getSchema() != null ) {
applySqlStrings(
dialect.getDropSchemaCommand(
namespace.getPhysicalName().getSchema().render( dialect )
),
formatter,
final Identifier catalogPhysicalName = namespace.getPhysicalName().getCatalog();
代码示例来源:origin: hibernate/hibernate-orm
private static class AssociationTableNameSource implements ObjectNameSource {
private final String explicitName;
private final String logicalName;
private AssociationTableNameSource(String explicitName, String logicalName) {
this.explicitName = explicitName;
this.logicalName = logicalName;
}
public String getExplicitName() {
return explicitName;
}
public String getLogicalName() {
return logicalName;
}
}
代码示例来源:origin: hibernate/hibernate-orm
final Identifier catalogPhysicalName = namespace.getPhysicalName().getCatalog();
if ( tryToCreateSchemas && namespace.getPhysicalName().getSchema() != null ) {
applySqlStrings(
dialect.getCreateSchemaCommand( namespace.getPhysicalName().getSchema().render( dialect ) ),
formatter,
options,
代码示例来源:origin: hibernate/hibernate-orm
private InformationExtractorJdbcDatabaseMetaDataImplTest buildInformationExtractorJdbcDatabaseMetaDataImplTest()
throws SQLException {
Database database = metadata.getDatabase();
final ConnectionProvider connectionProvider = ssr.getService( ConnectionProvider.class );
DatabaseInformation dbInfo = new DatabaseInformationImpl(
ssr,
database.getJdbcEnvironment(),
new DdlTransactionIsolatorTestingImpl( ssr,
new JdbcEnvironmentInitiator.ConnectionProviderJdbcConnectionAccess(
connectionProvider )
),
database.getDefaultNamespace().getName()
);
ExtractionContextImpl extractionContext = new ExtractionContextImpl(
ssr,
database.getJdbcEnvironment(),
ssr.getService( JdbcServices.class ).getBootstrapJdbcConnectionAccess(),
(ExtractionContext.DatabaseObjectAccess) dbInfo,
database.getDefaultNamespace().getPhysicalName().getCatalog(),
database.getDefaultNamespace().getPhysicalName().getSchema()
);
return new InformationExtractorJdbcDatabaseMetaDataImplTest(
extractionContext );
}
代码示例来源:origin: com.github.albfernandez/jbpm-jpdl
private DatabaseInformation getDatabaseInformation() {
final ServiceRegistry serviceRegistry = metadataImplementor.getMetadataBuildingOptions().getServiceRegistry();
// final ConfigurationService cfgService = serviceRegistry.getService( ConfigurationService.class );
// final SchemaManagementTool schemaManagementTool = serviceRegistry.getService( SchemaManagementTool.class );
// final SchemaMigrator schemaMigrator = schemaManagementTool.getSchemaMigrator( cfgService.getSettings() );
final JdbcServices jdbcServices = serviceRegistry.getService( JdbcServices.class );
final JdbcConnectionAccess jdbcConnectionAccess = jdbcServices.getBootstrapJdbcConnectionAccess();
final DatabaseInformation databaseInformation;
try {
databaseInformation = new DatabaseInformationImpl(
serviceRegistry,
serviceRegistry.getService( JdbcEnvironment.class ),
jdbcConnectionAccess,
metadataImplementor.getDatabase().getDefaultNamespace().getPhysicalName().getCatalog(),
metadataImplementor.getDatabase().getDefaultNamespace().getPhysicalName().getSchema()
);
}
catch (SQLException e) {
throw jdbcServices.getSqlExceptionHelper().convert(
e,
"Error creating DatabaseInformation for schema migration"
);
}
return databaseInformation;
}
内容来源于网络,如有侵权,请联系作者删除!