public class GrailsDomainConfigurationUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROPERTIES_PROPERTY |
static java.lang.String |
PROPERTY_NAME |
| Constructor and Description |
|---|
GrailsDomainConfigurationUtil() |
| Modifier and Type | Method and Description |
|---|---|
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<java.lang.String,Constrained> |
evaluateConstraints(java.lang.Class<?> theClass)
Deprecated.
Use
ConstraintsEvaluator instead |
static java.util.Map<java.lang.String,Constrained> |
evaluateConstraints(java.lang.Class<?> theClass,
GrailsDomainClassProperty[] properties)
Deprecated.
Use
ConstraintsEvaluator instead |
static java.util.Map<java.lang.String,Constrained> |
evaluateConstraints(java.lang.Class<?> theClass,
GrailsDomainClassProperty[] properties,
java.util.Map<java.lang.String,java.lang.Object> defaultConstraints)
Deprecated.
Use
ConstraintsEvaluator instead |
static java.util.Map<java.lang.String,Constrained> |
evaluateConstraints(java.lang.Object instance)
Deprecated.
Use
ConstraintsEvaluator instead |
static java.util.Map<java.lang.String,Constrained> |
evaluateConstraints(java.lang.Object instance,
GrailsDomainClassProperty[] properties)
Deprecated.
Use
ConstraintsEvaluator instead |
static java.util.Map<java.lang.String,Constrained> |
evaluateConstraints(java.lang.Object instance,
GrailsDomainClassProperty[] properties,
java.util.Map<java.lang.String,java.lang.Object> defaultConstraints)
Deprecated.
Use
ConstraintsEvaluator instead |
static java.io.Serializable |
getAssociationIdentifier(java.lang.Object target,
java.lang.String propertyName,
GrailsDomainClass referencedDomainClass) |
static java.util.Map<?,?> |
getAssociationMap(java.lang.Class<?> domainClass)
Returns the association map for the specified domain class
|
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(java.lang.Class<?> propType) |
static boolean |
isBasicType(GrailsDomainClassProperty prop)
Establish whether it's a basic type.
|
static boolean |
isConfigurational(java.lang.String name) |
static boolean |
isNotConfigurational(java.beans.PropertyDescriptor descriptor)
Checks whether is property is configurational.
|
static boolean |
isNotConfigurational(java.lang.String name) |
public static final java.lang.String PROPERTY_NAME
public static final java.lang.String PROPERTIES_PROPERTY
public static java.io.Serializable getAssociationIdentifier(java.lang.Object target,
java.lang.String propertyName,
GrailsDomainClass referencedDomainClass)
public static void configureDomainClassRelationships(GrailsClass[] domainClasses, java.util.Map<?,?> domainMap)
domainClasses - The domain classes to configure relationships fordomainMap - The domain class mappublic static java.lang.String getMappingFileName(java.lang.String className)
className - The class name of the mapped filepublic static java.util.Map<?,?> getAssociationMap(java.lang.Class<?> domainClass)
domainClass - the domain classpublic static java.util.Map<?,?> getMappedByMap(java.lang.Class<?> domainClass)
domainClass - The domain classpublic static boolean isBasicType(GrailsDomainClassProperty prop)
prop - The domain class propertypublic static boolean isBasicType(java.lang.Class<?> propType)
public static boolean isNotConfigurational(java.beans.PropertyDescriptor descriptor)
descriptor - The descriptorpublic static boolean isConfigurational(java.lang.String name)
public static boolean isNotConfigurational(java.lang.String name)
@Deprecated public static java.util.Map<java.lang.String,Constrained> evaluateConstraints(java.lang.Object instance, GrailsDomainClassProperty[] properties, java.util.Map<java.lang.String,java.lang.Object> defaultConstraints)
ConstraintsEvaluator insteadinstance - The instance to evaluate constraints forproperties - The properties of the instancedefaultConstraints - A map that defines the default constraints@Deprecated public static java.util.Map<java.lang.String,Constrained> evaluateConstraints(java.lang.Class<?> theClass, GrailsDomainClassProperty[] properties, java.util.Map<java.lang.String,java.lang.Object> defaultConstraints)
ConstraintsEvaluator insteadtheClass - The domain class to evaluate constraints forproperties - The properties of the instancedefaultConstraints - A map that defines the default constraints@Deprecated public static java.util.Map<java.lang.String,Constrained> evaluateConstraints(java.lang.Object instance, GrailsDomainClassProperty[] properties)
ConstraintsEvaluator insteadinstance - The instance to evaluate constraints forproperties - The properties of the instance@Deprecated public static java.util.Map<java.lang.String,Constrained> evaluateConstraints(java.lang.Object instance)
ConstraintsEvaluator insteadinstance - The instance to evaluate constraints for@Deprecated public static java.util.Map<java.lang.String,Constrained> evaluateConstraints(java.lang.Class<?> theClass)
ConstraintsEvaluator insteadtheClass - The class to evaluate constraints for@Deprecated public static java.util.Map<java.lang.String,Constrained> evaluateConstraints(java.lang.Class<?> theClass, GrailsDomainClassProperty[] properties)
ConstraintsEvaluator insteadtheClass - The class to evaluate constraints forpublic static java.util.LinkedList<?> getSuperClassChain(java.lang.Class<?> theClass)