org.hibernate.boot.model.source.spi.PluralAttributeMapKeySource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
Hibernate's core ORM functionality
/*
* 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;
/**
* Describes source information about the key of a persistent map. At high
* level this broken down further into 2 categories:
* - {@link PluralAttributeMapKeySourceEntityAttribute}
* -
*
* - {@link PluralAttributeMapKeySourceBasic}
* - {@link PluralAttributeMapKeySourceEmbedded}
* - {@link PluralAttributeMapKeyManyToManySource}
*
*
*
*
* {@link PluralAttributeMapKeySourceEntityAttribute} is only relevant from
* annotations when using {@link javax.persistence.MapKey}.
*
* @author Steve Ebersole
*/
public interface PluralAttributeMapKeySource extends PluralAttributeIndexSource {
public static enum Nature {
BASIC,
EMBEDDED,
MANY_TO_MANY,
ANY
}
public Nature getMapKeyNature();
/**
* Is this plural attribute index source for an attribute of the referenced entity
* (relevant only for one-to-many and many-to-many associations)?
*
* If this method returns {@code true}, then this object can safely
* be cast to {@link PluralAttributeMapKeySourceEntityAttribute}.
*
* @return true, if this plural attribute index source for an attribute of the referenced
* entity; false, otherwise.
*/
public boolean isReferencedEntityAttribute();
}