# 22. Virtuoso Functions Guide - udt_implements_method

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
import_jar
internal_to_sql_type
internal_type
internal_type_name
isarray
isbinary
isblob
isdouble
isentity
isfloat
isinteger
isnull
isnumeric
isstring
iszero
jvm_ref_import
make_string
sign
stringdate
stringtime
udt_defines_field
udt_get
udt_implements_metho...
udt_instance_of
udt_set
unimport_jar
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## udt_implements_method

provides a handle to the first method with specific name in a user defined type.
any udt_implements_method (in udt any, in method_name varchar);
Description

This returns a non-zero value (true) if the udt has an instance method with a name equal to the value of method_name. For methods with the same name, but with different signatures this function will return the handle of the first method in order of definition. If a method is not found, 0 will be returned. The return value can be used to call the method using the indirect call statement. In which case an instance should be passed as a first argument to the indirect call statement.

Parameters
udt – Type name as varchar or a type instance.
method_name – The requested method name as a varchar.
Return Types

An integer will be returned. If the named method is not contained within the user defined type 0 (false) will be returned. Otherwise an integer representing the handle to first definition of a contained method with that name will be returned.

Examples
Finding methods within a UDT

This example demonstrates how one might go about utilizing the handle of a method if found within a user defined type.

    ....
    declare mtd any;
    declare inst SER_UDT;

    inst := new SER_UDT ();
    mtd := udt_implements_method (inst, 'NEGATE');

    if (mtd <> 0)
      return call (mtd) (inst);
    else
      signal ('42000', 'No method NEGATE');
    ....

See Also

udt_get()

udt_defines_field()

udt_instance_of()

udt_set()