Here you can find the source of getCastExpression(Class aClass)
static public String getCastExpression(Class aClass)
//package com.java2s; /*/*from www .j a v a2 s . c o m*/ * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2011-2012, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ import java.sql.Blob; import java.sql.Clob; import java.util.Map; public class Main { private static Map<Class, String> CAST_EPXPRESSIONS = null; static public String getCastExpression(Class aClass) { if (Clob.class.isAssignableFrom(aClass)) return "CAST (? as CLOB(1G))"; if (Blob.class.isAssignableFrom(aClass)) return "CAST (? as BLOB(2G))"; return CAST_EPXPRESSIONS.get(aClass); } }