All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.search.engine.metadata.impl.ContainedInMetadata Maven / Gradle / Ivy

There is a newer version: 5.11.12.Final
Show newest version
/*
 * Hibernate Search, full-text search for your domain model
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.search.engine.metadata.impl;

import java.util.Set;

import org.hibernate.annotations.common.reflection.XMember;
import org.hibernate.search.util.impl.CollectionHelper;
import org.hibernate.search.util.impl.ReflectionHelper;

/**
 * @author Hardy Ferentschik
 * @author Yoann Rodiere
 */
public class ContainedInMetadata {

	private final XMember containedInMember;
	private final Integer maxDepth;
	private final String prefix;
	private final Set includePaths;

	public ContainedInMetadata(XMember containedInMember, Integer maxDepth, String prefix, String[] includePaths) {
		this.containedInMember = containedInMember;
		ReflectionHelper.setAccessible( this.containedInMember );
		this.maxDepth = maxDepth;
		this.prefix = prefix;
		this.includePaths = CollectionHelper.asImmutableSet( includePaths );
	}

	public XMember getContainedInMember() {
		return containedInMember;
	}

	public Integer getMaxDepth() {
		return maxDepth;
	}

	public String getPrefix() {
		return prefix;
	}

	public Set getIncludePaths() {
		return includePaths;
	}

	@Override
	public String toString() {
		final StringBuilder sb = new StringBuilder( "ContainedInMetadata{" );
		sb.append( "containedInMember=" ).append( containedInMember );
		sb.append( ", maxDepth=" ).append( maxDepth );
		sb.append( '}' );
		return sb.toString();
	}
}






© 2015 - 2025 Weber Informatics LLC | Privacy Policy