org.hibernate.metamodel.model.domain.spi.IdentifiableTypeDescriptor 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 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();
}
}