org.codehaus.groovy.grails.web.converters
Class ConverterUtil
java.lang.Object
org.codehaus.groovy.grails.web.converters.ConverterUtil
public class ConverterUtil
- extends Object
A utility class for creating and dealing with Converter objects
- Since:
- 0.6
- Author:
- Siegfried Puchbauer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConverterUtil
protected ConverterUtil()
createBeanWrapper
public static BeanWrapper createBeanWrapper(Object o)
extractIdValue
protected Object extractIdValue(Object domainObject,
GrailsDomainClassProperty idProperty)
- Reads the value of the primary identifier property of a domain class instance
- Parameters:
domainObject
- The domain class instanceidProperty
- The GrailsDomainClassProperty
- Returns:
- The primary identifier of the specified domain object
createConverter
public static Object createConverter(Class<?> converterClass,
Object target)
throws ConverterException
- Throws:
ConverterException
createConverter
public static Object createConverter(Class<?> converterClass,
Object target,
ApplicationContext applicationContext)
throws ConverterException
- Throws:
ConverterException
getDomainClass
public static GrailsDomainClass getDomainClass(String name)
getInstance
protected static ConverterUtil getInstance()
isConverterClass
public static boolean isConverterClass(Class<?> clazz)
isDomainClass
public static boolean isDomainClass(Class<?> clazz)
getDomainClassNames
public static Set<String> getDomainClassNames()
setGrailsApplication
public static void setGrailsApplication(GrailsApplication grailsApp)
invokeOriginalAsTypeMethod
public static Object invokeOriginalAsTypeMethod(Object delegate,
Class clazz)
resolveConverterException
public static ConverterException resolveConverterException(Throwable t)
resolveCircularReferenceBehaviour
public static Converter.CircularReferenceBehaviour resolveCircularReferenceBehaviour(String str)
Copyright (c) 2005-2009 The Grails project