public QualifiedTableName getQualifiedTableName() { return name == null ? null : new QualifiedTableName( catalog, schema, name ); }
@Override public TableInformation getTableInformation(QualifiedTableName tableName) { if ( tableName.getObjectName() == null ) { throw new IllegalArgumentException( "Passed table name cannot be null" ); } return extractor.getTable( tableName.getCatalogName(), tableName.getSchemaName(), tableName.getTableName() ); }
@Override public String toString() { return "TableInformationImpl(" + tableName.toString() + ')'; } }
@Override public String format(QualifiedTableName qualifiedTableName, Dialect dialect) { return format.format( qualifiedTableName.getCatalogName(), qualifiedTableName.getSchemaName(), qualifiedTableName.getTableName(), dialect ); }
@Override protected QualifiedTableName determineIdTableName( JdbcEnvironment jdbcEnvironment, PersistentClass entityBinding) { return new QualifiedTableName( catalog, schema, super.determineIdTableName( jdbcEnvironment, entityBinding ).getTableName() ); }
private void addColumns(TableInformation tableInformation) { final QualifiedTableName tableName = tableInformation.getName(); final Identifier catalog = tableName.getCatalogName(); final Identifier schema = tableName.getSchemaName(); catalogFilter, schemaFilter, tableName.getTableName().getText(), "%" ); throw convertSQLException( e, "Error accessing column metadata: " + tableName.toString() );
@Override public void addSecondaryTable(QualifiedTableName logicalQualifiedTableName, Join secondaryTableJoin) { Identifier logicalName = logicalQualifiedTableName.getTableName(); if ( Identifier.areEqual( Identifier.toIdentifier( new QualifiedTableName( Identifier.toIdentifier( primaryTable.getCatalog() ), Identifier.toIdentifier( primaryTable.getSchema() ), primaryTableLogicalName ).render() ), Identifier.toIdentifier( logicalQualifiedTableName.render() ) ) ) { throw new DuplicateSecondaryTableException( logicalName ); } if ( secondaryTableJoinMap == null ) { //secondaryTableJoinMap = new HashMap<Identifier,Join>(); //secondaryTableJoinMap.put( logicalName, secondaryTableJoin ); secondaryTableJoinMap = new HashMap<>(); secondaryTableJoinMap.put( logicalName.getCanonicalName(), secondaryTableJoin ); } else { //final Join existing = secondaryTableJoinMap.put( logicalName, secondaryTableJoin ); final Join existing = secondaryTableJoinMap.put( logicalName.getCanonicalName(), secondaryTableJoin ); if ( existing != null ) { throw new DuplicateSecondaryTableException( logicalName ); } } }
indexNameForCreation = jdbcEnvironment.getQualifiedObjectNameFormatter().format( new QualifiedNameImpl( index.getTable().getQualifiedTableName().getCatalogName(), index.getTable().getQualifiedTableName().getSchemaName(), jdbcEnvironment.getIdentifierHelper().toIdentifier( index.getQuotedName( dialect ) ) ),
public void addTableInformation(TableInformation tableInformation) { tables.put( tableInformation.getName().getTableName().getText(), tableInformation ); }
final String referenceEntityName = sp.getReferencedEntityName(); final PersistentClass classMapping = getEntityBinding( referenceEntityName ); final String dependentTable = classMapping.getTable().getQualifiedTableName().render(); if ( !isADependencyOf.containsKey( dependentTable ) ) { isADependencyOf.put( dependentTable, new HashSet<>() );
public Identifier getTableName() { return getObjectName(); } }
@Override public PrimaryKeyInformation getPrimaryKey(TableInformationImpl tableInformation) { final QualifiedTableName tableName = tableInformation.getName(); final Identifier catalog = tableName.getCatalogName(); final Identifier schema = tableName.getSchemaName(); catalogFilter, schemaFilter, tableInformation.getName().getTableName().getText() ); String.format( "Encountered primary keys differing name on table %s", tableInformation.getName().toString() throw convertSQLException( e, "Error while reading primary key meta data for " + tableInformation.getName().toString() );
schema = secondaryTable.schema(); catalog = secondaryTable.catalog(); logicalName = new QualifiedTableName( Identifier.toIdentifier( catalog ), Identifier.toIdentifier( schema ), schema = joinTable.schema(); catalog = joinTable.catalog(); logicalName = new QualifiedTableName( Identifier.toIdentifier( catalog ), Identifier.toIdentifier( schema ), schema, catalog, logicalName.getTableName(), false, uniqueConstraintHolders,
indexNameForCreation = jdbcEnvironment.getQualifiedObjectNameFormatter().format( new QualifiedNameImpl( index.getTable().getQualifiedTableName().getCatalogName(), index.getTable().getQualifiedTableName().getSchemaName(), jdbcEnvironment.getIdentifierHelper().toIdentifier( index.getName() ) ),
public TableInformation getTableInformation(Table table) { return tables.get( identifierHelper.toMetaDataObjectName( table.getQualifiedTableName().getTableName() ) ); }
String dependentTable = sp.getValue().getTable().getQualifiedTableName().render(); if ( dependentTable.compareTo( startTable ) == 0 ) { throw new AnnotationException( "Foreign key circularity dependency involving the following tables: " + startTable + ", " + dependentTable );
final Map<Identifier, IndexInformationImpl.Builder> builders = new HashMap<>(); final QualifiedTableName tableName = tableInformation.getName(); final Identifier catalog = tableName.getCatalogName(); final Identifier schema = tableName.getSchemaName(); catalogFilter, schemaFilter, tableName.getTableName().getText(), false, // DO NOT limit to just unique true // DO require up-to-date results throw convertSQLException( e, "Error accessing index information: " + tableInformation.getName().toString() );
@Override public TableInformation getTableInformation( Identifier catalogName, Identifier schemaName, Identifier tableName) { return getTableInformation( new QualifiedTableName( catalogName, schemaName, tableName ) ); }
String.format( "Schema-validation: missing table [%s]", table.getQualifiedTableName().toString()
String existingReferencedTable = m.getReferencedColumnMetadata().getContainingTableInformation().getName().getTableName().getCanonicalName(); return referencingColumn.equals( existingReferencingColumn ) && referencedTable.equals( existingReferencedTable ); };