Search in sources :

Example 1 with PojoModelPath

use of org.hibernate.search.mapper.pojo.model.path.PojoModelPath in project hibernate-search by hibernate.

the class AbstractIdentityMappingCollectorNode method failureCollector.

public final ContextualFailureCollector failureCollector() {
    BoundPojoModelPath modelPath = getModelPath();
    ContextualFailureCollector failureCollector = mappingHelper.failureCollector().withContext(PojoEventContexts.fromType(modelPath.getRootType().rawType()));
    PojoModelPath unboundPath = modelPath.toUnboundPath();
    if (unboundPath != null) {
        failureCollector = failureCollector.withContext(PojoEventContexts.fromPath(modelPath.toUnboundPath()));
    }
    return failureCollector;
}
Also used : PojoModelPath(org.hibernate.search.mapper.pojo.model.path.PojoModelPath) BoundPojoModelPath(org.hibernate.search.mapper.pojo.model.path.impl.BoundPojoModelPath) ContextualFailureCollector(org.hibernate.search.engine.reporting.spi.ContextualFailureCollector) BoundPojoModelPath(org.hibernate.search.mapper.pojo.model.path.impl.BoundPojoModelPath)

Example 2 with PojoModelPath

use of org.hibernate.search.mapper.pojo.model.path.PojoModelPath in project hibernate-search by hibernate.

the class AbstractPojoProcessorNodeBuilder method failureCollector.

public final ContextualFailureCollector failureCollector() {
    BoundPojoModelPath modelPath = getModelPath();
    ContextualFailureCollector failureCollector = mappingHelper.failureCollector().withContext(PojoEventContexts.fromType(modelPath.getRootType().rawType()));
    PojoModelPath unboundPath = modelPath.toUnboundPath();
    if (unboundPath != null) {
        failureCollector = failureCollector.withContext(PojoEventContexts.fromPath(modelPath.toUnboundPath()));
    }
    return failureCollector;
}
Also used : PojoModelPath(org.hibernate.search.mapper.pojo.model.path.PojoModelPath) BoundPojoModelPath(org.hibernate.search.mapper.pojo.model.path.impl.BoundPojoModelPath) ContextualFailureCollector(org.hibernate.search.engine.reporting.spi.ContextualFailureCollector) BoundPojoModelPath(org.hibernate.search.mapper.pojo.model.path.impl.BoundPojoModelPath)

Aggregations

ContextualFailureCollector (org.hibernate.search.engine.reporting.spi.ContextualFailureCollector)2 PojoModelPath (org.hibernate.search.mapper.pojo.model.path.PojoModelPath)2 BoundPojoModelPath (org.hibernate.search.mapper.pojo.model.path.impl.BoundPojoModelPath)2