Package org.hibernate.cfg

Examples of org.hibernate.cfg.ObjectNameNormalizer.normalizeIdentifierQuoting()


   * @return The value column name
   */
  protected String determineValueColumnName(Properties params, Dialect dialect) {
    ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params.get( IDENTIFIER_NORMALIZER );
    String name = PropertiesHelper.getString( VALUE_COLUMN_PARAM, params, DEF_VALUE_COLUMN );
    return dialect.quote( normalizer.normalizeIdentifierQuoting( name ) );
  }

  /**
   * Determine the initial sequence value to use.  This value is used when
   * initializing the {@link #getDatabaseStructure() database structure}
View Full Code Here


  }

  public void configure(Type type, Properties params, Dialect dialect) throws MappingException {
    ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params.get( IDENTIFIER_NORMALIZER );

    tableName = normalizer.normalizeIdentifierQuoting( PropertiesHelper.getString( ID_TABLE, params, DEFAULT_TABLE ) );
    if ( tableName.indexOf( '.' ) < 0 ) {
      tableName = dialect.quote( tableName );
      final String schemaName = dialect.quote(
          normalizer.normalizeIdentifierQuoting( params.getProperty( SCHEMA ) )
      );
View Full Code Here

  protected String determineGeneratorTableName(Properties params, Dialect dialect) {
    String name = PropertiesHelper.getString( TABLE_PARAM, params, DEF_TABLE );
    boolean isGivenNameUnqualified = name.indexOf( '.' ) < 0;
    if ( isGivenNameUnqualified ) {
      ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params.get( IDENTIFIER_NORMALIZER );
      name = normalizer.normalizeIdentifierQuoting( name );
      // if the given name is un-qualified we may neen to qualify it
      String schemaName = normalizer.normalizeIdentifierQuoting( params.getProperty( SCHEMA ) );
      String catalogName = normalizer.normalizeIdentifierQuoting( params.getProperty( CATALOG ) );
      name = Table.qualify(
          dialect.quote( catalogName ),
View Full Code Here

    boolean isGivenNameUnqualified = name.indexOf( '.' ) < 0;
    if ( isGivenNameUnqualified ) {
      ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params.get( IDENTIFIER_NORMALIZER );
      name = normalizer.normalizeIdentifierQuoting( name );
      // if the given name is un-qualified we may neen to qualify it
      String schemaName = normalizer.normalizeIdentifierQuoting( params.getProperty( SCHEMA ) );
      String catalogName = normalizer.normalizeIdentifierQuoting( params.getProperty( CATALOG ) );
      name = Table.qualify(
          dialect.quote( catalogName ),
          dialect.quote( schemaName ),
          dialect.quote( name)
View Full Code Here

    if ( isGivenNameUnqualified ) {
      ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params.get( IDENTIFIER_NORMALIZER );
      name = normalizer.normalizeIdentifierQuoting( name );
      // if the given name is un-qualified we may neen to qualify it
      String schemaName = normalizer.normalizeIdentifierQuoting( params.getProperty( SCHEMA ) );
      String catalogName = normalizer.normalizeIdentifierQuoting( params.getProperty( CATALOG ) );
      name = Table.qualify(
          dialect.quote( catalogName ),
          dialect.quote( schemaName ),
          dialect.quote( name)
      );
View Full Code Here

   * @return The name of the segment column
   */
  protected String determineSegmentColumnName(Properties params, Dialect dialect) {
    ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params.get( IDENTIFIER_NORMALIZER );
    String name = PropertiesHelper.getString( SEGMENT_COLUMN_PARAM, params, DEF_SEGMENT_COLUMN );
    return dialect.quote( normalizer.normalizeIdentifierQuoting( name ) );
  }

  /**
   * Determine the name of the column in which we will store the generator persistent value.
   * <p/>
 
View Full Code Here

   * @return The name of the value column
   */
  protected String determineValueColumnName(Properties params, Dialect dialect) {
    ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params.get( IDENTIFIER_NORMALIZER );
    String name = PropertiesHelper.getString( VALUE_COLUMN_PARAM, params, DEF_VALUE_COLUMN );
    return dialect.quote( normalizer.normalizeIdentifierQuoting( name ) );
  }

  /**
   * Determine the segment value corresponding to this generator instance.
   * <p/>
 
View Full Code Here

        ? params.getProperty( JPA_ENTITY_NAME ) + sequencePerEntitySuffix
        : DEF_SEQUENCE_NAME;
    final ObjectNameNormalizer normalizer = (ObjectNameNormalizer) params.get( IDENTIFIER_NORMALIZER );
    sequenceName = ConfigurationHelper.getString( SEQUENCE_PARAM, params, sequenceName );
    if ( sequenceName.indexOf( '.' ) < 0 ) {
      sequenceName = normalizer.normalizeIdentifierQuoting( sequenceName );
      final String schemaName = params.getProperty( SCHEMA );
      final String catalogName = params.getProperty( CATALOG );
      sequenceName = Table.qualify(
          dialect.quote( catalogName ),
          dialect.quote( schemaName ),
View Full Code Here

   * @return The value column name
   */
  protected String determineValueColumnName(Properties params, Dialect dialect) {
    final ObjectNameNormalizer normalizer = (ObjectNameNormalizer) params.get( IDENTIFIER_NORMALIZER );
    final String name = ConfigurationHelper.getString( VALUE_COLUMN_PARAM, params, DEF_VALUE_COLUMN );
    return dialect.quote( normalizer.normalizeIdentifierQuoting( name ) );
  }

  /**
   * Determine the initial sequence value to use.  This value is used when
   * initializing the {@link #getDatabaseStructure() database structure}
View Full Code Here

  }

  @Override
  public void configure(Type type, Properties params, Dialect dialect) throws MappingException {
    ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params.get( IDENTIFIER_NORMALIZER );
    sequenceName = normalizer.normalizeIdentifierQuoting(
        ConfigurationHelper.getString( SEQUENCE, params, "hibernate_sequence" )
    );
    parameters = params.getProperty( PARAMETERS );

    if ( sequenceName.indexOf( '.' ) < 0 ) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.