/** * Parses a textual representation of a qualified name into a NameParts * representation. Explicitly looks for the form {@code catalog.schema.name}. * * @param text The simple text representation of the qualified name. * * @return The wrapped QualifiedName */ public NameParts parse(String text) { return parse( text, null, null ); } }
@Override @SuppressWarnings("StatementWithEmptyBody") public void configure(Type type, Properties params, ServiceRegistry serviceRegistry) throws MappingException { DeprecationLogger.DEPRECATION_LOGGER.deprecatedSequenceGenerator( getClass().getName() ); identifierType = type; final ObjectNameNormalizer normalizer = (ObjectNameNormalizer) params.get( IDENTIFIER_NORMALIZER ); logicalQualifiedSequenceName = QualifiedNameParser.INSTANCE.parse( ConfigurationHelper.getString( SEQUENCE, params, "hibernate_sequence" ), normalizer.normalizeIdentifierQuoting( params.getProperty( CATALOG ) ), normalizer.normalizeIdentifierQuoting( params.getProperty( SCHEMA ) ) ); if ( params.containsKey( PARAMETERS ) ) { LOG.warn( "Use of 'parameters' config setting is no longer supported; " + "to specify initial-value or increment use the " + "org.hibernate.id.enhanced.SequenceStyleGenerator generator instead." ); } }
protected QualifiedName determineGeneratorTableName(Properties params, JdbcEnvironment jdbcEnvironment) { final String tableName = ConfigurationHelper.getString( ID_TABLE, params, DEFAULT_TABLE ); if ( tableName.contains( "." ) ) { return QualifiedNameParser.INSTANCE.parse( tableName ); } else { // todo : need to incorporate implicit catalog and schema names final Identifier catalog = jdbcEnvironment.getIdentifierHelper().toIdentifier( ConfigurationHelper.getString( CATALOG, params ) ); final Identifier schema = jdbcEnvironment.getIdentifierHelper().toIdentifier( ConfigurationHelper.getString( SCHEMA, params ) ); return new QualifiedNameParser.NameParts( catalog, schema, jdbcEnvironment.getIdentifierHelper().toIdentifier( tableName ) ); } }
return QualifiedNameParser.INSTANCE.parse( tableName );
return QualifiedNameParser.INSTANCE.parse( sequenceName );
/** * NOTE: Copied from TableGenerator * <p> * Determine the table name to use for the generator values. * <p> * Called during {@link #configure configuration}. * * @see #getTableName() * @param params The params supplied in the generator config (plus some standard useful extras). * @param dialect The dialect in effect * @return The table name to use. */ protected QualifiedName determineGeneratorTableName(Properties params, Dialect dialect) { String schemaName = params.getProperty( PersistentIdentifierGenerator.SCHEMA ); if ( schemaName != null ) { log.schemaOptionNotSupportedForTableGenerator( schemaName ); } String catalogName = params.getProperty( PersistentIdentifierGenerator.CATALOG ); if ( catalogName != null ) { log.catalogOptionNotSupportedForTableGenerator( catalogName ); } return QualifiedNameParser.INSTANCE.parse( ConfigurationHelper.getString( TABLE_PARAM, params, DEF_TABLE ), null, null ); }
return QualifiedNameParser.INSTANCE.parse( sequenceName );