Class LinkRelationProvider.LookupContext
java.lang.Object
org.springframework.hateoas.server.LinkRelationProvider.LookupContext
- Enclosing interface:
- LinkRelationProvider
LinkRelationProvider
selection context for item resource relation lookups
(forItemResourceRelLookup(Class)
, collection resource relation lookups
forCollectionResourceRelLookup(Class)
or both forType(Class)
.- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionboolean
forCollectionResourceRelLookup
(Class<?> type) Creates aLinkRelationProvider.LookupContext
to lookup the collection resource relation for the given type.forItemResourceRelLookup
(Class<?> type) Creates aLinkRelationProvider.LookupContext
to lookup the item resource relation for the given type.Creates aLinkRelationProvider.LookupContext
for the type in general, i.e. both item and collection relation lookups.Class<?>
getType()
boolean
handlesType
(Class<?> type) Returns whether the lookup is executed for the given type.int
hashCode()
boolean
Returns whether the current context includes the collection relation lookup.boolean
Returns whether the current context includes the item relation lookup.toString()
-
Method Details
-
getType
-
forType
Creates aLinkRelationProvider.LookupContext
for the type in general, i.e. both item and collection relation lookups.- Parameters:
type
- must not be null.- Returns:
-
forItemResourceRelLookup
Creates aLinkRelationProvider.LookupContext
to lookup the item resource relation for the given type.- Parameters:
type
- must not be null.- Returns:
-
forCollectionResourceRelLookup
Creates aLinkRelationProvider.LookupContext
to lookup the collection resource relation for the given type.- Parameters:
type
- must not be null.- Returns:
-
isItemRelationLookup
public boolean isItemRelationLookup()Returns whether the current context includes the item relation lookup.- Returns:
-
isCollectionRelationLookup
public boolean isCollectionRelationLookup()Returns whether the current context includes the collection relation lookup.- Returns:
-
handlesType
Returns whether the lookup is executed for the given type.- Parameters:
type
- must not be null.- Returns:
-
equals
-
hashCode
public int hashCode() -
toString
-