org.hibernate.engine.spi.SessionFactoryImplementor.getImportedClassName()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中org.hibernate.engine.spi.SessionFactoryImplementor.getImportedClassName()方法的一些代码示例,展示了SessionFactoryImplementor.getImportedClassName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SessionFactoryImplementor.getImportedClassName()方法的具体详情如下:
包路径:org.hibernate.engine.spi.SessionFactoryImplementor
类名称:SessionFactoryImplementor
方法名:getImportedClassName

SessionFactoryImplementor.getImportedClassName介绍

[英]Get a class name, using query language imports
[中]使用查询语言导入获取类名

代码示例

代码示例来源:origin: hibernate/hibernate-orm

@Override
public String getImportedClassName(String name) {
  return delegate.getImportedClassName( name );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

/**
 * Given a (potentially unqualified) class name, locate its imported qualified name.
 *
 * @param className The potentially unqualified class name
 * @return The qualified class name.
 */
public String getImportedClassName(String className) {
  return sfi.getImportedClassName( className );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

/**
 * Given a (potentially unqualified) class name, locate its imported qualified name.
 *
 * @param className The potentially unqualified class name
 * @return The qualified class name.
 */
public String getImportedClassName(String className) {
  return sfi.getImportedClassName( className );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public static String getImportedClass(String name, SessionFactoryImplementor factory) {
    return factory.getImportedClassName( name );
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

public static String getImportedClass(String name, SessionFactoryImplementor factory) {
    return factory.getImportedClassName( name );
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

/**
 * Given a (potentially unqualified) class name, locate its persister.
 *
 * @param sfi The session factory implementor.
 * @param className The (potentially unqualified) class name.
 * @return The defined persister for this class, or null if none found.
 */
public static Queryable findQueryableUsingImports(SessionFactoryImplementor sfi, String className) {
  final String importedClassName = sfi.getImportedClassName( className );
  if ( importedClassName == null ) {
    return null;
  }
  try {
    return ( Queryable ) sfi.getEntityPersister( importedClassName );
  }
  catch ( MappingException me ) {
    return null;
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

/**
 * Given a (potentially unqualified) class name, locate its persister.
 *
 * @param sfi The session factory implementor.
 * @param className The (potentially unqualified) class name.
 * @return The defined persister for this class, or null if none found.
 */
public static Queryable findQueryableUsingImports(SessionFactoryImplementor sfi, String className) {
  final String importedClassName = sfi.getImportedClassName( className );
  if ( importedClassName == null ) {
    return null;
  }
  try {
    return ( Queryable ) sfi.getEntityPersister( importedClassName );
  }
  catch ( MappingException me ) {
    return null;
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

/**
 * Locate the persister by class or entity name.
 *
 * @param name The class or entity name
 * @return The defined persister for this entity, or null if none found.
 * @throws MappingException
 */
private EntityPersister findEntityPersisterByName(String name) throws MappingException {
  // First, try to get the persister using the given name directly.
  try {
    return sfi.getEntityPersister( name );
  }
  catch ( MappingException ignore ) {
    // unable to locate it using this name
  }
  // If that didn't work, try using the 'import' name.
  String importedClassName = sfi.getImportedClassName( name );
  if ( importedClassName == null ) {
    return null;
  }
  return sfi.getEntityPersister( importedClassName );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

/**
 * Locate the persister by class or entity name.
 *
 * @param name The class or entity name
 * @return The defined persister for this entity, or null if none found.
 * @throws MappingException
 */
private EntityPersister findEntityPersisterByName(String name) throws MappingException {
  // First, try to get the persister using the given name directly.
  try {
    return sfi.getEntityPersister( name );
  }
  catch ( MappingException ignore ) {
    // unable to locate it using this name
  }
  // If that didn't work, try using the 'import' name.
  String importedClassName = sfi.getImportedClassName( name );
  if ( importedClassName == null ) {
    return null;
  }
  return sfi.getEntityPersister( importedClassName );
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

Queryable getEntityPersisterUsingImports(String className) {
  final String importedClassName = getFactory().getImportedClassName( className );
  if ( importedClassName == null ) {
    return null;
  }
  try {
    return ( Queryable ) getFactory().getEntityPersister( importedClassName );
  }
  catch ( MappingException me ) {
    return null;
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

Queryable getEntityPersisterUsingImports(String className) {
  final String importedClassName = getFactory().getImportedClassName( className );
  if ( importedClassName == null ) {
    return null;
  }
  try {
    return ( Queryable ) getFactory().getEntityPersister( importedClassName );
  }
  catch ( MappingException me ) {
    return null;
  }
}

相关文章

微信公众号

最新文章

更多

SessionFactoryImplementor类方法