public class PersistentEntities extends Object implements Streamable<PersistentEntity<?,? extends PersistentProperty<?>>>
PersistentEntity
instances managed by MappingContext
s.Constructor and Description |
---|
PersistentEntities(Iterable<? extends MappingContext<?,?>> contexts)
Creates a new
PersistentEntities for the given MappingContext s. |
Modifier and Type | Method and Description |
---|---|
Streamable<TypeInformation<?>> |
getManagedTypes()
Returns all
TypeInformation exposed by the registered MappingContext s. |
Optional<PersistentEntity<?,? extends PersistentProperty<?>>> |
getPersistentEntity(Class<?> type)
Returns the
PersistentEntity for the given type. |
PersistentEntity<?,? extends PersistentProperty<?>> |
getRequiredPersistentEntity(Class<?> type)
Returns the
PersistentEntity for the given type. |
Iterator<PersistentEntity<?,? extends PersistentProperty<?>>> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
empty, filter, flatMap, map, of, of, of, stream
forEach, spliterator
public PersistentEntities(Iterable<? extends MappingContext<?,?>> contexts)
PersistentEntities
for the given MappingContext
s.contexts
- public Optional<PersistentEntity<?,? extends PersistentProperty<?>>> getPersistentEntity(Class<?> type)
PersistentEntity
for the given type. Will consider all MappingContext
s registered but
return Optional#empty() in case none of the registered ones already have a PersistentEntity
registered for the given type.type
- can be null.public PersistentEntity<?,? extends PersistentProperty<?>> getRequiredPersistentEntity(Class<?> type)
PersistentEntity
for the given type. Will consider all MappingContext
s registered but
throw an IllegalArgumentException
in case none of the registered ones already have a
PersistentEntity
registered for the given type.type
- must not be null.PersistentEntity
for the given domain type.IllegalArgumentException
- in case no PersistentEntity
can be found for the given type.public Streamable<TypeInformation<?>> getManagedTypes()
TypeInformation
exposed by the registered MappingContext
s.public Iterator<PersistentEntity<?,? extends PersistentProperty<?>>> iterator()
iterator
in interface Iterable<PersistentEntity<?,? extends PersistentProperty<?>>>
Copyright © 2011-2016–2017 Pivotal Software, Inc.. All rights reserved.