@groovy.transform.CompileStatic class GormEnhancerRegistry extends java.lang.Object
Singleton registry for managing GormEnhancer's static state. This class holds thread-local and shared state that was previously defined as static fields in GormEnhancer, allowing for better isolation and testability.
| Type | Name and description |
|---|---|
Datastore |
preferredDatastore |
int |
resolvingDatastoreDepth |
| Constructor and description |
|---|
GormEnhancerRegistry() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
clearPreferredDatastore()Clear the preferred datastore for the current thread |
|
void |
clearResolvingDatastoreDepth()Clear the resolving datastore depth for the current thread |
|
static GormEnhancerRegistry |
getInstance()
|
|
Datastore |
getPreferredDatastore()Get the preferred datastore for the current thread |
|
int |
getResolvingDatastoreDepth()Get the resolving datastore depth for the current thread |
|
void |
setPreferredDatastore(Datastore datastore)Set the preferred datastore for the current thread |
|
void |
setResolvingDatastoreDepth(int depth)Set the resolving datastore depth for the current thread |
| 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) |
Clear the preferred datastore for the current thread
Clear the resolving datastore depth for the current thread
Get the preferred datastore for the current thread
Get the resolving datastore depth for the current thread
Set the preferred datastore for the current thread
datastore - The datastoreSet the resolving datastore depth for the current thread
depth - The depth