@java.lang.SuppressWarnings({"rawtypes", "unchecked"}) public class GormMappingConfigurationStrategy extends java.lang.Object
This implementation of the MappingConfigurationStrategy interface will interpret GORM-style syntax for defining entities and associations.
Example in Groovy code:
class Author {
String name
static hasMany = [books:Book]
}
class Book {
String title
static belongsTo = [author:Author]
}
Constructor and description |
---|
GormMappingConfigurationStrategy
(MappingFactory propertyFactory) |
Type | Name and description |
---|---|
protected java.util.Map |
getAllAssociationMap(ClassPropertyFetcher cpf) Retrieves the association map |
protected java.util.Map |
getAssociationMap(ClassPropertyFetcher cpf) Retrieves the association map |
IdentityMapping |
getDefaultIdentityMapping(ClassMapping classMapping) |
PersistentProperty |
getIdentity(java.lang.Class javaClass, MappingContext context) @see org.grails.datastore.mapping.model.MappingConfigurationStrategy#getIdentity(Class, org.grails.datastore.mapping.model.MappingContext) |
IdentityMapping |
getIdentityMapping(ClassMapping classMapping) Obtains the identity mapping for the specified class mapping |
java.util.Set |
getOwningEntities(java.lang.Class javaClass, MappingContext context) |
java.util.List<PersistentProperty> |
getPersistentProperties(java.lang.Class javaClass, MappingContext context) |
java.util.List<PersistentProperty> |
getPersistentProperties(java.lang.Class javaClass, MappingContext context, ClassMapping classMapping) |
java.util.List<PersistentProperty> |
getPersistentProperties(PersistentEntity entity, MappingContext context, ClassMapping classMapping) |
boolean |
isPersistentEntity(java.lang.Class clazz) Tests whether an class is a persistent entity |
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() |
Retrieves the association map
cpf
- The ClassPropertyFetcher instanceRetrieves the association map
cpf
- The ClassPropertyFetcher instance
Obtains the identity mapping for the specified class mapping
classMapping
- The class mappingTests whether an class is a persistent entity Based on the same method in Grails core within the DomainClassArtefactHandler class
clazz
- The java class