Java Examples for ASE 12.5


Class Routines5

java.lang.Object
  |
  +--Routines5

public class Routines5
extends java.lang.Object

A class with a job2method for an SQLJ create function that uses the null on null input clause.


Constructor Summary
Routines5()
           
 
Method Summary
static java.lang.String job2(int jc)
          A method that returns the job name for a given job code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Routines5

public Routines5()
Method Detail

job2

public static java.lang.String job2(int jc)
                             throws java.sql.SQLException
A method that returns the job name for a given job code.

This method is intended to illustrate the handling of nulls with the SQLJ null on null input clause. You would define an SQLJ function on this method, as follows:

  create function jobof22(jc integer) returns varchar(20)
  returns null on null input
  language java parameter style java
  external name 'Routines5.job2(int)'    
  

A call of the SQLJ "job22" function will implicitly return null (without calling "Routines5.job2" if the parameter value is null.

Parameters:
jc - an int with the given job code

Java Examples for ASE 12.5