@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 |
|
private boolean |
autoTimestamp |
|
private boolean |
autowire |
|
private java.util.List<java.lang.String> |
datasources |
Get the datasource names that this domain class works with. |
private java.lang.Object |
defaultSort |
|
protected java.util.Map<java.lang.String, P> |
propertyConfigs |
The configuration for each property |
private boolean |
stateless |
|
private boolean |
version |
|
Type | Name and description |
---|---|
boolean |
autoTimestamp
|
boolean |
autowire
|
java.util.List<java.lang.String> |
datasources Get 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<P> |
connection(java.lang.String name) Sets the datastore to use |
|
Entity<P> |
connections(java.lang.String[] names) Sets the connection to use |
|
Entity<P> |
connections(java.util.List<java.lang.String> names) Sets the connection to use |
|
Entity<P> |
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<P> |
property(java.lang.String name, groovy.lang.Closure propertyConfig) Configure a property |
|
Entity<P> |
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<P> |
setSort(java.lang.Object defaultSort) |
|
Entity<P> |
tenantId(java.lang.String tenantIdProperty) Sets the tenant id |
|
Entity<P> |
version(groovy.lang.Closure versionConfig) |
|
Entity<P> |
version(java.util.Map versionConfig) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Get the datasource names that this domain class works with.
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