Spring Data Core

org.springframework.data.mapping.context
Class PersistentEntities

java.lang.Object
  extended by org.springframework.data.mapping.context.PersistentEntities
All Implemented Interfaces:
Iterable<PersistentEntity<?,?>>

public class PersistentEntities
extends Object
implements Iterable<PersistentEntity<?,?>>

Value object to access PersistentEntity instances managed by MappingContexts.

Since:
1.8
Author:
Oliver Gierke

Constructor Summary
PersistentEntities(Iterable<? extends MappingContext<?,?>> contexts)
          Creates a new PersistentEntities for the given MappingContexts.
 
Method Summary
 Iterable<TypeInformation<?>> getManagedTypes()
          Returns all TypeInformation exposed by the registered MappingContexts.
 PersistentEntity<?,?> getPersistentEntity(Class<?> type)
          Returns the PersistentEntity for the given type.
 Iterator<PersistentEntity<?,?>> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentEntities

public PersistentEntities(Iterable<? extends MappingContext<?,?>> contexts)
Creates a new PersistentEntities for the given MappingContexts.

Parameters:
contexts -
Method Detail

getPersistentEntity

public PersistentEntity<?,?> getPersistentEntity(Class<?> type)
Returns the PersistentEntity for the given type. Will consider all MappingContexts registered but return null in case none of the registered ones already have a PersistentEntity registered for the given type.

Parameters:
type - can be null.
Returns:

getManagedTypes

public Iterable<TypeInformation<?>> getManagedTypes()
Returns all TypeInformation exposed by the registered MappingContexts.

Returns:

iterator

public Iterator<PersistentEntity<?,?>> iterator()
Specified by:
iterator in interface Iterable<PersistentEntity<?,?>>

Spring Data Core

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.