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

## org.codehaus.groovy.grails.web.binding
[Java] Class DataBindingUtils

    java.lang.Object
      org.codehaus.groovy.grails.web.binding.DataBindingUtils

    @SuppressWarnings("rawtypes")
    public class DataBindingUtils

Utility methods to perform data binding from Grails objects.

Authors:
  Graeme Rocher

Since:
  1.0

Method Summary
`static void` | `assignBidirectionalAssociations(java.lang.Object object, java.util.Map source, GrailsDomainClass domainClass)` Associations both sides of any bidirectional relationships found in the object and source map to bind
`static BindingResult` | `bindObjectToDomainInstance(GrailsDomainClass domain, java.lang.Object object, java.lang.Object source)` Binds the given source object to the given target object performing type conversion if necessary
`static BindingResult` | `bindObjectToDomainInstance(GrailsDomainClass domain, java.lang.Object object, java.lang.Object source, java.util.List include, java.util.List exclude, java.lang.String filter)` Binds the given source object to the given target object performing type conversion if necessary
`static BindingResult` | `bindObjectToInstance(java.lang.Object object, java.lang.Object source)` Binds the given source object to the given target object performing type conversion if necessary
`static BindingResult` | `bindObjectToInstance(java.lang.Object object, java.lang.Object source, java.util.List include, java.util.List exclude, java.lang.String filter)` Binds the given source object to the given target object performing type conversion if necessary

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()

Method Detail

### assignBidirectionalAssociations

    public static void assignBidirectionalAssociations(java.lang.Object object, java.util.Map source, GrailsDomainClass domainClass)

  Associations both sides of any bidirectional relationships found in the object and source map to bind
  Parameters:
    `object` - The object
    `source` - The source map
    `domainClass` - The DomainClass for the object

### bindObjectToDomainInstance

    public static BindingResult bindObjectToDomainInstance(GrailsDomainClass domain, java.lang.Object object, java.lang.Object source)

  Binds the given source object to the given target object performing type conversion if necessary
  Parameters:
    `domain` - The GrailsDomainClass instance
    `object` - The object to bind to
    `source` - The source object
  Returns:
    A BindingResult or null if it wasn't successful
  See Also:
    GrailsDomainClass

### bindObjectToDomainInstance

    @SuppressWarnings("unchecked")
    public static BindingResult bindObjectToDomainInstance(GrailsDomainClass domain, java.lang.Object object, java.lang.Object source, java.util.List include, java.util.List exclude, java.lang.String filter)

  Binds the given source object to the given target object performing type conversion if necessary
  Parameters:
    `domain` - The GrailsDomainClass instance
    `object` - The object to bind to
    `source` - The source object
    `include` - The list of properties to include
    `exclude` - The list of properties to exclud
    `filter` - The prefix to filter by
  Returns:
    A BindingResult or null if it wasn't successful
  See Also:
    GrailsDomainClass

### bindObjectToInstance

    public static BindingResult bindObjectToInstance(java.lang.Object object, java.lang.Object source)

  Binds the given source object to the given target object performing type conversion if necessary
  Parameters:
    `object` - The object to bind to
    `source` - The source object
  Returns:
    A BindingResult or null if it wasn't successful

### bindObjectToInstance

    public static BindingResult bindObjectToInstance(java.lang.Object object, java.lang.Object source, java.util.List include, java.util.List exclude, java.lang.String filter)

  Binds the given source object to the given target object performing type conversion if necessary
  Parameters:
    `object` - The object to bind to
    `source` - The source object
    `include` - The list of properties to include
    `exclude` - The list of properties to exclud
    `filter` - The prefix to filter by
  Returns:
    A BindingResult or null if it wasn't successful

Groovy Documentation