@SuppressWarnings({"rawtypes", "unchecked"}) public abstract class AbstractGormMappingFactory<R extends Entity, T extends Property> extends MappingFactory
Abstract GORM implementation that uses the GORM MappingConfigurationBuilder to configure entity mappings.
| Modifiers | Name | Description |
|---|---|---|
protected Closure |
defaultConstraints |
|
protected Map<PersistentEntity, R> |
entityToMapping |
|
protected Map<PersistentEntity, Map<String, T>> |
entityToPropertyMap |
|
protected boolean |
versionByDefault |
| Fields inherited from class | Fields |
|---|---|
class MappingFactory |
IDENTITY_PROPERTY, SIMPLE_TYPES |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected MappingConfigurationBuilder |
createConfigurationBuilder(PersistentEntity entity, R family) |
|
public IdentityMapping |
createIdentityMapping(ClassMapping classMapping) |
|
public R |
createMappedForm(PersistentEntity entity) |
|
public T |
createMappedForm(PersistentProperty mpp) |
|
protected void |
evaluateWithContext(MappingConfigurationBuilder builder, Closure value) |
|
protected abstract Class<R> |
getEntityMappedFormType() |
|
protected IdentityMapping |
getIdentityMappedForm(ClassMapping classMapping, T property) |
|
protected abstract Class<T> |
getPropertyMappedFormType() |
|
public boolean |
isTenantId(PersistentEntity entity, MappingContext context, PropertyDescriptor descriptor) |
|
public void |
setContextObject(Object contextObject)
|
|
public void |
setDefaultConstraints(Closure defaultConstraints) |
|
public void |
setDefaultMapping(Closure defaultMapping) |
|
public void |
setVersionByDefault(boolean versionByDefault)Whether the version entities using optimistic locking by default |
contextObject - Context object to be passed to mapping blocksWhether the version entities using optimistic locking by default
versionByDefault - True if objects should be versioned by default