|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.commons.GrailsDomainConfigurationUtil
public class GrailsDomainConfigurationUtil extends java.lang.Object
Utility methods used in configuring the Grails Hibernate integration.
Field Summary | |
---|---|
static java.lang.String |
PROPERTIES_PROPERTY
|
static java.lang.String |
PROPERTY_NAME
|
Method Summary | |
---|---|
static void
|
configureDomainClassRelationships(GrailsClass[] domainClasses, java.util.Map domainMap)
Configures the relationships between domain classes after they have been all loaded. |
static java.util.Map
|
evaluateConstraints(java.lang.Object instance, GrailsDomainClassProperty[] properties, java.util.Map defaultConstraints)
Evaluates the constraints closure to build the list of constraints |
static java.util.Map
|
evaluateConstraints(java.lang.Class theClass, GrailsDomainClassProperty[] properties, java.util.Map defaultConstraints)
|
static java.util.Map
|
evaluateConstraints(java.lang.Object instance, GrailsDomainClassProperty[] properties)
|
static java.util.Map
|
evaluateConstraints(java.lang.Object instance)
|
static java.util.Map
|
evaluateConstraints(java.lang.Class theClass)
|
static java.util.Map
|
evaluateConstraints(java.lang.Class theClass, GrailsDomainClassProperty[] properties)
|
static java.io.Serializable
|
getAssociationIdentifier(java.lang.Object target, java.lang.String propertyName, GrailsDomainClass referencedDomainClass)
|
static java.util.Map
|
getAssociationMap(java.lang.Class domainClass)
|
static java.util.Map
|
getMappedByMap(java.lang.Class domainClass)
Retrieves the mappedBy map for the specified class. |
static java.lang.String
|
getMappingFileName(java.lang.String className)
Returns the ORM framework's mapping file name for the specified class name. |
static java.util.LinkedList
|
getSuperClassChain(java.lang.Class theClass)
|
static boolean
|
isBasicType(GrailsDomainClassProperty prop)
Establish whether it's a basic type. |
static boolean
|
isBasicType(java.lang.Class propType)
|
static boolean
|
isConfigurational(java.lang.String name)
|
static boolean
|
isNotConfigurational(java.beans.PropertyDescriptor descriptor)
|
static boolean
|
isNotConfigurational(java.lang.String name)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), 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() |
Field Detail |
---|
public static final java.lang.String PROPERTIES_PROPERTY
public static final java.lang.String PROPERTY_NAME
Method Detail |
---|
public static void configureDomainClassRelationships(GrailsClass[] domainClasses, java.util.Map domainMap)
domainClasses
- The domain classes to configure relationships fordomainMap
- The domain class map
* public static java.util.Map evaluateConstraints(java.lang.Object instance, GrailsDomainClassProperty[] properties, java.util.Map defaultConstraints)
instance
- The instance to evaluate constraints forproperties
- The properties of the instancedefaultConstraints
- A map that defines the default constraints
* @param instance The instance to evaluate constraints for public static java.util.Map evaluateConstraints(java.lang.Class theClass, GrailsDomainClassProperty[] properties, java.util.Map defaultConstraints)
* @param instance The instance to evaluate constraints for public static java.util.Map evaluateConstraints(java.lang.Object instance, GrailsDomainClassProperty[] properties)
* @return A Map of constraints public static java.util.Map evaluateConstraints(java.lang.Object instance)
* @return A Map of constraints public static java.util.Map evaluateConstraints(java.lang.Class theClass)
while (clazz != Object.class && clazz != null) { public static java.util.Map evaluateConstraints(java.lang.Class theClass, GrailsDomainClassProperty[] properties)
public static java.io.Serializable getAssociationIdentifier(java.lang.Object target, java.lang.String propertyName, GrailsDomainClass referencedDomainClass)
public static java.util.Map getAssociationMap(java.lang.Class domainClass)
public static java.util.Map getMappedByMap(java.lang.Class domainClass)
domainClass
- The domain class
public static java.lang.String getMappingFileName(java.lang.String className)
className
- The class name of the mapped file
public static java.util.LinkedList getSuperClassChain(java.lang.Class theClass)
public static boolean isBasicType(GrailsDomainClassProperty prop)
prop
- The domain class property
public static boolean isBasicType(java.lang.Class propType)
public static boolean isConfigurational(java.lang.String name)
public static boolean isNotConfigurational(java.beans.PropertyDescriptor descriptor)
public static boolean isNotConfigurational(java.lang.String name)
Groovy Documentation