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

org.hibernate.boot.model.source.spi.ToolingHint Maven / Gradle / Ivy

There is a newer version: 6.5.0.CR2
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * 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.boot.model.source.spi;

import org.hibernate.mapping.MetaAttribute;

/**
 * @author Steve Ebersole
 */
public class ToolingHint {
	private final String name;
	private final boolean inheritable;
	private final MetaAttribute metaAttribute;

	public ToolingHint(String name, boolean inheritable) {
		this.name = name;
		this.inheritable = inheritable;

		this.metaAttribute = new MetaAttribute( name );
	}

	public String getName() {
		return name;
	}

	public boolean isInheritable() {
		return inheritable;
	}

	public java.util.List getValues() {
		return metaAttribute.getValues();
	}

	public void addValue(String value) {
		metaAttribute.addValue( value );
	}

	public String getValue() {
		return metaAttribute.getValue();
	}

	public boolean isMultiValued() {
		return metaAttribute.isMultiValued();
	}

	@Override
	public String toString() {
		return "ToolingHint{" +
				"name='" + name + '\'' +
				", inheritable=" + inheritable +
				", values=" + metaAttribute.getValues() +
				'}';
	}

	public MetaAttribute asMetaAttribute() {
		return metaAttribute;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy