17.00 - 17.05 - Javaの実装 - Advanced SQL Engine - Teradata Database

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

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
17.05
Published
2020年6月
Content Type
プログラミング リファレンス
Publication ID
B035-1147-170K-JPN
Language
日本語 (日本)
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;
               }
   }