All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.t9t.jooq.json.StringConverter Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
package com.github.t9t.jooq.json;

import org.jooq.Converter;

import java.util.Objects;

public class StringConverter implements Converter {
    @Override
    public String from(Object t) {
        return Objects.toString(t, null);
    }

    @Override
    public String to(String u) {
        return u;
    }

    @Override
    public Class fromType() {
        return Object.class;
    }

    @Override
    public Class toType() {
        return String.class;
    }
}