com.github.jasminb.jsonapi.StringIdHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsonapi-converter Show documentation
Show all versions of jsonapi-converter Show documentation
JSONAPI-Converter is a library that provides means for integrating with services using JSON API specification.
package com.github.jasminb.jsonapi;
/**
* Handles {@link String} as resource identifier type.
*
* @author jbegic
*/
public class StringIdHandler implements ResourceIdHandler {
@Override
public String asString(Object identifier) {
if (identifier != null) {
return String.valueOf(identifier);
}
return null;
}
@Override
public String fromString(String source) {
return source;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy