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

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

There is a newer version: 21.0.1
Show newest version
package com.databasesandlife.util.jooq;

import org.jooq.Converter;

import java.time.ZoneId;

@SuppressWarnings({ "serial" })
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