org.hibernate.metamodel.model.domain.internal.MapAttributeImpl 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
JPMS Module-Info's for a few of the Jakarta Libraries just until they add them in themselves
/*
* 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 http://www.gnu.org/licenses/lgpl-2.1.html
*/
package org.hibernate.metamodel.model.domain.internal;
import java.util.Map;
import org.hibernate.metamodel.model.domain.spi.MapPersistentAttribute;
import org.hibernate.metamodel.model.domain.spi.SimpleTypeDescriptor;
/**
* @author Steve Ebersole
*/
class MapAttributeImpl extends AbstractPluralAttribute, V>
implements MapPersistentAttribute {
private final SimpleTypeDescriptor keyType;
MapAttributeImpl(PluralAttributeBuilder, V, K> xceBuilder) {
super( xceBuilder );
this.keyType = xceBuilder.getKeyType();
}
@Override
public CollectionType getCollectionType() {
return CollectionType.MAP;
}
@Override
public Class getKeyJavaType() {
return keyType.getJavaType();
}
@Override
public SimpleTypeDescriptor getKeyType() {
return keyType;
}
@Override
public SimpleTypeDescriptor getKeyGraphType() {
return getKeyType();
}
}