A trait for domain classes to implement that should be treated as multi tenant
Fields inherited from class | Fields |
---|---|
class Entity |
ALL_DATA_SOURCES, DEFAULT_DATA_SOURCE, propertyConfigs |
Type Params | Return Type | Name and description |
---|---|---|
<D> |
static GormAllOperations |
eachTenant(groovy.lang.Closure callable) Execute the closure for each tenant |
<T> |
static T |
withTenant(java.io.Serializable tenantId, groovy.lang.Closure<T> callable) Execute the closure with the given tenantId |
<D> |
static GormAllOperations<D> |
withTenant(java.io.Serializable tenantId) Return the GormAllOperations for the given tenant id |
Methods inherited from class | Name |
---|---|
class Entity |
cloneGlobalConstraint, configureExisting, connection, connections, connections, datasource, getOrInitializePropertyConfig, getPropertyConfig, getPropertyConfigs, getSort, id, id, isVersioned, methodMissing, newProperty, property, property, property, property, propertyMissing, setSort, tenantId, version, version |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Execute the closure for each tenant
callable
- The closureExecute the closure with the given tenantId
tenantId
- The tenant idcallable
- The closureReturn the GormAllOperations for the given tenant id
tenantId
- The tenant id