org.hibernate.search.engine.reporting.EntityIndexingFailureContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-search-engine Show documentation
Show all versions of hibernate-search-engine Show documentation
Hibernate Search engine, always required
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright Red Hat Inc. and Hibernate Authors
*/
package org.hibernate.search.engine.reporting;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.hibernate.search.engine.common.EntityReference;
/**
* Contextual information about a failure to index entities.
*/
public class EntityIndexingFailureContext extends FailureContext {
public static Builder builder() {
return new Builder();
}
private final List failingEntityReferences;
private EntityIndexingFailureContext(Builder builder) {
super( builder );
this.failingEntityReferences = builder.failingEntityReferences == null
? Collections.emptyList()
: Collections.unmodifiableList( builder.failingEntityReferences );
}
/**
* @return A list of references to entities that may not be indexed correctly as a result of the failure.
* Never {@code null}, but may be empty.
* Use {@link Object#toString()} to get a textual representation of each reference,
* or cast it to the mapper-specific {@code EntityReference} type.
* @deprecated Use {@link #failingEntityReferences()} instead.
*/
// The cast is safe because Object is a supertype of EntityReference and the list is unmodifiable.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Deprecated
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy