Java Object Type Case cast(Object value, String sqlType)

Here you can find the source of cast(Object value, String sqlType)

Description

cast

License

Open Source License

Declaration

static String cast(Object value, String sqlType) 

Method Source Code

//package com.java2s;
/*// w w w . ja va 2 s  . c  om
Copyright (C) 2007-2011  Database Group - Universita' della Basilicata
Giansalvatore Mecca - giansalvatore.mecca@unibas.it
Salvatore Raunich - salrau@gmail.com
    
This file is part of ++Spicy - a Schema Mapping and Data Exchange Tool
    
++Spicy is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
any later version.
    
++Spicy 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 General Public License for more details.
    
You should have received a copy of the GNU General Public License
along with ++Spicy.  If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    static String cast(Object value, String sqlType) {
        return "cast(" + value + " as " + sqlType + ")";
    }
}

Related

  1. cast(Object obj, Class type)
  2. cast(Object object)
  3. cast(Object object, Class targetClass)
  4. cast(Object source)
  5. cast(Object val, Class type)
  6. cast(Object x)
  7. cast(Object x)
  8. cast(Object[] parameters, Class[] types)
  9. cast(String type)