Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring Data Commons
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.data.repository.support
Class DomainClassPropertyEditorRegistrar

    java.lang.Object
      org.springframework.data.repository.support.DomainClassPropertyEditorRegistrar

All Implemented Interfaces:
  PropertyEditorRegistrar, ApplicationContextAware

    public class DomainClassPropertyEditorRegistrar

extends Object
implements PropertyEditorRegistrar, ApplicationContextAware

Simple helper class to use Hades DAOs to provide `PropertyEditor`s for domain classes. To get this working configure a `ConfigurableWebBindingInitializer` for your `AnnotationMethodHandlerAdapter` and register the `DomainClassPropertyEditorRegistrar` there: `<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"> <property name="webBindingInitializer"> <bean class="org.springframework.web.bind.support.ConfigurableWebBindingInitializer"> <property name="propertyEditorRegistrars"> <bean class="org.springframework.data.extensions.beans.DomainClassPropertyEditorRegistrar" /> </property> </bean> </property> </bean>` Make sure this bean declaration is in the `ApplicationContext` created by the `DispatcherServlet` whereas the repositories need to be declared in the root `WebApplicationContext`.

Author:
  Oliver Gierke

Constructor Summary
`DomainClassPropertyEditorRegistrar()`

Method Summary
`void` | `registerCustomEditors(PropertyEditorRegistry registry)`
`void` | `setApplicationContext(ApplicationContext context)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DomainClassPropertyEditorRegistrar

    public DomainClassPropertyEditorRegistrar()

Method Detail

### registerCustomEditors

    public void registerCustomEditors(PropertyEditorRegistry registry)

  Specified by:
    `registerCustomEditors` in interface `PropertyEditorRegistrar`

### setApplicationContext

    public void setApplicationContext(ApplicationContext context)

  Specified by:
    `setApplicationContext` in interface `ApplicationContextAware`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring Data Commons
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.