@groovy.transform.CompileStatic class ConnectionSourceNameResolver extends java.lang.Object
Resolves connection source names from a datastore.
| Constructor and description |
|---|
ConnectionSourceNameResolver() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static boolean |
isConnectionSourceName(java.lang.Object datastore, java.lang.String name)Whether the given name is one of the datastore's configured connection sources. |
|
static java.util.List<java.lang.String> |
resolveConnectionSourceNames(java.lang.Object datastore)Resolve all connection source names from a datastore. |
|
static java.lang.String |
resolveDefaultConnectionSourceName(java.lang.Object datastore)Resolve the default connection source name from a datastore. |
| 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) |
Whether the given name is one of the datastore's configured connection sources.
This answers "is this qualifier a datasource name or a tenant id?" without probing
getDatastoreForConnection, which throws for an unknown name and would put stack-trace
construction on the per-operation path of every discriminator-mode query.
datastore - The datastore to inspectname - The candidate connection source nametrue if the datastore declares a connection source with that nameResolve all connection source names from a datastore. Returns a list of connection source names, or defaults to [ConnectionSource.DEFAULT] if none found.
datastore - The datastore to resolve names fromResolve the default connection source name from a datastore. Returns the default connection source name, or ConnectionSource.DEFAULT if none found.
datastore - The datastore to resolve the name from