org.hibernate.metamodel.internal.MappedSuperclassTypeImpl 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.metamodel.internal;
import javax.persistence.metamodel.MappedSuperclassType;
import org.hibernate.mapping.MappedSuperclass;
/**
* @author Emmanuel Bernard
* @author Steve Ebersole
*/
public class MappedSuperclassTypeImpl extends AbstractIdentifiableType implements MappedSuperclassType {
public MappedSuperclassTypeImpl(
Class javaType,
MappedSuperclass mappedSuperclass,
AbstractIdentifiableType superType) {
super(
javaType,
javaType.getName(),
superType,
mappedSuperclass.getDeclaredIdentifierMapper() != null || ( superType != null && superType.hasIdClass() ),
mappedSuperclass.hasIdentifierProperty(),
mappedSuperclass.isVersioned()
);
}
@Override
public PersistenceType getPersistenceType() {
return PersistenceType.MAPPED_SUPERCLASS;
}
}