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

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

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

origin: jboss.jboss-embeddable-ejb3/hibernate-all

private static void bindImport(Element importNode, Mappings mappings) {
  String className = getClassName( importNode.attribute( "class" ), mappings );
  Attribute renameNode = importNode.attribute( "rename" );
  String rename = ( renameNode == null ) ?
          StringHelper.unqualify( className ) :
          renameNode.getValue();
  log.debug( "Import: " + rename + " -> " + className );
  mappings.addImport( className, rename );
}
origin: org.hibernate/com.springsource.org.hibernate.core

private static void bindImport(Element importNode, Mappings mappings) {
  String className = getClassName( importNode.attribute( "class" ), mappings );
  Attribute renameNode = importNode.attribute( "rename" );
  String rename = ( renameNode == null ) ?
          StringHelper.unqualify( className ) :
          renameNode.getValue();
  LOG.debugf( "Import: %s -> %s", rename, className );
  mappings.addImport( className, rename );
}
origin: org.hibernate/com.springsource.org.hibernate

private static void bindImport(Element importNode, Mappings mappings) {
  String className = getClassName( importNode.attribute( "class" ), mappings );
  Attribute renameNode = importNode.attribute( "rename" );
  String rename = ( renameNode == null ) ?
          StringHelper.unqualify( className ) :
          renameNode.getValue();
  LOG.debugf( "Import: %s -> %s", rename, className );
  mappings.addImport( className, rename );
}
origin: hibernate/hibernate

  : renameNode.getValue();
log.debug( "Import: " + rename + " -> " + className );
mappings.addImport( className, rename );
origin: com.manydesigns/portofino-database

private Mappings classMapping(Database database, Mappings mappings) {
  for (Schema schema : database.getSchemas()) {
    for (com.manydesigns.portofino.model.database.Table aTable :
        schema.getTables()) {
      logger.debug("Class - {}", aTable.getQualifiedName());
      com.manydesigns.portofino.model.database.PrimaryKey primaryKey =
          aTable.getPrimaryKey();
      if (primaryKey == null) {
        logger.debug("Skipping table without primary key: {}",
            aTable.getQualifiedName());
        continue;
      }
      if (!primaryKey.isValid()) {
        logger.debug("Skipping table with invalid primary key: {}",
            aTable.getQualifiedName());
        continue;
      }
      RootClass clazz = createTableMapping(mappings, aTable);
      if(clazz != null) {
        mappings.addClass(clazz);
        mappings.addImport(clazz.getEntityName(), clazz.getEntityName());
      }
    }
  }
  return mappings;
}
origin: ManyDesigns/Portofino

private Mappings classMapping(Database database, Mappings mappings) {
  for (Schema schema : database.getSchemas()) {
    for (com.manydesigns.portofino.model.database.Table aTable :
        schema.getTables()) {
      logger.debug("Class - {}", aTable.getQualifiedName());
      com.manydesigns.portofino.model.database.PrimaryKey primaryKey =
          aTable.getPrimaryKey();
      if (primaryKey == null) {
        logger.debug("Skipping table without primary key: {}",
            aTable.getQualifiedName());
        continue;
      }
      if (!primaryKey.isValid()) {
        logger.debug("Skipping table with invalid primary key: {}",
            aTable.getQualifiedName());
        continue;
      }
      RootClass clazz = createTableMapping(mappings, aTable);
      if(clazz != null) {
        mappings.addClass(clazz);
        mappings.addImport(clazz.getEntityName(), clazz.getEntityName());
      }
    }
  }
  return mappings;
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

mappings.addImport( entity.getEntityName(), entity.getEntityName() );
if ( mappings.isAutoImport() && entity.getEntityName().indexOf( '.' ) > 0 ) {
  mappings.addImport(
      entity.getEntityName(),
      StringHelper.unqualify( entity.getEntityName() )
origin: hibernate/hibernate

mappings.addImport( entity.getEntityName(), entity.getEntityName() );
if ( mappings.isAutoImport() && entity.getEntityName().indexOf( '.' ) > 0 ) {
  mappings.addImport( entity.getEntityName(), StringHelper.unqualify( entity
    .getEntityName() ) );
origin: org.hibernate/com.springsource.org.hibernate

mappings.addImport( entity.getEntityName(), entity.getEntityName() );
if ( mappings.isAutoImport() && entity.getEntityName().indexOf( '.' ) > 0 ) {
  mappings.addImport(
      entity.getEntityName(),
      StringHelper.unqualify( entity.getEntityName() )
origin: org.hibernate/com.springsource.org.hibernate.core

mappings.addImport( entity.getEntityName(), entity.getEntityName() );
if ( mappings.isAutoImport() && entity.getEntityName().indexOf( '.' ) > 0 ) {
  mappings.addImport(
      entity.getEntityName(),
      StringHelper.unqualify( entity.getEntityName() )
origin: org.grails/grails-datastore-gorm-hibernate-core

/**
 * Binds the specified persistant class to the runtime model based on the
 * properties defined in the domain class
 *
 * @param domainClass     The Grails domain class
 * @param persistentClass The persistant class
 * @param mappings        Existing mappings
 */
protected void bindClass(PersistentEntity domainClass, PersistentClass persistentClass, Mappings mappings) {
  // set lazy loading for now
  persistentClass.setLazy(true);
  final String entityName = domainClass.getName();
  persistentClass.setEntityName(entityName);
  persistentClass.setJpaEntityName(unqualify(entityName));
  persistentClass.setProxyInterfaceName(entityName);
  persistentClass.setClassName(entityName);
  // set dynamic insert to false
  persistentClass.setDynamicInsert(false);
  // set dynamic update to false
  persistentClass.setDynamicUpdate(false);
  // set select before update to false
  persistentClass.setSelectBeforeUpdate(false);
  // add import to mappings
  if (mappings.isAutoImport() && persistentClass.getEntityName().indexOf('.') > 0) {
    mappings.addImport(persistentClass.getEntityName(), unqualify(persistentClass.getEntityName()));
  }
}
origin: org.grails/grails-hibernate

/**
 * Binds the specified persistant class to the runtime model based on the
 * properties defined in the domain class
 *
 * @param domainClass     The Grails domain class
 * @param persistentClass The persistant class
 * @param mappings        Existing mappings
 */
private static void bindClass(GrailsDomainClass domainClass, PersistentClass persistentClass, Mappings mappings) {
  // set lazy loading for now
  persistentClass.setLazy(true);
  persistentClass.setEntityName(domainClass.getFullName());
  persistentClass.setProxyInterfaceName(domainClass.getFullName());
  persistentClass.setClassName(domainClass.getFullName());
  // set dynamic insert to false
  persistentClass.setDynamicInsert(false);
  // set dynamic update to false
  persistentClass.setDynamicUpdate(false);
  // set select before update to false
  persistentClass.setSelectBeforeUpdate(false);
  // add import to mappings
  if (mappings.isAutoImport() && persistentClass.getEntityName().indexOf('.') > 0) {
    mappings.addImport(persistentClass.getEntityName(), StringHelper.unqualify(persistentClass.getEntityName()));
  }
}
origin: org.hibernate/com.springsource.org.hibernate

mappings.addImport( persistentClass.getEntityName(), name );
String entityName = persistentClass.getEntityName();
if ( !entityName.equals( name ) ) {
  mappings.addImport( entityName, entityName );
origin: org.hibernate/com.springsource.org.hibernate.core

mappings.addImport( persistentClass.getEntityName(), name );
String entityName = persistentClass.getEntityName();
if ( !entityName.equals( name ) ) {
  mappings.addImport( entityName, entityName );
org.hibernate.cfgMappingsaddImport

Javadoc

Adds an import (HQL entity rename) to the repository.

Popular methods of Mappings

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

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ImageIO (javax.imageio)
  • Best IntelliJ 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