public class ClassImportIntegrator extends Object implements org.hibernate.integrator.spi.Integrator
ClassImportIntegrator
implements the Hibernate Integrator
contract
and allows you to provide a List
of classes to be imported using their simple name.
For instance, you could use a DTO simple class name, instead of the fully-qualified name
when building a constructor expression in a JPQL query.
For more details about how to use it, check out this article on vladmihalcea.com.Constructor and Description |
---|
ClassImportIntegrator(List<? extends Class> classImportList)
Builds a new integrator that can register the provided classes.
|
Modifier and Type | Method and Description |
---|---|
void |
disintegrate(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory,
org.hibernate.service.spi.SessionFactoryServiceRegistry serviceRegistry) |
void |
integrate(org.hibernate.boot.Metadata metadata,
org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory,
org.hibernate.service.spi.SessionFactoryServiceRegistry serviceRegistry)
Register the provided classes by their simple name.
|
public void integrate(org.hibernate.boot.Metadata metadata, org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory, org.hibernate.service.spi.SessionFactoryServiceRegistry serviceRegistry)
integrate
in interface org.hibernate.integrator.spi.Integrator
metadata
- metadatasessionFactory
- Hibernate session factoryserviceRegistry
- Hibernate service registrypublic void disintegrate(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory, org.hibernate.service.spi.SessionFactoryServiceRegistry serviceRegistry)
disintegrate
in interface org.hibernate.integrator.spi.Integrator
Copyright © 2020. All rights reserved.