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.mapping.context
Interface MappingContext<E extends PersistentEntity<?,P>,P extends PersistentProperty<P>>

All Known Implementing Classes:
  AbstractMappingContext

    public interface MappingContext<E extends PersistentEntity<?,P>,P extends PersistentProperty<P>>

This interface defines the overall context including all known PersistentEntity instances and methods to obtain instances on demand

This interface is used internally to establish associations between entities and also at runtime to obtain entities by name

The generic type parameters T & R are used to specify the mapped form of a class (example Table) and property (example Column) respectively.

Author:
  Graeme Rocher, Jon Brisbin, Oliver Gierke

Method Summary
`List<Validator>` | `getEntityValidators(E entity)` Obtains a validator for the given entity TODO: Why do we need validators at the `MappingContext`?
`Collection<E>` | `getPersistentEntities()` Returns all `PersistentEntity`s held in the context.
`E` | `getPersistentEntity(Class<?> type)` Returns a `PersistentEntity` for the given `Class`.
`E` | `getPersistentEntity(TypeInformation<?> type)` Returns a `PersistentEntity` for the given `TypeInformation`.
`
`<T> Iterable<P>`
` | `getPersistentPropertyPath(Class<T> type, String path)` Returns all `PersistentProperty`s for the given path expression based on the given root `Class`.

Method Detail

### getPersistentEntities

    Collection<E> getPersistentEntities()

  Returns all `PersistentEntity`s held in the context.

  Returns:

### getPersistentEntity

    E getPersistentEntity(Class<?> type)

  Returns a `PersistentEntity` for the given `Class`.

  Parameters:
    `type` -
  Returns:

### getPersistentEntity

    E getPersistentEntity(TypeInformation<?> type)

  Returns a `PersistentEntity` for the given `TypeInformation`.

  Parameters:
    `type` -
  Returns:

### getPersistentPropertyPath

    <T> Iterable<P> getPersistentPropertyPath(Class<T> type,
                                              String path)

  Returns all `PersistentProperty`s for the given path expression based on the given root `Class`. Path expression are dot separated, e.g. `person.firstname`.

  Type Parameters:
    `T` -
  Parameters:
    `type` -
    `path` -
  Returns:

### getEntityValidators

    List<Validator> getEntityValidators(E entity)

  Obtains a validator for the given entity TODO: Why do we need validators at the `MappingContext`?

  Parameters:
    `entity` - The entity
  Returns:
    A validator or null if none exists for the given entity

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.