Tabnine Logo
Mappings.getObjectNameNormalizer
Code IndexAdd Tabnine to your IDE (free)

How to use
getObjectNameNormalizer
method
in
org.hibernate.cfg.Mappings

Best Java code snippets using org.hibernate.cfg.Mappings.getObjectNameNormalizer (Showing top 20 results out of 315)

origin: com.manydesigns/portofino-database

private void manageIncrementGenerator(Mappings mappings, Table tab, SimpleValue id, String entityName) {
  id.setIdentifierGeneratorStrategy("increment");
  Properties params = new Properties();
  params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER,
      mappings.getObjectNameNormalizer());
  params.setProperty(PersistentIdentifierGenerator.SCHEMA, quoteIdentifier(tab.getSchema()));
  params.put(IncrementGenerator.ENTITY_NAME,
      entityName);
  id.setIdentifierGeneratorProperties(params);
  id.setNullValue(null);
}
origin: ManyDesigns/Portofino

private void manageIncrementGenerator(Mappings mappings, Table tab, SimpleValue id, String entityName) {
  id.setIdentifierGeneratorStrategy("increment");
  Properties params = new Properties();
  params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER,
      mappings.getObjectNameNormalizer());
  params.setProperty(PersistentIdentifierGenerator.SCHEMA, quoteIdentifier(tab.getSchema()));
  params.put(IncrementGenerator.ENTITY_NAME,
      entityName);
  id.setIdentifierGeneratorProperties(params);
  id.setNullValue(null);
}
origin: com.manydesigns/portofino-database

private void manageIdentityGenerator(Mappings mappings, Table tab, SimpleValue id) {
  id.setIdentifierGeneratorStrategy(PortofinoIdentityGenerator.class.getName()); //"identity");
  Properties params = new Properties();
  params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer());
  if (mappings.getSchemaName() != null) {
    params.setProperty(
        PersistentIdentifierGenerator.SCHEMA,
        mappings.getObjectNameNormalizer().normalizeIdentifierQuoting(mappings.getSchemaName()));
  }
  if (mappings.getCatalogName() != null) {
    params.setProperty(
        PersistentIdentifierGenerator.CATALOG,
        mappings.getObjectNameNormalizer().normalizeIdentifierQuoting(mappings.getCatalogName()));
  }
  id.setIdentifierGeneratorProperties(params);
  id.setNullValue(null);
}
origin: ManyDesigns/Portofino

private void manageIdentityGenerator(Mappings mappings, Table tab, SimpleValue id) {
  id.setIdentifierGeneratorStrategy(PortofinoIdentityGenerator.class.getName()); //"identity");
  Properties params = new Properties();
  params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer());
  if (mappings.getSchemaName() != null) {
    params.setProperty(
        PersistentIdentifierGenerator.SCHEMA,
        mappings.getObjectNameNormalizer().normalizeIdentifierQuoting(mappings.getSchemaName()));
  }
  if (mappings.getCatalogName() != null) {
    params.setProperty(
        PersistentIdentifierGenerator.CATALOG,
        mappings.getObjectNameNormalizer().normalizeIdentifierQuoting(mappings.getCatalogName()));
  }
  id.setIdentifierGeneratorProperties(params);
  id.setNullValue(null);
}
origin: com.manydesigns/portofino-database

private void manageSequenceGenerator(Mappings mappings, Table tab,
                   SimpleValue id, SequenceGenerator generator) {
  id.setIdentifierGeneratorStrategy
      ("enhanced-sequence");
  Properties params = new Properties();
  params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER,
        mappings.getObjectNameNormalizer());
  params.put(SequenceStyleGenerator.SEQUENCE_PARAM,
        quoteIdentifier(generator.getName()));
  params.setProperty(
      SequenceStyleGenerator.SCHEMA,
      quoteIdentifier(tab.getSchema()));
  id.setIdentifierGeneratorProperties(params);
  id.setNullValue(null);
}
origin: ManyDesigns/Portofino

private void manageSequenceGenerator(Mappings mappings, Table tab,
                   SimpleValue id, SequenceGenerator generator) {
  id.setIdentifierGeneratorStrategy
      ("enhanced-sequence");
  Properties params = new Properties();
  params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER,
        mappings.getObjectNameNormalizer());
  params.put(SequenceStyleGenerator.SEQUENCE_PARAM,
        quoteIdentifier(generator.getName()));
  params.setProperty(
      SequenceStyleGenerator.SCHEMA,
      quoteIdentifier(tab.getSchema()));
  id.setIdentifierGeneratorProperties(params);
  id.setNullValue(null);
}
origin: com.manydesigns/portofino-database

private void manageTableGenerator(Mappings mappings, Table tab, SimpleValue id,
                   com.manydesigns.portofino.model.database.TableGenerator generator) {
  id.setIdentifierGeneratorStrategy("enhanced-table");
  Properties params = new Properties();
  params.put(TableGenerator.TABLE,
        tab);
  params.put(TableGenerator.TABLE_PARAM,
        quoteIdentifier(generator.getTable()));
  params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER,
        mappings.getObjectNameNormalizer());
  params.put(TableGenerator.SEGMENT_COLUMN_PARAM, quoteIdentifier(generator.getKeyColumn()));
  params.put(TableGenerator.SEGMENT_VALUE_PARAM, generator.getKeyValue());
  params.put(TableGenerator.VALUE_COLUMN_PARAM, quoteIdentifier(generator.getValueColumn()));
  params.setProperty(
        TableGenerator.SCHEMA, quoteIdentifier(tab.getSchema()));
  id.setIdentifierGeneratorProperties(params);
  id.setNullValue(null);
}
origin: ManyDesigns/Portofino

private void manageTableGenerator(Mappings mappings, Table tab, SimpleValue id,
                   com.manydesigns.portofino.model.database.TableGenerator generator) {
  id.setIdentifierGeneratorStrategy("enhanced-table");
  Properties params = new Properties();
  params.put(TableGenerator.TABLE,
        tab);
  params.put(TableGenerator.TABLE_PARAM,
        quoteIdentifier(generator.getTable()));
  params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER,
        mappings.getObjectNameNormalizer());
  params.put(TableGenerator.SEGMENT_COLUMN_PARAM, quoteIdentifier(generator.getKeyColumn()));
  params.put(TableGenerator.SEGMENT_VALUE_PARAM, generator.getKeyValue());
  params.put(TableGenerator.VALUE_COLUMN_PARAM, quoteIdentifier(generator.getValueColumn()));
  params.setProperty(
        TableGenerator.SCHEMA, quoteIdentifier(tab.getSchema()));
  id.setIdentifierGeneratorProperties(params);
  id.setNullValue(null);
}
origin: org.hibernate/com.springsource.org.hibernate

public void redefineColumnName(String columnName, String propertyName, boolean applyNamingStrategy) {
  if ( applyNamingStrategy ) {
    if ( StringHelper.isEmpty( columnName ) ) {
      if ( propertyName != null ) {
        mappingColumn.setName(
            mappings.getObjectNameNormalizer().normalizeIdentifierQuoting(
                mappings.getNamingStrategy().propertyToColumnName( propertyName )
            )
        );
      }
      //Do nothing otherwise
    }
    else {
      columnName = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnName );
      columnName = mappings.getNamingStrategy().columnName( columnName );
      columnName = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnName );
      mappingColumn.setName( columnName );
    }
  }
  else {
    if ( StringHelper.isNotEmpty( columnName ) ) {
      mappingColumn.setName( mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnName ) );
    }
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

public void redefineColumnName(String columnName, String propertyName, boolean applyNamingStrategy) {
  if ( applyNamingStrategy ) {
    if ( StringHelper.isEmpty( columnName ) ) {
      if ( propertyName != null ) {
        mappingColumn.setName(
            mappings.getObjectNameNormalizer().normalizeIdentifierQuoting(
                mappings.getNamingStrategy().propertyToColumnName( propertyName )
            )
        );
      }
      //Do nothing otherwise
    }
    else {
      columnName = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnName );
      columnName = mappings.getNamingStrategy().columnName( columnName );
      columnName = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnName );
      mappingColumn.setName( columnName );
    }
  }
  else {
    if ( StringHelper.isNotEmpty( columnName ) ) {
      mappingColumn.setName( mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnName ) );
    }
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

params.put( PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer() );
origin: org.hibernate/com.springsource.org.hibernate.core

params.put( PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer() );
      mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getSchemaName() )
  );
  params.setProperty(
      PersistentIdentifierGenerator.CATALOG,
      mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getCatalogName() )
  );
origin: org.hibernate/com.springsource.org.hibernate

params.put( PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer() );
origin: org.hibernate/com.springsource.org.hibernate

params.put( PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer() );
      mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getSchemaName() )
  );
  params.setProperty(
      PersistentIdentifierGenerator.CATALOG,
      mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getCatalogName() )
  );
origin: org.hibernate/com.springsource.org.hibernate

    : mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnDefinition );
String name = "".equals( colName )
    ? defaultName
    : colName;
name = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( name );
return new Ejb3JoinColumn(
    sqlType,
defaultName = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( defaultName );
return new Ejb3JoinColumn(
    (String) null, defaultName,
origin: org.hibernate/com.springsource.org.hibernate.core

    : mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( columnDefinition );
String name = "".equals( colName )
    ? defaultName
    : colName;
name = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( name );
return new Ejb3JoinColumn(
    sqlType,
defaultName = mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( defaultName );
return new Ejb3JoinColumn(
    (String) null, defaultName,
origin: org.grails/grails-datastore-gorm-hibernate-core

params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer());
origin: org.grails/grails-hibernate

params.put(PersistentIdentifierGenerator.IDENTIFIER_NORMALIZER, mappings.getObjectNameNormalizer());
origin: org.hibernate/com.springsource.org.hibernate

catalog = BinderHelper.isEmptyAnnotationValue( catalog ) ? mappings.getCatalogName() : catalog;
String realTableName = mappings.getObjectNameNormalizer().normalizeDatabaseIdentifier(
    nameSource.getExplicitName(),
    namingStrategyHelper
origin: org.hibernate/com.springsource.org.hibernate.core

catalog = BinderHelper.isEmptyAnnotationValue( catalog ) ? mappings.getCatalogName() : catalog;
String realTableName = mappings.getObjectNameNormalizer().normalizeDatabaseIdentifier(
    nameSource.getExplicitName(),
    namingStrategyHelper
org.hibernate.cfgMappingsgetObjectNameNormalizer

Javadoc

Retrieve the database identifier normalizer for this context.

Popular methods of Mappings

  • addClass
    Add entity mapping metadata.
  • addImport
    Adds an import (HQL entity rename) to the repository.
  • addTable
    Adds table metadata to this repository returning the created metadata instance.
  • getCatalogName
    Returns the currently bound default catalog name.
  • getClass
    Retrieves the entity mapping metadata for the given entity name.
  • getSchemaName
    Returns the currently bound default schema name.
  • addCollection
    Add collection mapping metadata to this repository.
  • addSecondPass
    Adds a second pass.
  • addTableBinding
    Adds a table binding to this repository.
  • getDefaultAccess
    Get the current default property access style.
  • isAutoImport
    Determine whether auto importing of entity names is currently enabled.
  • addDenormalizedTable
    Adds a 'denormalized table' to this repository.
  • isAutoImport,
  • addDenormalizedTable,
  • addFilterDefinition,
  • addTypeDef,
  • addUniquePropertyReference,
  • setAutoImport,
  • addColumnBinding,
  • addPropertyReference,
  • addQuery

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • getResourceAsStream (ClassLoader)
  • addToBackStack (FragmentTransaction)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Table (org.hibernate.mapping)
    A relational table
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top Sublime Text plugins
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