public class PersistentEntitiesResourceMappings extends Object implements ResourceMappings
Constructor and Description |
---|
PersistentEntitiesResourceMappings(PersistentEntities entities)
Creates a new
PersistentEntitiesResourceMappings from the given PersistentEntities . |
Modifier and Type | Method and Description |
---|---|
protected void |
addToCache(Class<?> type,
ResourceMetadata metadata)
Adds the given
ResourceMetadata to the cache. |
boolean |
exportsMappingFor(Class<?> type)
Returns whether we have a
ResourceMapping for the given type and it is exported. |
boolean |
exportsTopLevelResourceFor(String path)
Returns whether we export a top-level resource for the given path.
|
ResourceMapping |
getMappingFor(PersistentProperty<?> property) |
ResourceMetadata |
getMetadataFor(Class<?> type)
Returns a
ResourceMetadata for the given type if available. |
SearchResourceMappings |
getSearchResourceMappings(Class<?> domainType)
Returns the
ResourceMapping s for the search resources of the given type. |
boolean |
hasMappingFor(Class<?> type)
Returns whether we have a
ResourceMapping for the given type. |
protected boolean |
hasMetadataFor(Class<?> type)
Returns whether we currently already have
ResourceMetadata for the given type. |
boolean |
isMapped(PersistentProperty<?> property) |
Iterator<ResourceMetadata> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public PersistentEntitiesResourceMappings(PersistentEntities entities)
PersistentEntitiesResourceMappings
from the given PersistentEntities
.entities
- must not be null.public ResourceMetadata getMetadataFor(Class<?> type)
ResourceMappings
ResourceMetadata
for the given type if available.getMetadataFor
in interface ResourceMappings
type
- must not be null.ResourceMetadata
if available or null otherwise.public SearchResourceMappings getSearchResourceMappings(Class<?> domainType)
ResourceMappings
ResourceMapping
s for the search resources of the given type.getSearchResourceMappings
in interface ResourceMappings
domainType
- must not be null.public boolean exportsMappingFor(Class<?> type)
ResourceMappings
ResourceMapping
for the given type and it is exported.exportsMappingFor
in interface ResourceMappings
public boolean exportsTopLevelResourceFor(String path)
ResourceMappings
exportsTopLevelResourceFor
in interface ResourceMappings
path
- must not be null or empty.public boolean hasMappingFor(Class<?> type)
ResourceMappings
ResourceMapping
for the given type.hasMappingFor
in interface ResourceMappings
type
- must not be null.public ResourceMapping getMappingFor(PersistentProperty<?> property)
public boolean isMapped(PersistentProperty<?> property)
public Iterator<ResourceMetadata> iterator()
iterator
in interface Iterable<ResourceMetadata>
protected final void addToCache(Class<?> type, ResourceMetadata metadata)
ResourceMetadata
to the cache.type
- must not be null.metadata
- can be null.protected final boolean hasMetadataFor(Class<?> type)
ResourceMetadata
for the given type.type
- must not be null.Copyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.