org.xblackcat.sjpu.storage.converter.ToDoubleObjectConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sjpu-dbah Show documentation
Show all versions of sjpu-dbah Show documentation
Service for generating DB access logic in simple way via interfaces and annotations
package org.xblackcat.sjpu.storage.converter;
import java.sql.ResultSet;
import java.sql.SQLException;
/**
* The class to convert a single-column result to Double primitive.
*/
public class ToDoubleObjectConverter implements IToObjectConverter {
public Double convert(ResultSet rs) throws SQLException {
final double v = rs.getDouble(1);
if (rs.wasNull()) {
return null;
} else {
return v;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy