Javaの実装 - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL外部ルーチン プログラミング

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
2020年6月
Language
日本語
Last Update
2021-03-30
dita:mapPath
ja-JP/qwr1571437338192.ditamap
dita:ditavalPath
ja-JP/qwr1571437338192.ditaval
dita:id
B035-1147
Product Category
Software
Teradata Vantage
public class AnytypeClass {

   public static java.lang.String jtdany001(java.lang.Object p1) throws Exception
   {
      String returnStr;

      if(p1 instanceof java.lang.Integer)
      {
         returnStr = "Parameter type is Integer";
         return returnStr;
      }
      else
         if(p1 instanceof java.lang.Byte)
         {
            returnStr = "Parameter type is ByteInt";
            return returnStr;

         }
         else
            if(p1 instanceof java.lang.Short)
            {
               returnStr = "Parameter type is Short";
               return returnStr;

            }
            else
               if(p1 instanceof java.lang.Long)
               {
                  returnStr = "Parameter type is BigInt";
                  return returnStr;
               }
               else if(p1 instanceof java.lang.Double)
               {
                  returnStr = "Parameter type is Float/Real";
                  return returnStr;
               }
               else if(p1 instanceof java.math.BigDecimal)
               {
                  returnStr = "Parameter type is Decimal/Numeric";
                  return returnStr;
               }
               else if(p1 instanceof java.sql.Date)
               {
                  returnStr = "Parameter type is Date";
                  return returnStr;
               }
               else if(p1 instanceof java.sql.Time)
               {
                  returnStr = "Parameter type is Time";
                  return returnStr;
               }
               else if(p1 instanceof java.sql.Timestamp)
               {
                  returnStr = "Parameter type is Timestamp";
                  return returnStr;
               }
               else if(p1 instanceof java.sql.Clob)
               {
                  returnStr = "Parameter type is Clob";
                  return returnStr;
               }
               else if(p1 instanceof java.sql.Blob)
               {
                  returnStr = "Parameter type is Blob";
                  return returnStr;
               }
               else if(p1 instanceof java.lang.String)
               {
                  returnStr = "Parameter type is Char/Varchar/Interval";
                  return returnStr;
               }
               else
               {
                  returnStr = "Invalid object type passed.";
                  return returnStr;
               }
   }