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

org.hibernate.metamodel.model.domain.spi.IdentifiableTypeDescriptor 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 http://www.gnu.org/licenses/lgpl-2.1.html
 */
package org.hibernate.metamodel.model.domain.spi;

import java.util.Set;
import java.util.function.Consumer;
import javax.persistence.metamodel.IdentifiableType;

import org.hibernate.metamodel.model.domain.IdentifiableDomainType;

/**
 * Hibernate extension to the JPA {@link IdentifiableType} descriptor
 *
 * @author Steve Ebersole
 */
public interface IdentifiableTypeDescriptor extends IdentifiableDomainType, ManagedTypeDescriptor {
	boolean hasIdClass();

	SingularPersistentAttribute locateIdAttribute();

	void collectIdClassAttributes(Set> attributes);

	void visitIdClassAttributes(Consumer> attributeConsumer);

	interface InFlightAccess extends ManagedTypeDescriptor.InFlightAccess {
		void applyIdAttribute(SingularPersistentAttribute idAttribute);
		void applyIdClassAttributes(Set> idClassAttributes);
		void applyVersionAttribute(SingularPersistentAttribute versionAttribute);
	}

	@Override
	InFlightAccess getInFlightAccess();

	@Override
	SimpleTypeDescriptor getIdType();

	@Override
	 SingularPersistentAttribute getDeclaredId(Class type);

	@Override
	 SingularPersistentAttribute getId(Class type);

	SingularPersistentAttribute locateVersionAttribute();

	@Override
	 SingularPersistentAttribute getVersion(Class type);

	@Override
	 SingularPersistentAttribute getDeclaredVersion(Class type);

	@Override
	IdentifiableTypeDescriptor getSuperType();

	@Override
	default IdentifiableTypeDescriptor getSupertype() {
		return getSuperType();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy