@Override
    public String getValue(ResultSet rs, int startIndex) throws SQLException {
        Object o = rs.getObject(startIndex);
        if (o instanceof String) {
            return (String) o;
        } else if (o instanceof Clob) {
            Clob clob = (Clob) o;
            return clob.getSubString(1, (int) clob.length());
        } else if (o != null) {
            return o.toString();
        } else {
            return null;
        }
    }
{@code StringAsObjectType} maps String to String on the JDBC level

@author tiwe
querydsl-sql/src/main/java/com/querydsl/sql/types/StringAsObjectType.java