Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD

## org.codehaus.groovy.grails.web.binding
[Groovy] Class GormAwareDataBinder

    java.lang.Object
      org.grails.databinding.SimpleDataBinder
          org.codehaus.groovy.grails.web.binding.GormAwareDataBinder

    @groovy.transform.CompileStatic
    class GormAwareDataBinder
    extends SimpleDataBinder

Field Summary
`protected static java.util.Map` | `CLASS_TO_BINDING_INCLUDE_LIST`
`protected GrailsApplication` | `grailsApplication`

Fields inherited from class SimpleDataBinder
BASIC_TYPES, conversionHelpers, formattedValueConvertersionHelpers, structuredEditors

Property Summary
`boolean` | `convertEmptyStringsToNull`
`boolean` | `trimStrings`

Constructor Summary
`GormAwareDataBinder(GrailsApplication grailsApplication)`

Method Summary
`protected java.lang.Object` | `addElementToCollection(java.lang.Object obj, java.lang.String propName, GrailsDomainClassProperty property, java.lang.Object propertyValue, boolean clearCollection)`
`protected java.lang.Object` | `addElementToCollectionAt(java.lang.Object obj, java.lang.String propertyName, java.util.Collection collection, java.lang.Object index, java.lang.Object val)`
`void` | `bind(java.lang.Object obj, DataBindingSource source)` @param obj the object to perform data binding on
`void` | `bind(java.lang.Object obj, DataBindingSource source, DataBindingListener listener)` @param obj the object to perform data binding on
`void` | `bind(java.lang.Object obj, groovy.util.slurpersupport.GPathResult gpath)` @param obj the object to perform data binding on
`protected java.lang.Object` | `convert(java.lang.Class typeToConvertTo, java.lang.Object value)`
`protected java.lang.Class` | `getDomainClassType(java.lang.Object obj, java.lang.String propName)` @param obj any object
`protected java.lang.Object` | `getPersistentInstance(java.lang.Class type, java.lang.Object id)`
`protected java.lang.Class` | `getReferencedTypeForCollection(java.lang.String name, java.lang.Object target)`
`protected ValueConverter` | `getValueConverter(java.lang.Object obj, java.lang.String propName, java.lang.Object propValue)`
`protected java.lang.Object` | `initializeProperty(java.lang.Object obj, java.lang.String propName, java.lang.Class propertyType, DataBindingSource source)`
`protected boolean` | `isDomainClass(java.lang.Class clazz)`
`protected java.lang.Object` | `preprocessCharSequenceValue(java.lang.CharSequence propertyValue)`
`protected java.lang.Object` | `processIndexedProperty(java.lang.Object obj, groovy.lang.MetaProperty metaProperty, IndexedPropertyReferenceDescriptor indexedPropertyReferenceDescriptor, java.lang.Object val, DataBindingSource source, DataBindingListener listener)`
`protected java.lang.Object` | `processProperty(java.lang.Object obj, groovy.lang.MetaProperty metaProperty, java.lang.Object val, DataBindingSource source, DataBindingListener listener)`
`void` | `setFormattedValueConverters(FormattedValueConverter[] converters)`
`protected java.lang.Object` | `setPropertyValue(java.lang.Object obj, DataBindingSource source, groovy.lang.MetaProperty metaProperty, java.lang.Object propertyValue, DataBindingListener listener)`
`void` | `setValueConverters(ValueConverter[] converters)`

Methods inherited from class SimpleDataBinder
addBindingError, addElementToArrayAt, addElementToCollectionAt, bind, bind, bind, bind, bind, bind, bindProperty, convert, convertStringToEnum, getConverter, getFormattedConverter, getIndexedPropertyReferenceDescriptor, getReferencedTypeForCollection, getValueConverter, getValueConverterForClass, getValueConverterForField, initializeArray, initializeCollection, initializeMap, initializeProperty, isBasicType, isOkToAddElementAt, isOkToBind, processIndexedProperty, processProperty, registerConverter, registerFormattedValueConverter, registerStructuredEditor, setPropertyValue

Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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

### CLASS_TO_BINDING_INCLUDE_LIST

    protected static final java.util.Map CLASS_TO_BINDING_INCLUDE_LIST

### grailsApplication

    protected GrailsApplication grailsApplication

Property Detail

### convertEmptyStringsToNull

    boolean convertEmptyStringsToNull

### trimStrings

    boolean trimStrings

Constructor Detail

### GormAwareDataBinder

    GormAwareDataBinder(GrailsApplication grailsApplication)

Method Detail

### addElementToCollection

    protected java.lang.Object addElementToCollection(java.lang.Object obj, java.lang.String propName, GrailsDomainClassProperty property, java.lang.Object propertyValue, boolean clearCollection)

### addElementToCollectionAt

    @java.lang.Override
    protected java.lang.Object addElementToCollectionAt(java.lang.Object obj, java.lang.String propertyName, java.util.Collection collection, java.lang.Object index, java.lang.Object val)

### bind

    void bind(java.lang.Object obj, DataBindingSource source)

  Parameters:
    `obj` - the object to perform data binding on
    `source` - a Map containg the values to be bound to obj

### bind

    void bind(java.lang.Object obj, DataBindingSource source, DataBindingListener listener)

  Parameters:
    `obj` - the object to perform data binding on
    `source` - a Map containg the values to be bound to obj
    `listener` - will be notified of data binding events

### bind

    void bind(java.lang.Object obj, groovy.util.slurpersupport.GPathResult gpath)

  Parameters:
    `obj` - the object to perform data binding on
    `gpath` - contains an XML representation of the data to be bound to obj

### convert

    protected java.lang.Object convert(java.lang.Class typeToConvertTo, java.lang.Object value)

### getDomainClassType

    protected java.lang.Class getDomainClassType(java.lang.Object obj, java.lang.String propName)

  Parameters:
    `obj` - any object
    `propName` - the name of a property on obj
  Returns:
    the Class of the domain class referenced by propName, null if propName does not reference a domain class

### getPersistentInstance

    protected java.lang.Object getPersistentInstance(java.lang.Class type, java.lang.Object id)

### getReferencedTypeForCollection

    @java.lang.Override
    protected java.lang.Class getReferencedTypeForCollection(java.lang.String name, java.lang.Object target)

### getValueConverter

    @java.lang.Override
    protected ValueConverter getValueConverter(java.lang.Object obj, java.lang.String propName, java.lang.Object propValue)

### initializeProperty

    @java.lang.Override
    protected java.lang.Object initializeProperty(java.lang.Object obj, java.lang.String propName, java.lang.Class propertyType, DataBindingSource source)

### isDomainClass

    protected boolean isDomainClass(java.lang.Class clazz)

### preprocessCharSequenceValue

    protected java.lang.Object preprocessCharSequenceValue(java.lang.CharSequence propertyValue)

### processIndexedProperty

    @java.lang.Override
    protected java.lang.Object processIndexedProperty(java.lang.Object obj, groovy.lang.MetaProperty metaProperty, IndexedPropertyReferenceDescriptor indexedPropertyReferenceDescriptor, java.lang.Object val, DataBindingSource source, DataBindingListener listener)

### processProperty

    @java.lang.Override
    protected java.lang.Object processProperty(java.lang.Object obj, groovy.lang.MetaProperty metaProperty, java.lang.Object val, DataBindingSource source, DataBindingListener listener)

### setFormattedValueConverters

    @org.springframework.beans.factory.annotation.Autowired(required=false)
    void setFormattedValueConverters(FormattedValueConverter[] converters)

### setPropertyValue

    @java.lang.Override
    protected java.lang.Object setPropertyValue(java.lang.Object obj, DataBindingSource source, groovy.lang.MetaProperty metaProperty, java.lang.Object propertyValue, DataBindingListener listener)

### setValueConverters

    @org.springframework.beans.factory.annotation.Autowired(required=false)
    void setValueConverters(ValueConverter[] converters)

Groovy Documentation