Class DatastoreKeyIdConverter

java.lang.Object
com.google.cloud.spring.autoconfigure.datastore.DatastoreKeyIdConverter
All Implemented Interfaces:
org.springframework.data.rest.webmvc.spi.BackendIdConverter, org.springframework.plugin.core.Plugin<Class<?>>

public class DatastoreKeyIdConverter extends Object implements org.springframework.data.rest.webmvc.spi.BackendIdConverter
A key converter that parses Key JSON from REST requests.
Since:
1.2
  • Constructor Details

    • DatastoreKeyIdConverter

      public DatastoreKeyIdConverter(DatastoreMappingContext datastoreMappingContext)
      Constructor.
      Parameters:
      datastoreMappingContext - the mapping context.
  • Method Details

    • fromRequestId

      public Serializable fromRequestId(String s, Class<?> clazz)
      Specified by:
      fromRequestId in interface org.springframework.data.rest.webmvc.spi.BackendIdConverter
    • toRequestId

      public String toRequestId(Serializable serializable, Class<?> clazz)
      Specified by:
      toRequestId in interface org.springframework.data.rest.webmvc.spi.BackendIdConverter
    • supports

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