Example usage for org.hibernate.metamodel.model.domain NavigableRole getNavigableName

List of usage examples for org.hibernate.metamodel.model.domain NavigableRole getNavigableName

Introduction

In this page you can find the example usage for org.hibernate.metamodel.model.domain NavigableRole getNavigableName.

Prototype

public String getNavigableName() 

Source Link

Usage

From source file:org.infinispan.hibernate.cache.v53.impl.DomainDataRegionImpl.java

License:LGPL

private void prepareForVersionedEntries(CacheMode cacheMode) {
    if (strategy != null) {
        assert strategy == Strategy.VERSIONED_ENTRIES;
        return;/* w  w  w . j  a  v  a 2  s  .  c  o m*/
    }

    prepareCommon(cacheMode);
    filter = VersionedEntry.EXCLUDE_EMPTY_VERSIONED_ENTRY;

    for (EntityDataCachingConfig entityConfig : config.getEntityCaching()) {
        if (entityConfig.isVersioned()) {
            for (NavigableRole role : entityConfig.getCachedTypes()) {
                comparatorsByType.put(role.getNavigableName(), entityConfig.getVersionComparatorAccess().get());
            }
        }
    }
    for (CollectionDataCachingConfig collectionConfig : config.getCollectionCaching()) {
        if (collectionConfig.isVersioned()) {
            comparatorsByType.put(collectionConfig.getNavigableRole().getNavigableName(),
                    collectionConfig.getOwnerVersionComparator());
        }
    }

    strategy = Strategy.VERSIONED_ENTRIES;
}