com.databasesandlife.util.jooq.BCryptPasswordConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-common Show documentation
Show all versions of java-common Show documentation
Utility classes developed at Adrian Smith Software (A.S.S.)
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;
}
}