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.core.support
Class RepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID extends Serializable>

    java.lang.Object
      org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport<T,S,ID>

Type Parameters:
  `T` - the type of the repository

All Implemented Interfaces:
  FactoryBean<T>, InitializingBean, RepositoryFactoryInformation<S,ID>

Direct Known Subclasses:
  TransactionalRepositoryFactoryBeanSupport

    public abstract class RepositoryFactoryBeanSupport<T extends Repository<S,ID>,S,ID extends Serializable>

extends Object
implements InitializingBean, RepositoryFactoryInformation<S,ID>, FactoryBean<T>

Adapter for Springs `FactoryBean` interface to allow easy setup of repository factories via Spring configuration.

Author:
  Oliver Gierke

Constructor Summary
`RepositoryFactoryBeanSupport()`

Method Summary
`void` | `afterPropertiesSet()`
`protected abstract RepositoryFactorySupport` | `createRepositoryFactory()` Create the actual `RepositoryFactorySupport` instance.
`EntityInformation<S,ID>` | `getEntityInformation()` Returns `EntityInformation` the repository factory is using.
`T` | `getObject()`
`Class<? extends T>` | `getObjectType()`
`Class<? extends T>` | `getRepositoryInterface()` Returns the interface of the `Repository` the factory will create.
`boolean` | `isSingleton()`
`void` | `setCustomImplementation(Object customImplementation)` Setter to inject a custom repository implementation.
`void` | `setNamedQueries(NamedQueries namedQueries)` Setter to inject a `NamedQueries` instance.
`void` | `setQueryLookupStrategyKey(QueryLookupStrategy.Key queryLookupStrategyKey)` Set the `QueryLookupStrategy.Key` to be used.
`void` | `setRepositoryInterface(Class<? extends T> repositoryInterface)` Setter to inject the repository interface to implement.

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

Constructor Detail

### RepositoryFactoryBeanSupport

    public RepositoryFactoryBeanSupport()

Method Detail

### setRepositoryInterface

    public void setRepositoryInterface(Class<? extends T> repositoryInterface)

  Setter to inject the repository interface to implement.

  Parameters:
    `repositoryInterface` - the repository interface to set

### setQueryLookupStrategyKey

    public void setQueryLookupStrategyKey(QueryLookupStrategy.Key queryLookupStrategyKey)

  Set the `QueryLookupStrategy.Key` to be used.

  Parameters:
    `queryLookupStrategyKey` -

### setCustomImplementation

    public void setCustomImplementation(Object customImplementation)

  Setter to inject a custom repository implementation.

  Parameters:
    `customImplementation` -

### setNamedQueries

    public void setNamedQueries(NamedQueries namedQueries)

  Setter to inject a `NamedQueries` instance.

  Parameters:
    `namedQueries` - the namedQueries to set

### getEntityInformation

    public EntityInformation<S,ID> getEntityInformation()

  Description copied from interface: `RepositoryFactoryInformation`
  Returns `EntityInformation` the repository factory is using.

  Specified by:
    `getEntityInformation` in interface `RepositoryFactoryInformation<S,ID extends Serializable>`
  Returns:

### getRepositoryInterface

    public Class<? extends T> getRepositoryInterface()

  Description copied from interface: `RepositoryFactoryInformation`
  Returns the interface of the `Repository` the factory will create.

  Specified by:
    `getRepositoryInterface` in interface `RepositoryFactoryInformation<S,ID extends Serializable>`
  Returns:

### getObject

    public T getObject()

  Specified by:
    `getObject` in interface `FactoryBean<T extends Repository<S,ID>>`

### getObjectType

    public Class<? extends T> getObjectType()

  Specified by:
    `getObjectType` in interface `FactoryBean<T extends Repository<S,ID>>`

### isSingleton

    public boolean isSingleton()

  Specified by:
    `isSingleton` in interface `FactoryBean<T extends Repository<S,ID>>`

### afterPropertiesSet

    public void afterPropertiesSet()

  Specified by:
    `afterPropertiesSet` in interface `InitializingBean`

### createRepositoryFactory

    protected abstract RepositoryFactorySupport createRepositoryFactory()

  Create the actual `RepositoryFactorySupport` instance.

  Returns:

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.