Class PersistentEntitiesResourceMappings
java.lang.Object
org.springframework.data.rest.core.mapping.PersistentEntitiesResourceMappings
- All Implemented Interfaces:
Iterable<ResourceMetadata>,Supplier<Stream<ResourceMetadata>>,ResourceMappings,Streamable<ResourceMetadata>
- Direct Known Subclasses:
RepositoryResourceMappings
- Author:
- Oliver Gierke, Mark Paluch
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newPersistentEntitiesResourceMappingsfrom the givenPersistentEntities. -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddToCache(Class<?> type, ResourceMetadata metadata) Adds the givenResourceMetadatato the cache.booleanexportsMappingFor(Class<?> type) Returns whether we have aResourceMappingfor the given type and it is exported.booleanReturns whether we export a top-level resource for the given path.getMappingFor(PersistentProperty<?> property) getMetadataFor(Class<?> type) Returns aResourceMetadatafor the given type if available.getSearchResourceMappings(Class<?> domainType) Returns theResourceMappings for the search resources of the given type.booleanhasMappingFor(Class<?> type) Returns whether we have aResourceMappingfor the given type.protected final booleanhasMetadataFor(Class<?> type) Returns whether we currently already haveResourceMetadatafor the given type.booleanisMapped(PersistentProperty<?> property) iterator()Methods 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
-
PersistentEntitiesResourceMappings
Creates a newPersistentEntitiesResourceMappingsfrom the givenPersistentEntities.- Parameters:
entities- must not be null.
-
-
Method Details
-
getMetadataFor
Description copied from interface:ResourceMappingsReturns aResourceMetadatafor the given type if available.- Specified by:
getMetadataForin interfaceResourceMappings- Parameters:
type- must not be null.- Returns:
- the
ResourceMetadataif available or null otherwise.
-
getSearchResourceMappings
Description copied from interface:ResourceMappingsReturns theResourceMappings for the search resources of the given type.- Specified by:
getSearchResourceMappingsin interfaceResourceMappings- Parameters:
domainType- must not be null.- Returns:
- will never be null.
-
exportsMappingFor
Description copied from interface:ResourceMappingsReturns whether we have aResourceMappingfor the given type and it is exported.- Specified by:
exportsMappingForin interfaceResourceMappings- Returns:
-
exportsTopLevelResourceFor
Description copied from interface:ResourceMappingsReturns whether we export a top-level resource for the given path.- Specified by:
exportsTopLevelResourceForin interfaceResourceMappings- Parameters:
path- must not be null or empty.- Returns:
-
hasMappingFor
Description copied from interface:ResourceMappingsReturns whether we have aResourceMappingfor the given type.- Specified by:
hasMappingForin interfaceResourceMappings- Parameters:
type- must not be null.- Returns:
-
getMappingFor
-
isMapped
-
iterator
- Specified by:
iteratorin interfaceIterable<ResourceMetadata>
-
addToCache
Adds the givenResourceMetadatato the cache.- Parameters:
type- must not be null.metadata- can be null.
-
hasMetadataFor
Returns whether we currently already haveResourceMetadatafor the given type.- Parameters:
type- must not be null.- Returns:
-