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
  • Enum Constant Details

  • Method Details

    • values

      public static BackendIdConverter.DefaultIdConverter[] 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

      public static BackendIdConverter.DefaultIdConverter valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • fromRequestId

      public Serializable fromRequestId(String id, Class<?> entityType)
      Description copied from interface: BackendIdConverter
      Returns the id of the entity to be looked up eventually.
      Specified by:
      fromRequestId in interface BackendIdConverter
      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

      public String toRequestId(Serializable id, Class<?> entityType)
      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 interface BackendIdConverter
      Parameters:
      id - the entity's id, will never be null.
      entityType - the type of the entity to expose.
      Returns:
    • supports

      public boolean supports(Class<?> delimiter)
      Specified by:
      supports in interface org.springframework.plugin.core.Plugin<Class<?>>