@groovy.transform.CompileStatic class GormApiResolver extends java.lang.Object
Instance-based resolver for GORM APIs and datastores.
| Constructor and description |
|---|
GormApiResolver(GormRegistry registry) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
Datastore |
findDatastore(java.lang.Class entity, java.lang.String qualifier) |
|
Datastore |
findDatastoreByType(java.lang.Class<? extends Datastore> datastoreType) |
|
PersistentEntity |
findEntity(java.lang.Class entity, java.lang.String qualifier) |
|
Datastore |
findServiceDatastore(java.lang.Class entity)Resolves the datastore for a tenant-management service lookup (e.g. the @CurrentTenant
TenantService). |
|
Datastore |
findSingleDatastore() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Resolves the datastore for a tenant-management service lookup (e.g. the @CurrentTenant
TenantService). Unlike findDatastore, this never
resolves the current tenant: it returns the entity's primary (DEFAULT) datastore — the tenant
MANAGER, where runtime schemas (e.g. addTenantForSchema) are registered — rather than a
per-tenant child datastore. Falls back to the single configured datastore when the entity is
not mapped to a specific datastore.