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

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

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

import com.databasesandlife.util.BCryptPassword;
import org.jooq.Converter;

@SuppressWarnings("serial")
public class BCryptPasswordConverter implements Converter {

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

    @Override
    public BCryptPassword from(String x) {
        if (x == null) return null;
        return new BCryptPassword(x);
    }

    @Override
    public String to(BCryptPassword x) {
        if (x == null) return null;
        return x.bcrypt;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy