|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.datastore.mapping.config.GormMappingConfigurationStrategy
public class GormMappingConfigurationStrategy
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 Summary | |
|---|---|
GormMappingConfigurationStrategy(MappingFactory propertyFactory)
|
|
| Method Summary | |
|---|---|
protected Map |
getAssociationMap(ClassPropertyFetcher cpf)
Retrieves the association map |
IdentityMapping |
getDefaultIdentityMapping(ClassMapping classMapping)
Obtains the default manner in which identifiers are mapped. |
PersistentProperty |
getIdentity(Class javaClass,
MappingContext context)
Obtains the identity of a persistent entity |
Set |
getOwningEntities(Class javaClass,
MappingContext context)
Returns a set of entities that "own" the given entity. |
List<PersistentProperty> |
getPersistentProperties(Class javaClass,
MappingContext context)
|
List<PersistentProperty> |
getPersistentProperties(Class javaClass,
MappingContext context,
ClassMapping classMapping)
Obtains a List of PersistentProperty instances for the given Mapped class |
boolean |
isPersistentEntity(Class clazz)
Tests whether an class is a persistent entity Based on the same method in Grails core within the DomainClassArtefactHandler class |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GormMappingConfigurationStrategy(MappingFactory propertyFactory)
| Method Detail |
|---|
public boolean isPersistentEntity(Class clazz)
isPersistentEntity in interface MappingConfigurationStrategyclazz - The java class
public List<PersistentProperty> getPersistentProperties(Class javaClass,
MappingContext context)
getPersistentProperties in interface MappingConfigurationStrategyMappingConfigurationStrategy.getPersistentProperties(Class, MappingContext, ClassMapping)
public List<PersistentProperty> getPersistentProperties(Class javaClass,
MappingContext context,
ClassMapping classMapping)
MappingConfigurationStrategy
getPersistentProperties in interface MappingConfigurationStrategyjavaClass - The Java classcontext - The MappingContext instanceclassMapping - The mapping for this class
protected Map getAssociationMap(ClassPropertyFetcher cpf)
cpf - The ClassPropertyFetcher instance
public Set getOwningEntities(Class javaClass,
MappingContext context)
MappingConfigurationStrategy
getOwningEntities in interface MappingConfigurationStrategyjavaClass - The Java classcontext - The MappingContext
public PersistentProperty getIdentity(Class javaClass,
MappingContext context)
MappingConfigurationStrategy
getIdentity in interface MappingConfigurationStrategyjavaClass - The Java classcontext - The MappingContext
MappingConfigurationStrategy.getIdentity(Class, org.springframework.datastore.mapping.MappingContext)public IdentityMapping getDefaultIdentityMapping(ClassMapping classMapping)
MappingConfigurationStrategy
getDefaultIdentityMapping in interface MappingConfigurationStrategyclassMapping - The ClassMapping instance
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||