-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move all class name constants of the hibernate-orm extension to a sin…
…gle class So that we can test them easily.
- Loading branch information
Showing
7 changed files
with
134 additions
and
176 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
...ibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/ClassNames.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package io.quarkus.hibernate.orm.deployment; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
import org.jboss.jandex.DotName; | ||
|
||
public class ClassNames { | ||
|
||
static final Set<DotName> CREATED_CONSTANTS = new HashSet<>(); | ||
|
||
private ClassNames() { | ||
} | ||
|
||
private static DotName createConstant(String fqcn) { | ||
DotName result = DotName.createSimple(fqcn); | ||
CREATED_CONSTANTS.add(result); | ||
return result; | ||
} | ||
|
||
public static final DotName ENUM = createConstant("java.lang.Enum"); | ||
|
||
public static final DotName TENANT_CONNECTION_RESOLVER = createConstant( | ||
"io.quarkus.hibernate.orm.runtime.tenant.TenantConnectionResolver"); | ||
public static final DotName TENANT_RESOLVER = createConstant("io.quarkus.hibernate.orm.runtime.tenant.TenantResolver"); | ||
|
||
public static final DotName STATIC_METAMODEL = createConstant("javax.persistence.metamodel.StaticMetamodel"); | ||
|
||
public static final DotName QUARKUS_PERSISTENCE_UNIT = createConstant("io.quarkus.hibernate.orm.PersistenceUnit"); | ||
public static final DotName QUARKUS_PERSISTENCE_UNIT_REPEATABLE_CONTAINER = createConstant( | ||
"io.quarkus.hibernate.orm.PersistenceUnit$List"); | ||
public static final DotName JPA_PERSISTENCE_UNIT = createConstant("javax.persistence.PersistenceUnit"); | ||
public static final DotName JPA_PERSISTENCE_CONTEXT = createConstant("javax.persistence.PersistenceContext"); | ||
|
||
public static final DotName JPA_ENTITY = createConstant("javax.persistence.Entity"); | ||
public static final DotName MAPPED_SUPERCLASS = createConstant("javax.persistence.MappedSuperclass"); | ||
public static final DotName EMBEDDABLE = createConstant("javax.persistence.Embeddable"); | ||
public static final DotName EMBEDDED = createConstant("javax.persistence.Embedded"); | ||
public static final DotName ELEMENT_COLLECTION = createConstant("javax.persistence.ElementCollection"); | ||
public static final DotName PROXY = createConstant("org.hibernate.annotations.Proxy"); | ||
public static final DotName HIBERNATE_PROXY = createConstant("org.hibernate.proxy.HibernateProxy"); | ||
public static final DotName TYPE = createConstant("org.hibernate.annotations.Type"); | ||
public static final DotName TYPE_DEFINITION = createConstant("org.hibernate.annotations.TypeDef"); | ||
public static final DotName TYPE_DEFINITIONS = createConstant("org.hibernate.annotations.TypeDefs"); | ||
|
||
public static final DotName ENTITY_MANAGER_FACTORY = createConstant("javax.persistence.EntityManagerFactory"); | ||
public static final DotName SESSION_FACTORY = createConstant("org.hibernate.SessionFactory"); | ||
public static final DotName ENTITY_MANAGER = createConstant("javax.persistence.EntityManager"); | ||
public static final DotName SESSION = createConstant("org.hibernate.Session"); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.