Class RepositoryResourceMappings
java.lang.Object
org.springframework.data.rest.core.mapping.PersistentEntitiesResourceMappings
org.springframework.data.rest.core.mapping.RepositoryResourceMappings
- All Implemented Interfaces:
Iterable<ResourceMetadata>,Supplier<Stream<ResourceMetadata>>,ResourceMappings,Streamable<ResourceMetadata>
Central abstraction obtain
ResourceMetadata and ResourceMapping instances for domain types and
repositories.- Author:
- Oliver Gierke
-
Constructor Summary
ConstructorsConstructorDescriptionRepositoryResourceMappings(Repositories repositories, PersistentEntities entities, RepositoryRestConfiguration configuration) Creates a newRepositoryResourceMappingsfrom the givenRepositoryRestConfiguration,PersistentEntities, andRepositories. -
Method Summary
Modifier and TypeMethodDescriptiongetSearchResourceMappings(Class<?> domainType) Returns theResourceMappings for the search resources of the given type.booleanhasMappingFor(Class<?> type) Returns whether we have aResourceMappingfor the given type.booleanisMapped(PersistentProperty<?> property) Methods inherited from class org.springframework.data.rest.core.mapping.PersistentEntitiesResourceMappings
addToCache, exportsMappingFor, exportsTopLevelResourceFor, getMappingFor, getMetadataFor, hasMetadataFor, iteratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RepositoryResourceMappings
public RepositoryResourceMappings(Repositories repositories, PersistentEntities entities, RepositoryRestConfiguration configuration) Creates a newRepositoryResourceMappingsfrom the givenRepositoryRestConfiguration,PersistentEntities, andRepositories.- Parameters:
repositories- must not be null.entities- must not be null.configuration- must not be null.
-
-
Method Details
-
getSearchResourceMappings
Description copied from interface:ResourceMappingsReturns theResourceMappings for the search resources of the given type.- Specified by:
getSearchResourceMappingsin interfaceResourceMappings- Overrides:
getSearchResourceMappingsin classPersistentEntitiesResourceMappings- Parameters:
domainType- must not be null.- Returns:
- will never be null.
-
hasMappingFor
Description copied from interface:ResourceMappingsReturns whether we have aResourceMappingfor the given type.- Specified by:
hasMappingForin interfaceResourceMappings- Overrides:
hasMappingForin classPersistentEntitiesResourceMappings- Parameters:
type- must not be null.- Returns:
-
isMapped
- Overrides:
isMappedin classPersistentEntitiesResourceMappings
-