|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.commons.GrailsDomainConfigurationUtil
public class GrailsDomainConfigurationUtil
Utility methods used in configuring the Grails Hibernate integration
Field Summary | |
---|---|
static String |
PROPERTY_NAME
|
Constructor Summary | |
---|---|
GrailsDomainConfigurationUtil()
|
Method Summary | |
---|---|
static void |
configureDomainClassRelationships(GrailsClass[] domainClasses,
Map domainMap)
Configures the relationships between domain classes after they have been all loaded. |
static Map |
evaluateConstraints(Object instance)
Evaluates the constraints closure to build the list of constraints |
static Map |
evaluateConstraints(Object instance,
GrailsDomainClassProperty[] properties)
Evaluates the constraints closure to build the list of constraints |
static Map |
evaluateConstraints(Object instance,
GrailsDomainClassProperty[] properties,
Map<String,Object> defaultConstraints)
Evaluates the constraints closure to build the list of constraints |
static Serializable |
getAssociationIdentifier(Object target,
String propertyName,
GrailsDomainClass referencedDomainClass)
|
static Map |
getAssociationMap(Class domainClass)
Returns the association map for the specified domain class |
static Map |
getMappedByMap(Class domainClass)
Retrieves the mappedBy map for the specified class |
static String |
getMappingFileName(String className)
Returns the ORM frameworks mapping file name for the specified class name |
static LinkedList |
getSuperClassChain(Class theClass)
|
static boolean |
isBasicType(Class propType)
|
static boolean |
isBasicType(GrailsDomainClassProperty prop)
Establish whether its a basic type |
static boolean |
isNotConfigurational(PropertyDescriptor descriptor)
Checks whether is property is configurational |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_NAME
Constructor Detail |
---|
public GrailsDomainConfigurationUtil()
Method Detail |
---|
public static Serializable getAssociationIdentifier(Object target, String propertyName, GrailsDomainClass referencedDomainClass)
public static void configureDomainClassRelationships(GrailsClass[] domainClasses, Map domainMap)
domainClasses
- The domain classes to configure relationships fordomainMap
- The domain class mappublic static String getMappingFileName(String className)
className
- The class name of the mapped file
public static Map getAssociationMap(Class domainClass)
domainClass
- the domain class
public static Map getMappedByMap(Class domainClass)
domainClass
- The domain class
public static boolean isBasicType(GrailsDomainClassProperty prop)
prop
- The domain class property
public static boolean isBasicType(Class propType)
public static boolean isNotConfigurational(PropertyDescriptor descriptor)
descriptor
- The descriptor
public static Map evaluateConstraints(Object instance, GrailsDomainClassProperty[] properties, Map<String,Object> defaultConstraints)
instance
- The instance to evaluate constraints forproperties
- The properties of the instancedefaultConstraints
- A map that defines the default constraints
public static Map evaluateConstraints(Object instance, GrailsDomainClassProperty[] properties)
instance
- The instance to evaluate constraints forproperties
- The properties of the instance
public static Map evaluateConstraints(Object instance)
instance
- The instance to evaluate constraints for
public static LinkedList getSuperClassChain(Class theClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |