Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [%SQL] >  [FDW] >  [Java]
Private  Storage   

class %SQL.FDW.Java extends %SQL.FDW.Abstract

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 3 8


Summary

Properties
%AtEnd %CurrentResult %GetData %Message
%OutputColumnCount %ROWCOUNT %ROWID %ResultColumnCount
%ResultSetColumnCount %SQLCODE %StatementType %StatementTypeName
Buffer BufferLength BufferPointer Gateway
Ptr ReaderObject RemainingBuffers

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchMethod %DispatchSetModified
%DispatchSetMultidimProperty %Display %DisplayFormatted %Extends
%Get %GetData %GetMetadata %GetParameter
%GetRow %GetRows %IsA %IsModified
%MoreResults %New %Next %NextOutputValue
%NextResult %NormalizeObject %ObjectModified %OnNew
%OriginalNamespace %PackageName %Print %RemoveFromSaveSet
%SerializeObject %SetModified %ValidateObject CleanUp
Close CreateReaderObject Execute Fetch
GetRequestObject QuoteIdentifier Reset

Subclasses
%SQL.FDW.CSV

Parameters

• parameter JAVACLASS;
Class in the Foreign Table package

Properties

• property Gateway as %External.Gateway;
Object representing instance of a specific connection to the external language server
• property Ptr as %Integer;
Left in for Fetch(), which isn't how we codegen FT TVFs anyway
• property ReaderObject as %Net.Remote.Object;

Methods

• method %Next(ByRef sc As %Library.Status = $$$OK) as %Library.Integer
Advance the result set cursor to the next row. Returns 0 if the cursor is at the end of the result set.. An optional argument contains a %Library.Status value on return. This %Status value indicates success or failure of the %Next call. %SQLCODE is also set by %Next.
• method %OnNew() as %Status
This callback method is invoked by the %New method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

• method Close(StopLanguageServer As %Boolean = 0) as %Status
Corresponds to *Close of TVF
• method CreateReaderObject(Server As %String, FTClassName As %String) as %Status
Creates an object of the class containing the functionality needed to access an external source. For now, these will be Java objects (to read CSV/external DBs through JDBC). 1) Create request string, which is used by the external code to connect to the relevant external source. 2) Instantiate the object, store it in ReaderObject property Called by %SQL.FDW.Common:Execute()
• method Execute(Server As %String, FTClassName As %String, Query As %String, Parameters As %List = "") as %Status
Corresponds to the *Execute of a TVF
• method Fetch(ByRef Row As %List, ByRef AtEnd As %Integer) as %Status
Corresponds to *Fetch of a TVF
• method GetRequestObject(Server As %String, FTClassName As %String) as %DynamicObject
Build and return request string used by Reader code for connecting to a database. For a file, Server host = abs. path to directory, Table = filename+extension, port & user & pass are all N/A
• method Reset() as %Status
Reset the result set back to the first row. Note this may entail a full re-execution depending on the specific implmentation of the foreign data wrapper.


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.