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

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

There is a newer version: 7.0.0.Alpha1
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 java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Describes the nature of the collection itself as declared by the metadata.
 *
 * @author Steve Ebersole
 */
public enum PluralAttributeNature {
	BAG( Collection.class, false ),
	ID_BAG( Collection.class, false ),
	SET( Set.class, false ),
	LIST( List.class, true ),
	ARRAY( Object[].class, true ),
	MAP( Map.class, true );

	private final boolean indexed;
	private final Class reportedJavaType;

	PluralAttributeNature(Class reportedJavaType, boolean indexed) {
		this.reportedJavaType = reportedJavaType;
		this.indexed = indexed;
	}

	public Class reportedJavaType() {
		return reportedJavaType;
	}

	public boolean isIndexed() {
		return indexed;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy