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
ConstructorDescriptionRepositoryResourceMappings
(Repositories repositories, PersistentEntities entities, RepositoryRestConfiguration configuration) Creates a newRepositoryResourceMappings
from the givenRepositoryRestConfiguration
,PersistentEntities
, andRepositories
. -
Method Summary
Modifier and TypeMethodDescriptiongetSearchResourceMappings
(Class<?> domainType) Returns theResourceMapping
s for the search resources of the given type.boolean
hasMappingFor
(Class<?> type) Returns whether we have aResourceMapping
for the given type.boolean
isMapped
(PersistentProperty<?> property) Methods inherited from class org.springframework.data.rest.core.mapping.PersistentEntitiesResourceMappings
addToCache, exportsMappingFor, exportsTopLevelResourceFor, getMappingFor, getMetadataFor, hasMetadataFor, iterator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RepositoryResourceMappings
public RepositoryResourceMappings(Repositories repositories, PersistentEntities entities, RepositoryRestConfiguration configuration) Creates a newRepositoryResourceMappings
from 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:ResourceMappings
Returns theResourceMapping
s for the search resources of the given type.- Specified by:
getSearchResourceMappings
in interfaceResourceMappings
- Overrides:
getSearchResourceMappings
in classPersistentEntitiesResourceMappings
- Parameters:
domainType
- must not be null.- Returns:
- will never be null.
-
hasMappingFor
Description copied from interface:ResourceMappings
Returns whether we have aResourceMapping
for the given type.- Specified by:
hasMappingFor
in interfaceResourceMappings
- Overrides:
hasMappingFor
in classPersistentEntitiesResourceMappings
- Parameters:
type
- must not be null.- Returns:
-
isMapped
- Overrides:
isMapped
in classPersistentEntitiesResourceMappings
-