public static enum BackendIdConverter.DefaultIdConverter extends Enum<BackendIdConverter.DefaultIdConverter> implements BackendIdConverter
BackendIdConverter
that will simply use ids as they are.BackendIdConverter.DefaultIdConverter
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
Serializable |
fromRequestId(String id,
Class<?> entityType)
Returns the id of the entity to be looked up eventually.
|
boolean |
supports(Class<?> delimiter) |
String |
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.
|
static BackendIdConverter.DefaultIdConverter |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BackendIdConverter.DefaultIdConverter[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BackendIdConverter.DefaultIdConverter INSTANCE
public static BackendIdConverter.DefaultIdConverter[] values()
for (BackendIdConverter.DefaultIdConverter c : BackendIdConverter.DefaultIdConverter.values()) System.out.println(c);
public static BackendIdConverter.DefaultIdConverter valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Serializable fromRequestId(String id, Class<?> entityType)
BackendIdConverter
fromRequestId
in interface BackendIdConverter
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.public String toRequestId(Serializable id, Class<?> entityType)
BackendIdConverter
toRequestId
in interface BackendIdConverter
id
- the entity's id, will never be null.entityType
- the type of the entity to expose.Copyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.