Enum Class BackendIdConverter.DefaultIdConverter
java.lang.Object
java.lang.Enum<BackendIdConverter.DefaultIdConverter>
org.springframework.data.rest.webmvc.spi.BackendIdConverter.DefaultIdConverter
- All Implemented Interfaces:
Serializable
,Comparable<BackendIdConverter.DefaultIdConverter>
,Constable
,BackendIdConverter
,org.springframework.plugin.core.Plugin<Class<?>>
- Enclosing interface:
- BackendIdConverter
public static enum BackendIdConverter.DefaultIdConverter
extends Enum<BackendIdConverter.DefaultIdConverter>
implements BackendIdConverter
The default
BackendIdConverter
that will simply use ids as they are.- Author:
- Oliver Gierke
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface org.springframework.data.rest.webmvc.spi.BackendIdConverter
BackendIdConverter.DefaultIdConverter
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionfromRequestId
(String id, Class<?> entityType) Returns the id of the entity to be looked up eventually.boolean
toRequestId
(Serializable id, Class<?> entityType) Returns the id to be used in the URI generated to point to an entity of the given type with the given id.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromRequestId
Description copied from interface:BackendIdConverter
Returns the id of the entity to be looked up eventually.- Specified by:
fromRequestId
in interfaceBackendIdConverter
- Parameters:
id
- the source id as it was parsed from the incoming request, will never be null.entityType
- the type of the object to be resolved, will never be null.- Returns:
- must not be null.
-
toRequestId
Description copied from interface:BackendIdConverter
Returns the id to be used in the URI generated to point to an entity of the given type with the given id.- Specified by:
toRequestId
in interfaceBackendIdConverter
- Parameters:
id
- the entity's id, will never be null.entityType
- the type of the entity to expose.- Returns:
-
supports
- Specified by:
supports
in interfaceorg.springframework.plugin.core.Plugin<Class<?>>
-