分不够(PM我即可)再加

解决方案 »

  1.   

    我是楼主在oracle中调用java存储过程,一般都是把java类的一个方法声明为oracle中的一个函数,如果这个java方法比较简单,比如值返回一个String,那么Oracle中的对应函数也就比较好处理,但是如果这个方法返回一个Custome Object,比如MyObject,那么Oracle中的函数该如何处理呢?
      

  2.   


    MMapping DatatypesMapping is setting up a correspondence between a PL/SQL datatype and a Java datatype.When you build a PL/SQL call spec, the PL/SQL and Java parameters, as well as the function result, are related by position and must have compatible datatypes. The following table lists all the datatype mappings currently allowed between PL/SQL and Java. If you rely on a supported datatype mapping, Oracle will convert from one to the other automatically.Legal Datatype Mappings
    OBJECT oracle.sql.STRUCT
    oracle.SqljData
    oracle.jdbc2.Struct

    REF oracle.sql.REF
    oracle.jdbc2.Ref

    TABLE, VARRAY oracle.sql.ARRAY
    oracle.jdbc2.ArrayOracle supports only automatic conversion for SQL datatypes. PL/SQL-specific datatypes, including BINARY_INTEGER, PLS_INTEGER, BOOLEAN, and index-by table types, are not supported. In those cases, you will have to perform manual conversion steps to transfer data between these two execution environments. 
      

  3.   

    你说的基本是这一种OBJECT      oracle.sql.STRUCT
                oracle.SqljData
                oracle.jdbc2.Struct