org.hibernate.cfg.Configuration.getEntityNotFoundDelegate()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(132)

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

Configuration.getEntityNotFoundDelegate介绍

[英]Retrieve the user-supplied delegate to handle non-existent entity scenarios. May be null.
[中]检索用户提供的委托以处理不存在的实体场景。可能为空。

代码示例

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

sessionFactoryBuilder.addSessionFactoryObservers( getSessionFactoryObserver() );
if ( getEntityNotFoundDelegate() != null ) {
  sessionFactoryBuilder.applyEntityNotFoundDelegate( getEntityNotFoundDelegate() );

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

@Override
  public EntityNotFoundDelegate getEntityNotFoundDelegate() {
    if ( entityNotFoundDelegate == null ) {
      if ( cfg.getEntityNotFoundDelegate() != null ) {
        entityNotFoundDelegate = cfg.getEntityNotFoundDelegate();
      }
      else {
        entityNotFoundDelegate = new EntityNotFoundDelegate() {
          public void handleEntityNotFound(String entityName, Serializable id) {
            throw new ObjectNotFoundException( id, entityName );
          }
        };
      }
    }
    return entityNotFoundDelegate;
  }
};

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

@Override
  public EntityNotFoundDelegate getEntityNotFoundDelegate() {
    if ( entityNotFoundDelegate == null ) {
      if ( cfg.getEntityNotFoundDelegate() != null ) {
        entityNotFoundDelegate = cfg.getEntityNotFoundDelegate();
      }
      else {
        entityNotFoundDelegate = new EntityNotFoundDelegate() {
          public void handleEntityNotFound(String entityName, Serializable id) {
            throw new ObjectNotFoundException( id, entityName );
          }
        };
      }
    }
    return entityNotFoundDelegate;
  }
};

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

EntityNotFoundDelegate entityNotFoundDelegate = cfg.getEntityNotFoundDelegate();
if ( entityNotFoundDelegate == null ) {
  entityNotFoundDelegate = new EntityNotFoundDelegate() {

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

sessionFactoryBuilder.addSessionFactoryObservers( getSessionFactoryObserver() );
if ( getEntityNotFoundDelegate() != null ) {
  sessionFactoryBuilder.applyEntityNotFoundDelegate( getEntityNotFoundDelegate() );

相关文章

Configuration类方法