Hi - 

I am using JOOQ v2.4 to export an Oracle database package with method 
overloads and similar named methods and am experiencing compiler errors on 
the generated code. Here is an example of the package declaration. 
Following this is the generated Java code that has compile errors. I think 
the code generator is default naming the overloaded 'retrieve_binary' 
procedure to the same name as the 'retrieve_binary2' procedure. I'm going 
to try and work around this error by hopefully altering the default naming 
pattern for overloaded methods.

Peter

create or replace

package cwms_text

/**

 * Facilities for working with text in the database

 */

as

 

…

 

   /**

    * Retrieve binary from the database

    *

    * @param p_binary      The retrieved binary

    * @param p_id          A binary identifier of the binary to retrieve

    * @param p_office_id   The office that owns the binary. If not 
specified or NULL, the session user's default office is used

    */

   procedure retrieve_binary(

      p_binary       out blob, -- the binary, unlimited length

      p_id        in     varchar2, -- identifier used to store binary (256 
chars max)

      p_office_id in     varchar2 default null); -- office id, defaults 
current user's office

 

   /**

    * Retrieve binary from the database

    *

    * @param p_id          A binary identifier of the binary to retrieve

    * @param p_office_id   The office that owns the binary. If not 
specified or NULL, the session user's default office is used

    *

    * @return      The retrieved binary

    */

   function retrieve_binary(

      p_id        in     varchar2, -- identifier used to store binary (256 
chars max)

      p_office_id in     varchar2 default null) -- office id, defaults 
current user's office

      return blob;

 

   /**

    * Retrieve binary and associated information from the database

    *

    * @param p_binary      The retrieved binary

    * @param p_description The retrieved description

    * @param p_media_type  The MIME media type of the binary

    * @param p_file_extensions  A comma-separated list of file extensions, 
if any

    * @param p_id          A binary identifier of the binary to retrieve

    * @param p_office_id   The office that owns the binary. If not 
specified or NULL, the session user's default office is used

    */

   procedure retrieve_binary2(

      p_binary             out blob, -- the binary, unlimited length

      p_description        out varchar2, -- the description

      p_media_type         out varchar2, -- the MIME media type

      p_file_extensions    out varchar2, -- comma-separated list of file 
extensions, if any

      p_id              in     varchar2, -- identifier used to store binary 
(256 chars max)

      p_office_id       in     varchar2 default null); -- office id, 
defaults current user's office

 
==========================================


/**
 * This class is generated by jOOQ
 */
package db.oracle.packages;

/**
 * This class is generated by jOOQ.
 *
 * Convenience access to all stored procedures and functions in CWMS_TEXT
 */
@javax.annotation.Generated(value    = {"http://www.jooq.org";, "2.4.0"},
                            comments = "This class is generated by jOOQ")
public final class CwmsText extends org.jooq.impl.PackageImpl {

    private static final long serialVersionUID = 1281924837;

...


    /**
     * Call CWMS_20.CWMS_TEXT.RETRIEVE_BINARY
     *
     * @param pId
     * @param pOfficeId
     * @throws org.jooq.exception.DataAccessException if something went 
wrong executing the query
     */
    public static byte[] retrieveBinary2(org.jooq.Configuration 
configuration, java.lang.String pId, java.lang.String pOfficeId) {
        usace.cwms.db.oracle.packages.cwms_text.RetrieveBinary2 f = new 
usace.cwms.db.oracle.packages.cwms_text.RetrieveBinary2();
        f.setPId(pId);
        f.setPOfficeId(pOfficeId);

        f.execute(configuration);
        return f.getReturnValue();
    }

    /**
     * Get CWMS_20.CWMS_TEXT.RETRIEVE_BINARY as a field
     *
     * @param pId
     * @param pOfficeId
     */
    public static org.jooq.Field<byte[]> retrieveBinary2(java.lang.String 
pId, java.lang.String pOfficeId) {
        usace.cwms.db.oracle.packages.cwms_text.RetrieveBinary2 f = new 
usace.cwms.db.oracle.packages.cwms_text.RetrieveBinary2();
        f.setPId(pId);
        f.setPOfficeId(pOfficeId);

        return f.asField();
    }

    /**
     * Get CWMS_20.CWMS_TEXT.RETRIEVE_BINARY as a field
     *
     * @param pId
     * @param pOfficeId
     */
    public static org.jooq.Field<byte[]> 
retrieveBinary2(org.jooq.Field<java.lang.String> pId, 
org.jooq.Field<java.lang.String> pOfficeId) {
        usace.cwms.db.oracle.packages.cwms_text.RetrieveBinary2 f = new 
usace.cwms.db.oracle.packages.cwms_text.RetrieveBinary2();
        f.setPId(pId);
        f.setPOfficeId(pOfficeId);

        return f.asField();
    }

    /**
     * Call CWMS_20.CWMS_TEXT.RETRIEVE_BINARY2
     *
     * @param pBinary OUT parameter
     * @param pDescription OUT parameter
     * @param pMediaType OUT parameter
     * @param pFileExtensions OUT parameter
     * @param pId IN parameter
     * @param pOfficeId IN parameter
     * @throws org.jooq.exception.DataAccessException if something went 
wrong executing the query
     */
    public static usace.cwms.db.oracle.packages.cwms_text.RetrieveBinary2 
retrieveBinary2(org.jooq.Configuration configuration, java.lang.String pId, 
java.lang.String pOfficeId) {
        usace.cwms.db.oracle.packages.cwms_text.RetrieveBinary2 p = new 
usace.cwms.db.oracle.packages.cwms_text.RetrieveBinary2();
        p.setPId(pId);
        p.setPOfficeId(pOfficeId);

        p.execute(configuration);
        return p;
    }

Reply via email to