Here you can find the source of getTrimmedStringToUpperCase(ResultSet rs, String columnLabel)
public static String getTrimmedStringToUpperCase(ResultSet rs, String columnLabel) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.ResultSet; import java.sql.SQLException; public class Main { public static String getTrimmedStringToUpperCase(ResultSet rs, String columnLabel) throws SQLException { return getString(rs, columnLabel) != null ? nullIfEmpty(getString(rs, columnLabel).toUpperCase()) : null; }//from w w w . j a v a2 s . com public static String getString(ResultSet rs, String columnLabel) throws SQLException { return rs.getString(columnLabel); } public static String nullIfEmpty(String text) { return cleanLongText(text); } public static String cleanLongText(String text) { if (text != null) { String trimmedText = text.trim(); if (trimmedText.length() > 0) { return trimmedText; } } return null; } }