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

com.databasesandlife.util.jooq.ZoneIdConverter Maven / Gradle / Ivy

The newest version!
package com.databasesandlife.util.jooq;

import org.jooq.Converter;

import java.time.ZoneId;

public class ZoneIdConverter implements Converter {

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

    @Override
    public ZoneId from(String x) {
        if (x == null) return null;
        return ZoneId.of(x);
    }

    @Override
    public String to(ZoneId m) {
        if (m == null) return null;
        return m.getId();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy