congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Namespace$Name.getSchema
Code IndexAdd Tabnine to your IDE (free)

How to use
getSchema
method
in
org.hibernate.boot.model.relational.Namespace$Name

Best Java code snippets using org.hibernate.boot.model.relational.Namespace$Name.getSchema (Showing top 20 results out of 315)

origin: hibernate/hibernate-orm

public Sequence createSequence(Identifier logicalName, int initialValue, int increment) {
  if ( sequences.containsKey( logicalName ) ) {
    throw new HibernateException( "Sequence was already registered with that name [" + logicalName.toString() + "]" );
  }
  final Identifier physicalName = physicalNamingStrategy.toPhysicalSequenceName( logicalName, jdbcEnvironment );
  Sequence sequence = new Sequence(
      this.physicalName.getCatalog(),
      this.physicalName.getSchema(),
      physicalName,
      initialValue,
      increment
  );
  sequences.put( logicalName, sequence );
  return sequence;
}
origin: hibernate/hibernate-orm

@Override
public boolean includeNamespace(Namespace namespace) {
  // exclude schema "the_schema_2"
  Identifier identifier = namespace.getName().getSchema();
  if ( identifier != null ) {
    return !"the_schema_2".equals( identifier.getText() );
  }
  return true;
}
origin: hibernate/hibernate-orm

if ( database.getDefaultNamespace().getPhysicalName().getSchema() != null ) {
  params.setProperty(
      PersistentIdentifierGenerator.SCHEMA,
      database.getDefaultNamespace().getPhysicalName().getSchema().render( database.getDialect() )
  );
origin: hibernate/hibernate-orm

  && namespace.getPhysicalName().getSchema() != null
  && !existingDatabase.schemaExists( namespace.getName() ) ) {
applySqlStrings(
    false,
    dialect.getCreateSchemaCommand( namespace.getPhysicalName().getSchema().render( dialect ) ),
    formatter,
    options,
origin: hibernate/hibernate-orm

private void processExportableProducers() {
  // for now we only handle id generators as ExportableProducers
  final Dialect dialect = getDatabase().getJdbcEnvironment().getDialect();
  final String defaultCatalog = extractName( getDatabase().getDefaultNamespace().getName().getCatalog(), dialect );
  final String defaultSchema = extractName( getDatabase().getDefaultNamespace().getName().getSchema(), dialect );
  for ( PersistentClass entityBinding : entityBindingMap.values() ) {
    if ( entityBinding.isInherited() ) {
      continue;
    }
    handleIdentifierValueBinding(
        entityBinding.getIdentifier(),
        dialect,
        defaultCatalog,
        defaultSchema,
        (RootClass) entityBinding
    );
  }
  for ( Collection collection : collectionBindingMap.values() ) {
    if ( !IdentifierCollection.class.isInstance( collection ) ) {
      continue;
    }
    handleIdentifierValueBinding(
        ( (IdentifierCollection) collection ).getIdentifier(),
        dialect,
        defaultCatalog,
        defaultSchema,
        null
    );
  }
}
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: 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

public DatabaseInformationImpl(
    ServiceRegistry serviceRegistry,
    JdbcEnvironment jdbcEnvironment,
    DdlTransactionIsolator ddlTransactionIsolator,
    Namespace.Name defaultNamespace) throws SQLException {
  this.jdbcEnvironment = jdbcEnvironment;
  this.extractionContext = new ImprovedExtractionContextImpl(
      serviceRegistry,
      jdbcEnvironment,
      ddlTransactionIsolator,
      defaultNamespace.getCatalog(),
      defaultNamespace.getSchema(),
      this
  );
  // todo : make this pluggable
  this.extractor = new InformationExtractorJdbcDatabaseMetaDataImpl( extractionContext );
  // because we do not have defined a way to locate sequence info by name
  initializeSequences();
}
origin: hibernate/hibernate-orm

public Namespace(PhysicalNamingStrategy physicalNamingStrategy, JdbcEnvironment jdbcEnvironment, Name name) {
  this.physicalNamingStrategy = physicalNamingStrategy;
  this.jdbcEnvironment = jdbcEnvironment;
  this.name = name;
  this.physicalName = new Name(
      physicalNamingStrategy
          .toPhysicalCatalogName( name.getCatalog(), jdbcEnvironment ),
      physicalNamingStrategy
          .toPhysicalSchemaName( name.getSchema(), jdbcEnvironment )
  );
  log.debugf(
      "Created database namespace [logicalName=%s, physicalName=%s]",
      name.toString(),
      physicalName.toString()
  );
}
origin: hibernate/hibernate-orm

@Override
public NameSpaceTablesInformation getTablesInformation(Namespace namespace) {
  return extractor.getTables( namespace.getPhysicalName().getCatalog(), namespace.getPhysicalName().getSchema() );
}
origin: hibernate/hibernate-orm

@Override
public boolean schemaExists(Namespace.Name namespace) {
  return extractor.schemaExists( namespace.getCatalog(), namespace.getSchema() );
}
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

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

public QualifiedNameImpl(Namespace.Name schemaName, Identifier objectName) {
  this(
      schemaName.getCatalog(),
      schemaName.getSchema(),
      objectName
  );
}
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,
    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 Settings(SessionFactoryOptions sessionFactoryOptions, Metadata metadata) {
  this(
      sessionFactoryOptions,
      extractName( metadata.getDatabase().getDefaultNamespace().getName().getCatalog() ),
      extractName( metadata.getDatabase().getDefaultNamespace().getName().getSchema() )
  );
}
origin: hibernate/hibernate-orm

private Identifier determineSchemaName(TableSpecificationSource tableSpecSource) {
  if ( StringHelper.isNotEmpty( tableSpecSource.getExplicitSchemaName() ) ) {
    return database.toIdentifier( tableSpecSource.getExplicitSchemaName() );
  }
  else {
    return database.getDefaultNamespace().getName().getSchema();
  }
}
origin: hibernate/hibernate-orm

  @Override
  public int compareTo(Name that) {
    // per Comparable, the incoming Name cannot be null.  However, its catalog/schema might be
    // so we need to account for that.
    int catalogCheck = ComparableHelper.compare( this.getCatalog(), that.getCatalog() );
    if ( catalogCheck != 0 ) {
      return catalogCheck;
    }
    return ComparableHelper.compare( this.getSchema(), that.getSchema() );
  }
}
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;
}
org.hibernate.boot.model.relationalNamespace$NamegetSchema

Popular methods of Namespace$Name

  • getCatalog
  • <init>
  • equals
  • hashCode
  • toString

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now