本文整理了Java中org.hibernate.cfg.Configuration.getEntityNotFoundDelegate()
方法的一些代码示例,展示了Configuration.getEntityNotFoundDelegate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getEntityNotFoundDelegate()
方法的具体详情如下:
包路径:org.hibernate.cfg.Configuration
类名称: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() );
内容来源于网络,如有侵权,请联系作者删除!