Here you can find the source of createRecGetStatementsUpdate(String tip, String imeFirstCap)
public static String createRecGetStatementsUpdate(String tip, String imeFirstCap)
//package com.java2s; //License from project: Open Source License public class Main { public static String createRecGetStatementsUpdate(String tip, String imeFirstCap) { StringBuilder sb = new StringBuilder(); if (tip.toLowerCase().contains("timestamp")) { sb.append("rec.get") .append(imeFirstCap) .append("() == null ? null : new java.sql.Timestamp(rec.get") .append(imeFirstCap).append("().getTime())"); } else if (tip.contains("Date")) { sb.append("rec.get") .append(imeFirstCap) .append("() == null ? null : new java.sql.Date(rec.get") .append(imeFirstCap).append("().getTime())"); } else if (tip.contains("Integer") || tip.contains("Long") || tip.contains("Float") || tip.contains("Double")) { sb.append("rec.get").append(imeFirstCap) .append("() == null ? 0 : rec.get").append(imeFirstCap) .append("()"); } else {//from w w w.ja va 2 s . com sb.append("rec.get").append(imeFirstCap).append("()"); } return sb.toString(); } }