我正在尝试在pl/sql中使用指纹设备。我能够保存在Oracle数据库中的指纹,现在我想识别这个指纹。对于这一点,制造商已经为我提供了sdk,我想使用它的Java代码。为此,我写了一段Java代码如下:
import java.sql.*;
import oracle.jdbc.*;
import java.awt.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
import javax.swing.*;
import com.futronic.SDKHelper.*;
import java.util.Base64;
import java.util.Vector;
public class MainForm
{
public static String OnGetBaseTemplateComplete(String FPtemplate)
{
StringBuffer szMessage = new StringBuffer();
String StrTemplate = FPtemplate;
byte[] DecodeTemplate = Base64.getDecoder().decode(StrTemplate);
m_Operation = new FutronicIdentification();
((FutronicIdentification) m_Operation).Farn(245);
((FutronicIdentification) m_Operation).BaseTemplate(DecodeTemplate);
Vector<DbRecord> Users = (Vector<DbRecord>)m_OperationObj;
FtrIdentifyRecord[] rgRecords = new FtrIdentifyRecord[ Users.size() ];
for( int iUsers = 0; iUsers < Users.size(); iUsers++ )
rgRecords[iUsers] = Users.get( iUsers ).getFtrIdentifyRecord();
FtrIdentifyResult result = new FtrIdentifyResult();
int nResult = ((FutronicIdentification)m_Operation).Identification(rgRecords, result);
if (nResult == FutronicSdkBase.RETCODE_OK)
{
szMessage.append("Identification process complete. User: ");
if( result.m_Index != -1 )
szMessage.append(Users.get( result.m_Index ).getUserName() );
else
szMessage.append("not found");
} else {
szMessage.append( "Identification failed." );
szMessage.append( FutronicSdkBase.SdkRetCode2Message( nResult ) );
}
String StrMessage = szMessage.toString();
return StrMessage;
}
/**
* Contain reference for current operation object
*/
private FutronicSdkBase m_Operation;
private Object m_OperationObj;
}
但是问题是在其他Java文件中定义的函数,我不知道如何为PL/SQL定义这个绑定。例如代号
FtrIdentifyResult result = new FtrIdentifyResult();
FtrIdentifyResult本身是一个单独的Java文件,它具有函数,并且还定义了此函数。FutronicIdentification and Identification and. also.
或成直线
private FutronicSdkBase m_Operation
定义了FutronicSdkBase类型的变量,其中FutronicSdkBase是一个具有函数的单独Java文件。现在我如何为pl/sql定义这个呢?
1条答案
按热度按时间wfypjpf41#
您需要:
long
是数值数据类型,但在Oracle中,LONG
是(遗留)文本数据类型;所以在Oracle函数中,你希望NUMBER
而不是LONG
作为数据类型。java.lang.String
(注意大写字母)而不是string
。就像这样:
然后又道:
然后又道:
输出:
fiddle