Java SQL ResultSet Read getPath(ResultSet r, String columnName)

Here you can find the source of getPath(ResultSet r, String columnName)

Description

get Path

License

Apache License

Declaration

public static Path getPath(ResultSet r, String columnName) throws SQLException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.nio.file.Path;
import java.nio.file.Paths;
import java.sql.ResultSet;
import java.sql.SQLException;

public class Main {
    public static Path getPath(ResultSet r, String columnName) throws SQLException {
        String val = r.getString(columnName);
        return val != null ? Paths.get(val) : null;
    }/*w  ww  .  j a  va2  s  .  c om*/
}

Related

  1. getObject(ResultSet rs, int columnIndex, Class type)
  2. getObject(ResultSet set, int columnIndex)
  3. getObjectByTypeCoercion(ResultSet resultSet, int index, int dataType)
  4. getOjbClassName(ResultSet rs)
  5. getOptionalInt(ResultSet rs, String name)
  6. getRecordsFromResultSet(ResultSet rs)
  7. getResult(ResultSet rs)
  8. getResultArray(ResultSet resultSet, int size, java.util.Date startDate)
  9. getResultByMap(ResultSet rs)