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

org.hibernate.metamodel.internal.MappedSuperclassTypeImpl 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.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;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy