Package org.hibernate.cfg

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


   * @return The name of the value column
   */
  protected String determineValueColumnName(Properties params, Dialect dialect) {
    ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params.get( IDENTIFIER_NORMALIZER );
    String name = ConfigurationHelper.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


  private Type identifierType;
  private String sql;

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

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

        PropertiesHelper.getString( SEQUENCE, params, "hibernate_sequence" )
    );
    parameters = params.getProperty( PARAMETERS );

    if ( sequenceName.indexOf( '.' ) < 0 ) {
      final String schemaName = normalizer.normalizeIdentifierQuoting( params.getProperty( SCHEMA ) );
      final String catalogName = normalizer.normalizeIdentifierQuoting( params.getProperty( CATALOG ) );
      sequenceName = Table.qualify(
          dialect.quote( catalogName ),
          dialect.quote( schemaName ),
          dialect.quote( sequenceName )
View Full Code Here

    );
    parameters = params.getProperty( PARAMETERS );

    if ( sequenceName.indexOf( '.' ) < 0 ) {
      final String schemaName = normalizer.normalizeIdentifierQuoting( params.getProperty( SCHEMA ) );
      final String catalogName = normalizer.normalizeIdentifierQuoting( params.getProperty( CATALOG ) );
      sequenceName = Table.qualify(
          dialect.quote( catalogName ),
          dialect.quote( schemaName ),
          dialect.quote( sequenceName )
      );
View Full Code Here

    String column = params.getProperty( "column" );
    if ( column == null ) {
      column = params.getProperty( PersistentIdentifierGenerator.PK );
    }
    column = dialect.quote( normalizer.normalizeIdentifierQuoting( column ) );

    String tableList = params.getProperty( "tables" );
    if ( tableList == null ) {
      tableList = params.getProperty( PersistentIdentifierGenerator.TABLES );
    }
View Full Code Here

      tableList = params.getProperty( PersistentIdentifierGenerator.TABLES );
    }
    String[] tables = StringHelper.split( ", ", tableList );

    final String schema = dialect.quote(
        normalizer.normalizeIdentifierQuoting(
            params.getProperty( PersistentIdentifierGenerator.SCHEMA )
        )
    );
    final String catalog = dialect.quote(
        normalizer.normalizeIdentifierQuoting(
View Full Code Here

        normalizer.normalizeIdentifierQuoting(
            params.getProperty( PersistentIdentifierGenerator.SCHEMA )
        )
    );
    final String catalog = dialect.quote(
        normalizer.normalizeIdentifierQuoting(
            params.getProperty( PersistentIdentifierGenerator.CATALOG )
        )
    );

    StringBuffer buf = new StringBuffer();
View Full Code Here

        )
    );

    StringBuffer buf = new StringBuffer();
    for ( int i=0; i < tables.length; i++ ) {
      final String tableName = dialect.quote( normalizer.normalizeIdentifierQuoting( tables[i] ) );
      if ( tables.length > 1 ) {
        buf.append( "select " ).append( column ).append( " from " );
      }
      buf.append( Table.qualify( catalog, schema, tableName ) );
      if ( i < tables.length-1 ) {
View Full Code Here

    ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params.get( IDENTIFIER_NORMALIZER );

    tableName = PropertiesHelper.getString( TABLE, params, DEFAULT_TABLE_NAME );
    if ( tableName.indexOf( '.' ) < 0 ) {
      final String schemaName = normalizer.normalizeIdentifierQuoting( params.getProperty( SCHEMA ) );
      final String catalogName = normalizer.normalizeIdentifierQuoting( params.getProperty( CATALOG ) );
      tableName = Table.qualify(
          dialect.quote( catalogName ),
          dialect.quote( schemaName ),
          dialect.quote( tableName )
View Full Code Here

    ObjectNameNormalizer normalizer = ( ObjectNameNormalizer ) params.get( IDENTIFIER_NORMALIZER );

    tableName = PropertiesHelper.getString( TABLE, params, DEFAULT_TABLE_NAME );
    if ( tableName.indexOf( '.' ) < 0 ) {
      final String schemaName = normalizer.normalizeIdentifierQuoting( params.getProperty( SCHEMA ) );
      final String catalogName = normalizer.normalizeIdentifierQuoting( params.getProperty( CATALOG ) );
      tableName = Table.qualify(
          dialect.quote( catalogName ),
          dialect.quote( schemaName ),
          dialect.quote( tableName )
      );
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.