Java Implementation - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
Product Category
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;
               }
   }