org.hibernate.event.spi.EventSource.getIdentifier()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(150)

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

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 );

相关文章