@groovy.transform.CompileStatic @groovy.transform.builder.Builder(builderStrategy: SimpleStrategy, prefix: ) class Entity<P extends Property> extends java.lang.Object
Base class for classes returned from ClassMapping.getMappedForm
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
ALL_DATA_SOURCES |
|
static java.lang.String |
DEFAULT_DATA_SOURCE |
|
protected java.util.Map<java.lang.String, P> |
propertyConfigs |
The configuration for each property |
| Type | Name and description |
|---|---|
boolean |
autoTimestamp
|
boolean |
autowire
|
java.util.List<java.lang.String> |
datasourcesGet the datasource names that this domain class works with. |
java.lang.Object |
defaultSort
|
java.lang.Object |
sort |
boolean |
stateless
|
boolean |
version
|
| Constructor and description |
|---|
Entity
() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected P |
cloneGlobalConstraint() |
<T extends Entity> |
static T |
configureExisting(T mapping, groovy.lang.Closure config)Configures an existing Mapping instance |
|
Entity |
connection(java.lang.String name)Sets the datastore to use |
|
Entity |
connections(java.lang.String[] names)Sets the connection to use |
|
Entity |
connections(java.util.List<java.lang.String> names)Sets the connection to use |
|
Entity |
datasource(java.lang.String name)Sets the datastore to use |
|
protected P |
getOrInitializePropertyConfig(java.lang.String name) |
|
P |
getPropertyConfig(java.lang.String name)Get a property config |
|
java.util.Map<java.lang.String, P> |
getPropertyConfigs()
|
|
java.lang.Object |
getSort() |
|
Entity<P> |
id(java.util.Map identityConfig)Define the identity config |
|
Entity<P> |
id(groovy.lang.Closure identityConfig)Define the identity config |
|
boolean |
isVersioned()
|
|
java.lang.Object |
methodMissing(java.lang.String name, java.lang.Object args) |
|
protected P |
newProperty() |
|
Entity |
property(java.lang.String name, groovy.lang.Closure propertyConfig)Configure a property |
|
Entity |
property(java.lang.String name, java.util.Map propertyConfig)Configure a property |
|
P |
property(groovy.lang.Closure propertyConfig)Configure a new property |
|
P |
property(java.util.Map propertyConfig)Configure a new property |
|
java.lang.Object |
propertyMissing(java.lang.String name, java.lang.Object val) |
|
Entity |
setSort(java.lang.Object defaultSort) |
|
Entity |
tenantId(java.lang.String tenantIdProperty)Sets the tenant id |
|
Entity |
version(groovy.lang.Closure versionConfig) |
|
Entity |
version(java.util.Map versionConfig) |
| Methods inherited from class | Name |
|---|---|
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() |
The configuration for each property
Get the datasource names that this domain class works with.
Configures an existing Mapping instance
config - The configurationSets the datastore to use @return
Sets the connection to use @return
Sets the connection to use @return
Sets the datastore to use @return
Get a property config @return
name - The name of the property
Define the identity config
identityConfig - The id configDefine the identity config
identityConfig - The id config
Configure a property
name - The name of the propertypropertyConfig - The property configConfigure a property
name - The name of the propertypropertyConfig - The property configConfigure a new property
name - The name of the propertypropertyConfig - The property configConfigure a new property
name - The name of the propertypropertyConfig - The property configSets the tenant id
tenantIdProperty - The tenant id property
Configures the name of the version column
{ version 'foo' } isVersioned - True if a version property should be configured
Configures the name of the version column
{ version 'foo' } isVersioned - True if a version property should be configured
Groovy Documentation