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

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

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

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 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: hibernate/hibernate

if ( mappings.getSchemaName() != null ) {
  params.setProperty( PersistentIdentifierGenerator.SCHEMA, mappings.getSchemaName() );
origin: org.grails/grails-hibernate

private static String getJoinedSubClassTableName(
    GrailsDomainClass sub, PersistentClass model, Table denormalizedSuperTable,
    Mappings mappings, String sessionFactoryBeanName) {
  String logicalTableName = StringHelper.unqualify(model.getEntityName());
  String physicalTableName = getTableName(sub, sessionFactoryBeanName);
  mappings.addTableBinding(mappings.getSchemaName(), mappings.getCatalogName(), logicalTableName, physicalTableName, denormalizedSuperTable);
  return physicalTableName;
}
origin: org.grails/grails-datastore-gorm-hibernate-core

protected String getJoinedSubClassTableName(
    HibernatePersistentEntity sub, PersistentClass model, Table denormalizedSuperTable,
    Mappings mappings, String sessionFactoryBeanName) {
  String logicalTableName = unqualify(model.getEntityName());
  String physicalTableName = getTableName(sub, sessionFactoryBeanName);
  mappings.addTableBinding(mappings.getSchemaName(), mappings.getCatalogName(), logicalTableName, physicalTableName, denormalizedSuperTable);
  return physicalTableName;
}
origin: org.hibernate/com.springsource.org.hibernate

if ( mappings.getSchemaName() != null ) {
  params.setProperty(
      PersistentIdentifierGenerator.SCHEMA,
      mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getSchemaName() )
  );
origin: org.hibernate/com.springsource.org.hibernate.core

if ( mappings.getSchemaName() != null ) {
  params.setProperty(
      PersistentIdentifierGenerator.SCHEMA,
      mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getSchemaName() )
  );
origin: org.grails/grails-hibernate

if (mappings.getSchemaName() != null) {
  params.setProperty(PersistentIdentifierGenerator.SCHEMA, mappings.getSchemaName());
origin: org.grails/grails-hibernate

mappings.getSchemaName(), mappings.getCatalogName(),
getJoinedSubClassTableName(sub, joinedSubclass, null, mappings, sessionFactoryBeanName),
null, false);
origin: org.grails/grails-datastore-gorm-hibernate-core

mappings.getSchemaName(), mappings.getCatalogName(),
getJoinedSubClassTableName(sub, joinedSubclass, null, mappings, sessionFactoryBeanName),
null, false);
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public static void bindUnionSubclass(Element node, UnionSubclass unionSubclass,
    Mappings mappings, java.util.Map inheritedMetas) throws MappingException {
  bindClass( node, unionSubclass, mappings, inheritedMetas );
  inheritedMetas = getMetas( node, inheritedMetas, true ); // get meta's from <subclass>
  if ( unionSubclass.getEntityPersisterClass() == null ) {
    unionSubclass.getRootClass().setEntityPersisterClass(
      UnionSubclassEntityPersister.class );
  }
  Attribute schemaNode = node.attribute( "schema" );
  String schema = schemaNode == null ?
      mappings.getSchemaName() : schemaNode.getValue();
  Attribute catalogNode = node.attribute( "catalog" );
  String catalog = catalogNode == null ?
      mappings.getCatalogName() : catalogNode.getValue();
  Table denormalizedSuperTable = unionSubclass.getSuperclass().getTable();
  Table mytable = mappings.addDenormalizedTable(
      schema,
      catalog,
      getClassTableName(unionSubclass, node, schema, catalog, denormalizedSuperTable, mappings ),
      unionSubclass.isAbstract() != null && unionSubclass.isAbstract().booleanValue(),
      getSubselect( node ),
      denormalizedSuperTable
    );
  unionSubclass.setTable( mytable );
  log.info(
      "Mapping union-subclass: " + unionSubclass.getEntityName() +
      " -> " + unionSubclass.getTable().getName()
    );
  createClassProperties( node, unionSubclass, mappings, inheritedMetas );
}
origin: hibernate/hibernate

String schema = schemaNode == null ? mappings.getSchemaName() : schemaNode.getValue();
origin: jboss.jboss-embeddable-ejb3/hibernate-all

mappings.getSchemaName() : schemaNode.getValue();
origin: org.grails/grails-hibernate

private static void bindCollectionTable(GrailsDomainClassProperty property, Mappings mappings,
    Collection collection, Table ownerTable, String sessionFactoryBeanName) {
  String prefix = ownerTable.getSchema();
  PropertyConfig config = getPropertyConfig(property);
  JoinTable jt = config != null ? config.getJoinTable() : null;
  NamingStrategy namingStrategy = getNamingStrategy(sessionFactoryBeanName);
  String tableName = (prefix == null ? "" : prefix + '.') + (jt != null && jt.getName() != null ? jt.getName() : namingStrategy.tableName(calculateTableForMany(property, sessionFactoryBeanName)));
  String schemaName = mappings.getSchemaName();
  String catalogName = mappings.getCatalogName();
  if(jt != null) {
    if(jt.getSchema() != null) {
      schemaName = jt.getSchema();
    }
    if(jt.getCatalog() != null) {
      catalogName = jt.getCatalog();
    }
  }
  collection.setCollectionTable(mappings.addTable(
      schemaName, catalogName,
     tableName, null, false));
}
origin: org.hibernate/com.springsource.org.hibernate

mappings.getSchemaName() : schemaNode.getValue();
origin: org.grails/grails-datastore-gorm-hibernate-core

protected void bindCollectionTable(ToMany property, Mappings mappings,
    Collection collection, Table ownerTable, String sessionFactoryBeanName) {
  String owningTableSchema = ownerTable.getSchema();
  PropertyConfig config = getPropertyConfig(property);
  JoinTable jt = config != null ? config.getJoinTable() : null;
  NamingStrategy namingStrategy = getNamingStrategy(sessionFactoryBeanName);
  String tableName = (jt != null && jt.getName() != null ? jt.getName() : namingStrategy.tableName(calculateTableForMany(property, sessionFactoryBeanName)));
  String schemaName = mappings.getSchemaName();
  String catalogName = mappings.getCatalogName();
  if(jt != null) {
    if(jt.getSchema() != null) {
      schemaName = jt.getSchema();
    }
    if(jt.getCatalog() != null) {
      catalogName = jt.getCatalog();
    }
  }
  if(schemaName == null && owningTableSchema != null) {
    schemaName = owningTableSchema;
  }
  collection.setCollectionTable(mappings.addTable(
      schemaName, catalogName,
      tableName, null, false));
}
origin: org.hibernate/com.springsource.org.hibernate.core

public static void bindUnionSubclass(Element node, UnionSubclass unionSubclass,
    Mappings mappings, java.util.Map inheritedMetas) throws MappingException {
  bindClass( node, unionSubclass, mappings, inheritedMetas );
  inheritedMetas = getMetas( node, inheritedMetas, true ); // get meta's from <subclass>
  Attribute schemaNode = node.attribute( "schema" );
  String schema = schemaNode == null ?
      mappings.getSchemaName() : schemaNode.getValue();
  Attribute catalogNode = node.attribute( "catalog" );
  String catalog = catalogNode == null ?
      mappings.getCatalogName() : catalogNode.getValue();
  Table denormalizedSuperTable = unionSubclass.getSuperclass().getTable();
  Table mytable = mappings.addDenormalizedTable(
      schema,
      catalog,
      getClassTableName(unionSubclass, node, schema, catalog, denormalizedSuperTable, mappings ),
      unionSubclass.isAbstract() != null && unionSubclass.isAbstract().booleanValue(),
      getSubselect( node ),
      denormalizedSuperTable
    );
  unionSubclass.setTable( mytable );
  if ( LOG.isDebugEnabled() ) {
    LOG.debugf( "Mapping union-subclass: %s -> %s", unionSubclass.getEntityName(), unionSubclass.getTable().getName() );
  }
  createClassProperties( node, unionSubclass, mappings, inheritedMetas );
}
origin: org.hibernate/com.springsource.org.hibernate.core

mappings.getSchemaName() : schemaNode.getValue();
origin: org.hibernate/com.springsource.org.hibernate

public static void bindUnionSubclass(Element node, UnionSubclass unionSubclass,
    Mappings mappings, java.util.Map inheritedMetas) throws MappingException {
  bindClass( node, unionSubclass, mappings, inheritedMetas );
  inheritedMetas = getMetas( node, inheritedMetas, true ); // get meta's from <subclass>
  Attribute schemaNode = node.attribute( "schema" );
  String schema = schemaNode == null ?
      mappings.getSchemaName() : schemaNode.getValue();
  Attribute catalogNode = node.attribute( "catalog" );
  String catalog = catalogNode == null ?
      mappings.getCatalogName() : catalogNode.getValue();
  Table denormalizedSuperTable = unionSubclass.getSuperclass().getTable();
  Table mytable = mappings.addDenormalizedTable(
      schema,
      catalog,
      getClassTableName(unionSubclass, node, schema, catalog, denormalizedSuperTable, mappings ),
      unionSubclass.isAbstract() != null && unionSubclass.isAbstract().booleanValue(),
      getSubselect( node ),
      denormalizedSuperTable
    );
  unionSubclass.setTable( mytable );
  if ( LOG.isDebugEnabled() ) {
    LOG.debugf( "Mapping union-subclass: %s -> %s", unionSubclass.getEntityName(), unionSubclass.getTable().getName() );
  }
  createClassProperties( node, unionSubclass, mappings, inheritedMetas );
}
origin: hibernate/hibernate

public static void bindUnionSubclass(Element node, UnionSubclass unionSubclass,
    Mappings mappings, java.util.Map inheritedMetas) throws MappingException {
  bindClass( node, unionSubclass, mappings, inheritedMetas );
  inheritedMetas = getMetas( node, inheritedMetas, true ); // get meta's from <subclass>
  if ( unionSubclass.getEntityPersisterClass() == null ) {
    unionSubclass.getRootClass().setEntityPersisterClass(
      UnionSubclassEntityPersister.class );
  }
  Attribute schemaNode = node.attribute( "schema" );
  String schema = schemaNode == null ? mappings.getSchemaName() : schemaNode.getValue();
  Attribute catalogNode = node.attribute( "catalog" );
  String catalog = catalogNode == null ? mappings.getCatalogName() : catalogNode.getValue();
  Table mytable = mappings.addDenormalizedTable( 
      schema, 
      catalog, 
      getClassTableName(unionSubclass, node, mappings ), 
      unionSubclass.isAbstract(), 
      getSubselect( node ), 
      unionSubclass.getSuperclass().getTable() );
  unionSubclass.setTable( mytable );
  log.info( "Mapping union-subclass: "
    + unionSubclass.getEntityName()
    + " -> "
    + unionSubclass.getTable().getName() );
  createClassProperties( node, unionSubclass, mappings, inheritedMetas );
}
org.hibernate.cfgMappingsgetSchemaName

Javadoc

Returns the currently bound default schema name.

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.
  • 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.
  • addFilterDefinition
    Adds a filter definition to this repository.
  • addDenormalizedTable,
  • addFilterDefinition,
  • addTypeDef,
  • addUniquePropertyReference,
  • getObjectNameNormalizer,
  • setAutoImport,
  • addColumnBinding,
  • addPropertyReference,
  • addQuery

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top plugins for Android Studio
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