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

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

Best Java code snippets using org.hibernate.cfg.Mappings.getCatalogName (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

  params.setProperty( PersistentIdentifierGenerator.SCHEMA, mappings.getSchemaName() );
if ( mappings.getCatalogName() != null ) {
  params.setProperty( PersistentIdentifierGenerator.CATALOG, mappings.getCatalogName() );
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.getCatalogName() != null ) {
  params.setProperty(
      PersistentIdentifierGenerator.CATALOG,
      mappings.getObjectNameNormalizer().normalizeIdentifierQuoting( mappings.getCatalogName() )
  );
origin: org.hibernate/com.springsource.org.hibernate.core

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

  params.setProperty(PersistentIdentifierGenerator.SCHEMA, mappings.getSchemaName());
if (mappings.getCatalogName() != null) {
  params.setProperty(PersistentIdentifierGenerator.CATALOG, mappings.getCatalogName());
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 catalog = catalogNode == null ? mappings.getCatalogName() : catalogNode.getValue();
origin: jboss.jboss-embeddable-ejb3/hibernate-all

mappings.getCatalogName() : catalogNode.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.getCatalogName() : catalogNode.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.getCatalogName() : catalogNode.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.cfgMappingsgetCatalogName

Javadoc

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

Popular in Java

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • startActivity (Activity)
  • setRequestProperty (URLConnection)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Path (java.nio.file)
  • JOptionPane (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top plugins for WebStorm
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