本文整理了Java中org.hibernate.event.spi.EventSource.getIdentifier()
方法的一些代码示例,展示了EventSource.getIdentifier()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EventSource.getIdentifier()
方法的具体详情如下:
包路径:org.hibernate.event.spi.EventSource
类名称:EventSource
方法名:getIdentifier
暂无
代码示例来源:origin: hibernate/hibernate-orm
MessageHelper.infoString(
session.getEntityName( managedEntity ),
session.getIdentifier( managedEntity )
代码示例来源:origin: hibernate/hibernate-orm
MessageHelper.infoString(
entityName,
session.getIdentifier( managedEntity )
代码示例来源:origin: hibernate/hibernate-orm
private String printEntity(Object entity) {
if ( session.getPersistenceContext().getEntry( entity ) != null ) {
return MessageHelper.infoString( session.getEntityName( entity ), session.getIdentifier( entity ) );
}
// Entity was not found in current persistence context. Use Object#toString() method.
return "[" + entity + "]";
}
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
public void entityCopyDetected(
Object managedEntity,
Object mergeEntity1,
Object mergeEntity2,
EventSource session) {
if ( mergeEntity1 == managedEntity && mergeEntity2 == managedEntity) {
throw new AssertionFailure( "entity1 and entity2 are the same as managedEntity; must be different." );
}
final String managedEntityString = MessageHelper.infoString(
session.getEntityName( managedEntity ),
session.getIdentifier( managedEntity )
);
throw new IllegalStateException(
"Multiple representations of the same entity " + managedEntityString + " are being merged. " +
getManagedOrDetachedEntityString( managedEntity, mergeEntity1 ) + "; " +
getManagedOrDetachedEntityString( managedEntity, mergeEntity2 )
);
}
代码示例来源:origin: hibernate/hibernate-orm
return source.getIdentifier( entity );
代码示例来源:origin: org.hibernate.orm/hibernate-core
MessageHelper.infoString(
session.getEntityName( managedEntity ),
session.getIdentifier( managedEntity )
代码示例来源:origin: org.hibernate.orm/hibernate-core
MessageHelper.infoString(
entityName,
session.getIdentifier( managedEntity )
代码示例来源:origin: org.hibernate.orm/hibernate-core
private String printEntity(Object entity) {
if ( session.getPersistenceContext().getEntry( entity ) != null ) {
return MessageHelper.infoString( session.getEntityName( entity ), session.getIdentifier( entity ) );
}
// Entity was not found in current persistence context. Use Object#toString() method.
return "[" + entity + "]";
}
}
代码示例来源:origin: org.hibernate.orm/hibernate-core
@Override
public void entityCopyDetected(
Object managedEntity,
Object mergeEntity1,
Object mergeEntity2,
EventSource session) {
if ( mergeEntity1 == managedEntity && mergeEntity2 == managedEntity) {
throw new AssertionFailure( "entity1 and entity2 are the same as managedEntity; must be different." );
}
final String managedEntityString = MessageHelper.infoString(
session.getEntityName( managedEntity ),
session.getIdentifier( managedEntity )
);
throw new IllegalStateException(
"Multiple representations of the same entity " + managedEntityString + " are being merged. " +
getManagedOrDetachedEntityString( managedEntity, mergeEntity1 ) + "; " +
getManagedOrDetachedEntityString( managedEntity, mergeEntity2 )
);
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
return source.getIdentifier( entity );
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
return source.getIdentifier( entity );
代码示例来源:origin: org.hibernate.orm/hibernate-core
return source.getIdentifier( entity );
内容来源于网络,如有侵权,请联系作者删除!