com.github.jasminb.jsonapi.LongIdHandler 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 Long} as resource identifier type.
*
* @author jbegic
*/
public class LongIdHandler implements ResourceIdHandler {
@Override
public String asString(Object identifier) {
if (identifier != null) {
return String.valueOf(identifier);
}
return null;
}
@Override
public Long fromString(String source) {
if (source != null) {
return Long.valueOf(source);
}
return null;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy