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

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

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

SessionFactoryImplementor.getCollectionRolesByEntityParticipant介绍

暂无

代码示例

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

@Override
public Set<String> getCollectionRolesByEntityParticipant(String entityName) {
  return delegate.getCollectionRolesByEntityParticipant( entityName );
}

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

@Override
public Set<String> getCollectionRolesByEntityParticipant(String entityName) {
  return delegate.getCollectionRolesByEntityParticipant( entityName );
}

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

/**
 * Constructs an action to cleanup "affected cache regions" based on the
 * affected entity persisters.  The affected regions are defined as the
 * region (if any) of the entity persisters themselves, plus the
 * collection regions for any collection in which those entity
 * persisters participate as elements/keys/etc.
 *
 * @param session The session to which this request is tied.
 * @param affectedQueryables The affected entity persisters.
 */
public BulkOperationCleanupAction(SessionImplementor session, Queryable[] affectedQueryables) {
  SessionFactoryImplementor factory = session.getFactory();
  LinkedHashSet<String> spacesList = new LinkedHashSet<String>();
  for ( Queryable persister : affectedQueryables ) {
    spacesList.addAll( Arrays.asList( (String[]) persister.getQuerySpaces() ) );
    if ( persister.hasCache() ) {
      entityCleanups.add( new EntityCleanup( persister.getCacheAccessStrategy() ) );
    }
    Set<String> roles = factory.getCollectionRolesByEntityParticipant( persister.getEntityName() );
    if ( roles != null ) {
      for ( String role : roles ) {
        CollectionPersister collectionPersister = factory.getCollectionPersister( role );
        if ( collectionPersister.hasCache() ) {
          collectionCleanups.add( new CollectionCleanup( collectionPersister.getCacheAccessStrategy() ) );
        }
      }
    }
  }
  this.affectedTableSpaces = spacesList.toArray( new String[ spacesList.size() ] );
}

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

/**
 * Constructs an action to cleanup "affected cache regions" based on the
 * affected entity persisters.  The affected regions are defined as the
 * region (if any) of the entity persisters themselves, plus the
 * collection regions for any collection in which those entity
 * persisters participate as elements/keys/etc.
 *
 * @param session The session to which this request is tied.
 * @param affectedQueryables The affected entity persisters.
 */
public BulkOperationCleanupAction(SessionImplementor session, Queryable[] affectedQueryables) {
  SessionFactoryImplementor factory = session.getFactory();
  LinkedHashSet<String> spacesList = new LinkedHashSet<String>();
  for ( Queryable persister : affectedQueryables ) {
    spacesList.addAll( Arrays.asList( (String[]) persister.getQuerySpaces() ) );
    if ( persister.hasCache() ) {
      entityCleanups.add( new EntityCleanup( persister.getCacheAccessStrategy() ) );
    }
    Set<String> roles = factory.getCollectionRolesByEntityParticipant( persister.getEntityName() );
    if ( roles != null ) {
      for ( String role : roles ) {
        CollectionPersister collectionPersister = factory.getCollectionPersister( role );
        if ( collectionPersister.hasCache() ) {
          collectionCleanups.add( new CollectionCleanup( collectionPersister.getCacheAccessStrategy() ) );
        }
      }
    }
  }
  this.affectedTableSpaces = spacesList.toArray( new String[ spacesList.size() ] );
}

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

entityCleanups.add( new EntityCleanup( persister.getCacheAccessStrategy() ) );
Set<String> roles = session.getFactory().getCollectionRolesByEntityParticipant( persister.getEntityName() );
if ( roles != null ) {
  for ( String role : roles ) {

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

entityCleanups.add( new EntityCleanup( persister.getCacheAccessStrategy() ) );
Set<String> roles = session.getFactory().getCollectionRolesByEntityParticipant( persister.getEntityName() );
if ( roles != null ) {
  for ( String role : roles ) {

代码示例来源:origin: stackoverflow.com

SessionFactoryImplementor factory = persister.getFactory();
Set<String> collectionRoles = factory.getCollectionRolesByEntityParticipant( persister.getEntityName() );
if ( collectionRoles == null || collectionRoles.isEmpty() ) {
  return;

相关文章

微信公众号

最新文章

更多

SessionFactoryImplementor类方法