Implementing object type methods

I am having some problems with the object type method implementation.
I have poured over the docs and so far they have lead me to a dead end each time.
I am trying to implement a pl/sql object with methods that map to methods in a corresponding java class. The code is as follows:
the java class:
package possystems.poseqdb;
public class ObjTypeCallSpecTest {
     private String teststring;
     public void mutateString() {
          this.testString = "the second value";
the oracle object type:
create type objecttesttype as Object (
teststring varchar2(255),
member procedure objtest as language java
     name 'possystems.poseqdb.ObjTypeCallSpecTest.mutateString()'
the anonymous pl/sql block calling the method:
declare
auth1 objecttesttype;
begin
auth1:=objecttesttype('the first string');
dbms_output.put_line('1 '||auth1.teststring||' 1');
auth1.objtest();
dbms_output.put_line('2 '||auth1.teststring||' 2');
end;
There is nothing fancy going on here. The problem I have is the auth1.objtest() call allways returns the following error:
1 the first string 1
declare
ERROR at line 1:
ORA-00932: inconsistent datatypes
ORA-06512: at "ANDRE.OBJECTTESTTYPE", line 0
ORA-06512: at line 6
Note the first line of output is the first dbms_output message indicating the object was properly instantiated.
Could someone please let me know what stupid little thing I have overlooked or have misunderstood from the oracle docs.
Andre

>
Use object types as data structures to be manipulated using packages, and ignore the type body possibility.
>
Well that would be throwing away a powerful part of the TYPE functionality.
The methods in the type body can be, and often are, used to provide multi-column validation to prevent the creation of invalid instances. A simple example is an ADDRESS_TYPE (e.g. ADDRESS1, ADDRESS2, CITY, STATE, ZIP) where a valid instance must have a value for each attribute except ADDRESS2 which might be optional.
The constructor and the methods in the body can perform validation to ensure that the components meet certain minimum requirements: not null, length (a 1 byte address wouldn't make much sense), character or numeric content, etc. A SET_ADDRESS1 method can also perform those validations.
That allows instances of those types to be used by PL/SQL code without repeated validation of the attributes. I use such basic TYPEs extensively in ETL and reporting processes. Even something as simple as a TYPE that has FROM_DATE and TO_DATE benefits by having constructor and body methods that prevent the attributes from being NULL and ensure that any TO_DATE is later than the FROM_DATE.

Similar Messages

  • Passing Ref Cursor as parameter to object type method

    I am encountering a problem passing a parameter of type REF CURSOR to methods of a set of object types I am developing.
    Here is an example of what I am trying to do:
    create or replace package p1 as
    type c_Cursor is ref cursor;
    end p1;
    create or replace type t_Object as object
    not instantiable method m1(p_Cursor in p1.c_Cursor) return varchar2
    ) not instantiable not final;
    create or replace type t_Subtype under t_Object as
    overriding method m1(p_Cursor in p1.c_Cursor)
    return varchar2
    The problem is that the PL/SQL compiler gives the error message PLS-00201 "p1.c_Cursor" not defined.
    According to my PL/SQL book (SF's Oracle PL/SQL Programming) the only way to use a ref cursor as a parameter to functions/procedures is to wrap them in a package. Indeed I have developed a test procedure in a different package that uses p1.c_Cursor as a parameter and it works fine.
    Oracle's documemtation suggests that object security (roles etc) can cause this error but as all the objects are being created in the same schema I don't see how this should be a problem.
    If anyone can suggest how to get around this problem I will be very grateful.
    BTW, if there are any mistakes in my sample code it's because I am writing it from memory as I don't have Internet access at work.
    Thanks,
    Charles.

    Thanks for your reply. I am still baffled as to why it doesn't work but, as you correctly point out, SYS_REFCURSOR works just fine. I figured that out earlier today and now the problem is solved.
    Charles.

  • How to access Business object type attribute from a method/function modul ?

    Hello,
    i have created a business object type object along with attributes and methods. Now inside the method i want to access the attributes. inside the method i am writing:
    data a type XXX.
    a = me->attribute
    this is creating a compilation error.
    Now the method is defined as a function module in some package, so can anyone inform me how to access object attributes from the function module ?
    pointes are awarded
    Regards

    Hello,
    thanks for your answer, but this too did not work, "=>" is for static attributes and the attributes i have are not static. Moreover, i tried it but it gave the same error :
    the abap error was when i was checking the code is :
    the type me=>documenttype is unknown
    as you know in SWO1 i created an object and when i create a method you link it to a function module and this is where you have the implementation of the method, so from this method how can i access the attributes on the main object that i created in SWO1
    regards

  • Methods inside object types WORKFLOW

    Hi workflow gurus
    I am trying to implement my own method in a subtyped object type, my requirement is that
    if a particular condition is true then a particular outcome should be active.
    For example
    begin_method mymethod changing container.
    select * from xxx where fff = ccc.
    case  xxx-ggg.
    when 'aaa'.
    //I want the corresponding outcome to be active
    when 'bbb'.
    //I want the corresponding outcome to be active
    endcase.
    end_method.
    these outcome should show up in my workflow step.
    Can any of the gurus help me out on this.
    Regards
    Narendiran Rathinavelu

    Hi,
    I am giving you sample code with which your issue will be resolved. in case if you have any problem please ask.
      CALL FUNCTION 'Y_WF_PREQ_AUTO_PO_CHG_POSSIBLE'
    EXPORTING                                                   P_BANFN   = OBJECT-KEY-PURCHASEREQUISITION   
      P_EKGRP   = OBJECT-KEY-PURCHASINGGROUP       
    TABLES                                                      T_EBAN_REDUC  =   T_EBAN_REDUC                     
      T_EKPO_REDUC  = T_EKPO_REDUC                     
      T_COMPARISON  = T_COMPARISON                     
      T_DIFFERENCE  = T_DIFFERENCE                     
      T_MESSAGES_TEXT = T_MESSAGES                       
      T_ENDORSER    = T_ENDORSER                       
    EXCEPTIONS                                                 PURCHASE_REQ_FIELD_EMPTY = 1                            
    NO_PURCHASE_REQ_DATA_FOUND = 2                            
      NO_PURCHASE_ORDER_DATA_FOUND  = 3                            
      FUNCTION_PROBLEM              = 4                            
      CURRENCY_CONVERSION_FAILED    = 5                            
      NO_ENTRY_IN_T024              = 6                            
      NO_VALID_BUYER_FOUND          = 7                            
      QTY_UNIT_CONVERSION_FAILED    = 8
      NOT_ALL_ITEMS_APPROVED        = 9
      ALL_CHANGED_REQ_ITEMS_DELETED = 10
      SEVERAL_PO_ITEMS              = 11.
    IF SY_SUBRC <> 0.                                                 
      CASE SY_SUBRC.                                              
        WHEN 1.                                                         
          EXIT_RETURN 9001 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4. 
        WHEN 2.                                                         
          EXIT_RETURN 9002 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4. 
        WHEN 3.                                                         
          EXIT_RETURN 9003 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4. 
        WHEN 4.                                                         
          EXIT_RETURN 9004 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4. 
        WHEN 5.                                                         
          EXIT_RETURN 9005 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4. 
        WHEN 6.                                                         
          EXIT_RETURN 9006 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4. 
        WHEN 7.                                                         
          EXIT_RETURN 9007 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4. 
        WHEN 8.                                                         
          EXIT_RETURN 9008 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4. 
        WHEN 9.                                                         
          EXIT_RETURN 9009 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4. 
    Also at Object's Method level you have to define the exceptions which the method can throw.
    now when you select the method in your task level, then exceptions defined at this method level will be shown at Task level.
    Thanks,
    sksingh

  • Exception '1250' is not defined for method 'CREATE' object type 'MESSAGE'

    Dear experts,
    I set up the document distribution (SWU3, backgroundjob SMTP, activated the workflows, flagged the linkages, etc). Now, I have still a error:
    Exception '1250' is not defined for method 'CREATE' object type 'MESSAGE'
    Does anyone know what the cause of exception 1250 could be?
    Thanks in advance and kind regards,
    Samuel

    hi,
    SAP ITS is SAP Internet Transaction Server which provides connection between SAP ERP system and html client.
    Check with bassis, i think TCP/IP or work station application not configured yet. i guess?
    Benakaraja
    ??P

  • Exception '1003' is not defined for method 'SENDTASKDESCRIPTION' object type 'SELFITEM'

    Hi All,
    Please help me in this. I am trying to send a mail when user rejected the item in his inbox. I am getting error like
    Exception '1003' is not defined for method 'SENDTASKDESCRIPTION' object type 'SELFITEM'. I tried so  many ways like no attachments,send express ,siganture,encryption all disabled but still the same error from user outbox who ever rejects it.
    Regards,
    Madhu.

    Hi Madhu,
    This exception is raised means you have checked the Signature check-box  and encrypt check box.
    Now you have unchecked that the issue should be solved , but if it is still giving the same exception synchronize your run time buffer using the t-code SWU_OBUF .
    Let me know if the issue is still there.
    Regards
    Bikas

  • Method 'PROCESS' is not defined for object type 'BUS2081'

    Hi All,
    I am using a workflow for incoming invoice approval using WS20001004. I prepared one version for this. The standard business methos bus2081 i delegated to zbus2081. Here i placed one decision step for reject or approve. In the same task in inbox i can see the document i can see as attachment. Now the issue is after seeing the attachment when i click on task in  my inbox it status is changed to red and i can  not process it further.In log i can see the error like Method 'PROCESS' is not defined for object type 'BUS2081'. This method i do not have in standard or in delegated one. I was struck here. Pleas help in this.
    Regards,
    Madhu.

    Hi,
    "Here i placed one decision step for reject or approve." if your workitem is based on standard user decision step type of workflow, then the business object in underlying task should be 'DECISION' and method should be 'PROCESS'. I think in the task you have put your custom business object instead of business object 'DECISION'. This could be the reason you are facing error.
    Regards,
    Ibrahim

  • Implementing First In First Out Behaviour Using PL/SQL object types

    Hi Friends,
    I have a Integer Array of type Varray, I want to implement first in first out behaviour using Pl/SQL object type.Please provide me some idea that i can proceed. If you can provide me any sample code or any documentation,i will be very much thankful to you.Eagerly waiting for your reply.
    Thanks

    basically i have to implement a queue using pl/sql object types to traverse a tree as we can implement stack (LIFO).
    I can give an example of Stack implementation...
    CREATE or replace TYPE IntArray AS VARRAY(50) OF INTEGER;
    CREATE or replace TYPE IntStack_O AS OBJECT (
    maximalSize INTEGER
    ,top INTEGER
    ,position IntArray
    ,MEMBER PROCEDURE initialize
    ,MEMBER FUNCTION full RETURN BOOLEAN
    ,MEMBER FUNCTION empty RETURN BOOLEAN
    ,MEMBER FUNCTION getAnzahl RETURN INTEGER
    ,MEMBER PROCEDURE push (n IN INTEGER)
    ,MEMBER PROCEDURE pop (n OUT INTEGER)
    CREATE or replace TYPE body IntStack_O AS
    MEMBER PROCEDURE initialize IS
    BEGIN
    top := 0;
    -- Call Constructor und set element 1 to NULL
    position := IntArray(NULL);
    maximalSize := position.LIMIT; -- Get Varray Size
    position.EXTEND(maximalSize -1, 1); -- copy elements 1 in 2..50
    END initialize;
    MEMBER FUNCTION full RETURN BOOLEAN IS
    BEGIN
    RETURN (top = maximalSize); — Return TRUE when Stack is full
    END full;
    MEMBER FUNCTION empty RETURN BOOLEAN IS
    BEGIN
    RETURN (top = 0); — Return TRUE when Stack is empty
    END empty;
    MEMBER FUNCTION getAnzahl RETURN integer IS
    BEGIN
    RETURN top;
    END;
    MEMBER PROCEDURE push (n IN INTEGER) IS
    BEGIN
    IF NOT full
    THEN
    top := top + 1; — Push Integer onto the stack
    position(top) := n;
    ELSE
    –Stack ist voll!
    RAISE_APPLICATION_ERROR(-20101, ‘Error! Stack overflow. ‘
    ||’limit for stacksize reached.’);
    END IF;
    END push;
    MEMBER PROCEDURE pop (n OUT INTEGER) IS
    BEGIN
    IF NOT empty
    THEN
    n := position(top);
    top := top -1; — take top element from stack
    ELSE
    –Stack ist leer!
    RAISE_APPLICATION_ERROR(-20102, ‘Error! Stack underflow. ‘
    ||’stack is empty.’);
    END IF;
    END pop;
    END;
    Now if i run this..i will be getting the following output...
    DECLARE
    stack intstack_o := intstack_o(NULL,NULL,NULL);
    a INTEGER;
    BEGIN
    stack.initialize;
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    stack.push(1111);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    stack.push(1112);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    stack.push(1113);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    stack.pop(a);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    dbms_output.put_line(a);
    stack.pop(a);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    dbms_output.put_line(a);
    stack.pop(a);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    dbms_output.put_line(a);
    stack.pop(a);
    dbms_output.put_line('Anzahl: ' || stack.getAnzahl);
    dbms_output.put_line(a);
    END;
    Output...
    Anzahl: 0
    Anzahl: 1
    Anzahl: 2
    Anzahl: 3
    Anzahl: 2
    1113
    Anzahl: 1
    1112
    Anzahl: 0
    1111
    Above is the Stack (Last In First Out) Implementations of integer array.Now my Requirement is Queue(First In First Out) Implementation of Integer array.

  • Extend abstract class & implement interface, different return type methods

    abstract class X
    public abstract String method();
    interface Y
    public void method();
    class Z extends X implements Y
      // Compiler error, If I don't implement both methods
      // If I implement only one method, compiler error is thrown for not
      // implementing another method
      // If I implement both the methods,duplicate method error is thrown by 
      //compiler
    The same problem can occur if both methods throw different checked exceptions,or if access modifiers are different..etc
    I'm preparing for SCJP, So just had this weired thought. Please let me know
    if there is a way to solve this.

    Nothing you can do about it except for changing the design.
    Kaj

  • PL/SQL Object Type - Java oracle.jbo.domain

    PL/SQL Object Type <-> Java oracle.jbo.domain
    can anybody help me, getting my domains to work?
    Following scenario:
    in pl/sql we have an object type called MULTI_LANGUAGE. This type is used for storing multilingual texts as nested table in one(!) column.
    So the object MULTI_LANGUAGE contains a member variable LANGUAGE_COLLECTION of type LANGUAGE_TABLE, which itself is a nested table of objects
    of the type LANGUAGE_FIELD (this again is only a language id and the corresponding content)
    Also the methods setContent(langID, langContent) and getContent(langId) are defined on Object MULTI_LANGUAGE.
    For example: Table having primary key, 2 other columns and one column of object type MULTI_LANGAGE (=nested table of objects)
    |ID|Column1|Column2|  multilingual Column  |
    |--|---------------------------------------|
    |  |       |       |  -------------------  |
    |  |       |       | | 1 | hello         | |
    |  |       |       |  -------------------  |
    |1 | foo   | bar   | | 2 | hallo         | |   <- Row Nr 1
    |  |       |       |  -------------------  |
    |  |       |       | | 3 | ola           | |
    |  |       |       |  -------------------  |
    |--|-------|-------|-----------------------|
    |  |       |       |  -------------------  |
    |  |       |       | | 1 | world         | |
    |  |       |       |  -------------------  |
    |2 | abc   | def   | | 2 | welt          | |   <- Row Nr 2
    |  |       |       |  -------------------  |
    |  |       |       | | 3 | ???  ;-)      | |
    |  |       |       |  -------------------  |
    |--|-------|-------|-----------------------|Now i've tried to modell this structure as an oracle.jbo.domain.
    class MultiLanguage extends Struct having this StructureDef:
    attrs[(0)] = new DomainAttributeDef("LanguageColl", "LANGUAGE_COLL", 0, oracle.jbo.domain.Array.class, 2003, "ARRAY", -127, 0, false, "campusonlinepkg.common.LanguageField");
    and
    class LanguageField extends Struct having this StructureDef:
    attrs[(0)] = new DomainAttributeDef("Id", "ID", 0, oracle.jbo.domain.Number.class, 2, "NUMERIC", -127, 0, false);
    attrs[(1)] = new DomainAttributeDef("Content", "CONTENT", 1, java.lang.String.class, 12, "VARCHAR", -127, 4000, false);
    Is there anything wrong with this StructureDef?
    When running the BC-Browser with -Djbo.debugoutput=console -Djbo.jdbc.driver.verbose=true parameters I get suspect warnings when browsing the records
    [196] Executing FAULT-IN...SELECT NR, NAME FROM B_THESAURI BThesauri WHERE NR=:1
    [197] SQLException: SQLState(null) vendor code(17074)
    [198] java.sql.SQLException: Ungültiges Namensmuster: XMLTEST.null
    ...snip: detail of stack...
    [240] SQLException: SQLState(null) vendor code(17060)
    [241] java.sql.SQLException: Deskriptor konnte nicht erstellt werden: Unable to resolve type "null"
    ...snip: detail of stack...
    [280] Warning:No element type set on this array. Assuming java.lang.Object.
    (XMLTEST is the name of the schema)
    Seems as if the framework can't read the TypeDescriptor or does not know which descriptor to read (XMLTEST.null??)
    Do I have to implement my own JboTypeMap?
    Please help, I'm stuck.
    Thanks in advance, Christian

    Thanks for your suggestion, but it seems to me as if there is one level missing.
    in pl/sql I have following structure:
    Struct MULTI_LANGUAGE (Object type) - outermost
      Array LANGUAGE_TABLE (nested table type)
        Struct LANGUAGE_FIELD (Object type simple) - innermostthe reason why i had to wrap another struct around the array was because it is not possible to define methods on a nested table. this is only possible on objects.
    on the outermost object type (which holds the array of language fields) I needed to define following 2 methods for direct access:
    getContent (langId in number) returns varchar2
    setContent (langId in number, langContent in varchar2)
    I would like to rebuild the same structure in java, because newly written java code should live in perfect harmony with legacy pl/sql code ;-)
    Both applications (Java and pl/sql) have to access the same data as long as migration to java goes on.
    Is this nested structure too much for a Domain?
    Any other suggestions?
    Thanks again, Christian

  • How to sort a Vector that stores a particular object type, by an attribute?

    Hi guys,
    i need help on this problem that i'm having. i have a vector that stores a particular object type, and i would like to sort the elements in that vector alphabetically, by comparing the attribute contained in that element. here's the code:
    Class that creates the object
    public class Patient {
    private String patientName, nameOfParent, phoneNumber;
    private GregorianCalendar dateOfBirth;
    private char sex;
    private MedicalHistory medHistory;
    public Patient (String patientName, String nameOfParent, String phoneNumber, GregorianCalendar dateOfBirth, char sex) {
    this.patientName = patientName;
    this.nameOfParent = nameOfParent;
    this.phoneNumber = phoneNumber;
    this.dateOfBirth = dateOfBirth;
    this.sex = sex;
    this.medHistory = new MedicalHistory();
    Class that creates the Vector.
    public class PatientDatabase {
    private Vector <Patient> patientDB = new Vector <Patient> ();
    private DateFunction date = new DateFunction();
    public PatientDatabase () throws IOException{
    String textLine;
    BufferedReader console = new BufferedReader(new FileReader("patient.txt"));
    while ((textLine = console.readLine()) != null) {
    StringTokenizer inReader = new StringTokenizer(textLine,"\t");
    if(inReader.countTokens() != 7)
    throw new IOException("Invalid Input Format");
    else {
    String patientName = inReader.nextToken();
    String nameOfParent = inReader.nextToken();
    String phoneNum = inReader.nextToken();
    int birthYear = Integer.parseInt(inReader.nextToken());
    int birthMonth = Integer.parseInt(inReader.nextToken());
    int birthDay = Integer.parseInt(inReader.nextToken());
    char sex = inReader.nextToken().charAt(0);
    GregorianCalendar dateOfBirth = new GregorianCalendar(birthYear, birthMonth, birthDay);
    Patient newPatient = new Patient(patientName, nameOfParent, phoneNum, dateOfBirth, sex);
    patientDB.addElement(newPatient);
    console.close();
    *note that the constructor actually reads a file and tokenizes each element to an attribute, and each attribute is passed through the constructor of the Patient class to instantiate the object.  it then stores the object into the vector as an element.
    based on this, i would like to sort the vector according to the object's patientName attribute, alphabetically. can anyone out there help me on this?
    i have read most of the threads posted on this forum regarding similar issues, but i don't really understand on how the concept works and how would the Comparable be used to compare the patientName attributes.
    Thanks for your help, guys!

    Are you sure that you will always sort for the patient's name throughout the application? If not, you should consider using Comparators rather than implement Comparable. For the latter, one usually should ensure that the compare() method is consistent with equals(). As for health applications it is likely that there are patients having the same name, reducing compare to the patient's name is hazardous.
    Both, Comparator and Comparable are explained in Sun's Tutorial.

  • DB Adapter - Calling Stored Procedure with Object Type

    So, we are using JDeveloper 10.1.3.3
    We are trying to create an ESB process that invokes a SP with an object type. However, the owner of the package / SP, is NOT the owner of the object type. When going through the DB Adapter wizard, it gives us the following error:
    When attempting to use the DB Adapter in JDeveloper to create a partner link to execute a stored procedure. JDeveloper returns the following error:
    Unable to import WSDL.
    Error while writing wsdl file
    Database type is either not supported or is not implemented.
    Check to ensure that the type of the parameter is one of the supported datatypes or that there is a collection or user defined type definition representing this type defined in the database.
    However, if I create a wrapper package / SP, it works just fine. I'd really like to not be having to create wrapper code for these SPs to work. Is this resolved in 11g? Is there a patch available for 10.1.3.3?
    I think this is a JDeveloper Wizard issue, but thought I'd post this here as well.
    Thanks,
    BradW

    This problem can be resolved by granting execute permission on the object type to the caller. For example, if the stored procedure is in schema1 and the object type is in schema2 then you would connect as schema2 and execute
    SQL> grant execute on <object type> to schema1
    Referencing object types defined in other schemas is documented. This is the described method for accessing object types in other schemas.

  • How can I sort a collection of array with different object types in it ?

    Hi all,
    I have a collection of ArrayList; each array contains, at the first position, the same object type.
    I'd like sorting the collection by the name contained in the object at the first position of each array.
    Any suggestion ?
    Cheers.
    Stefano

    so you have a collection of a collection?
    My guess is that:
    You could subclass the arraylist and override it's compareTo method (I think that it implements comparable already but if not, go ahead and implement that interface).
    Or you could wrap your arraylist in another class that implements comparable.
    The key in my mind is correctly coding your compareTo method to look at the name in the first item of the arraylists. This should be doable and not too difficult.
    Correction: after reviewing the ArrayList api, I see that it doesn't implement the Comparable interface. You will have to make any class that either inherits arraylist or contains arraylist implement the comparable interface.
    One last thing: This question would probably have been better off in the java forum and not the Swing forum since it doesn't really involve Swing.
    Good luck!
    Edited by: petes1234 on Nov 19, 2007 6:17 AM

  • Passing Object types using JDBC

    I need to pass Oracle user-defined object types in and out of
    PL/SQL stored procedures. Is this possible???
    Thanks
    null

    Hi Tina,
    I just had another thought. JDBC for 8.0 doesn't support
    user-defined SQL types. This feature isn't implemented until 8i.
    Sorry about the false lead!
    So you'd have to wrapper your object in another PL/SQL method
    which 'explodes' the user-defined type, as:
    procedure can_call_from_jdbc (ename varchar2, empno number, ...)
    is...
    begin
    call my_procedure(employee_t(ename, empno, ...));
    end;
    Pierre
    Oracle Product Development Team wrote:
    : Hi Tina,
    : Yikes! I'm glad you asked; it made me realize that some info
    : that's supposed to be posted on our external site is missing.
    I
    : think it'll take about a week to push this to our external
    site.
    : I'll try to find you a version and email it to you directly.
    : Thanks!
    : Pierre
    : Tina Creighton (guest) wrote:
    : : I'm currently using version 8.04 with Objects option, I'm
    : trying
    : : to locate the oracle.jpub class. Is there a way to download
    : the
    : : new jdbc that works with objects. Thanks. Tina
    : : Oracle Product Development Team wrote:
    : : : Absolutely!
    : : : the easiest thing is first to use JPub to generate a Java
    : : object
    : : : which is an analogue to the SQL object you have. For
    : example,
    : : : if your SQL object is called 'EMPLOYEE_T', you can invoke
    : JPub
    : : : with:
    : : : $ jpub -sql=employee_t -url=jdbc:oracle:oci8:@
    : : -user=scott/tiger
    : : : or even
    : : : $ java oracle.jpub.Main -sql=employee_t
    : -url=jdbc:oracle:oci8:@
    : : : -user=scott/tiger
    : : : This'll give you a Java class used to represent Java
    : instances
    : : of
    : : : the SQL 'employee_t', featuring friendly setters and getter
    : for
    : : : the fields.
    : : : If you have PL/SQL programs which take arguments of type
    : : : employee_t, such as:
    : : : PROCEDURE P1 (N NUMBER, E EMPLOYEE_T) IS...
    : : : PROCEDURE P2 (N NUMBER, E OUT EMPLOYEE_T) IS...
    : : : PROCEDURE P3 (N NUMBER, E IN OUT EMPLOYEE_T) IS...
    : : : You can call them in a SQLJ program as:
    : : : main () {
    : : : employee_t e; // the class generated by JPub
    : : : #sql {call P1(1, :e);}
    : : : #sql {call P2(2, :out e);}
    : : : #sql {call P3(3, :in out e);}
    : : : to call your three PL/SQL procedures. After the call to P2
    : and
    : : : P3, your
    : : : variable 'e' will be populated with the contents of the new
    : : : employee_t value
    : : : that was output from the PL/SQL method.
    : : : (SQLJ is just a shorthand way of calling JDBC. SQLJ
    programs
    : : are
    : : : translated
    : : : into SQLJ programs by calling the "SQLJ Translator":
    : : : $ sqlj myfile.sqlj
    : : : Pierre
    : : : Tina creighton (guest) wrote:
    : : : : I need to pass Oracle user-defined object types in and
    out
    : of
    : : : : PL/SQL stored procedures. Is this possible???
    : : : : Thanks
    : : : Oracle Technology Network
    : : : http://technet.oracle.com
    : Oracle Technology Network
    : http://technet.oracle.com
    Oracle Technology Network
    http://technet.oracle.com
    null

  • FIM Synchronization Service - How to provsion a group to another object type

    Hi,
    i'm new to fim and use just the fim2010 synchronization engine with some rules extensions.
    I have 2 ActiveDirectories and want to Provision a Group(used as Distribution list) from ActiveDirectory A as a contact object in ActiveDirectory B with the SMTP address of the Group as the targetaddress of the contact.
    Can you give me a hint how to accomplish that?
    Should i use the ShouldProjectToMV() Method in the rulesextension from the AD Connector of Domain A and out the Group as a Special mvtype? How do i join (what anchor to use) the Group to Domain B if i also sync normal contact objects as well?
    Thanks you for your help!

    If you want to decide that object is deleted you need to implement your de-provisioning logic. 
    De-provisioning logic should be implemented in Provision method as well. You need there something like:
    if(I_dont_have_contact_for_group)
    Provison_new_one
    } else
    if(do_I_Have_email_on_my_group_in_mv)
    No -> delete_contact_in_other_forest
    Depends on the target agent scope, if you have there other object types than contacts, you may want to implement Deprovision() method in agent extension to decide that contact should be deleted but other type of objects not.
    Tomek Onyszko, memberOf Predica FIM Team (http://www.predica.pl), IdAM knowledge provider @ http://blog.predica.pl

Maybe you are looking for

  • Can't connect to wireless using certificate with Andorid device

    Hi, I'm trying to connect to my wireless network using an android device with certificate but with no success. I'm using a WLC 4402 7.0.235.3 SSID Security (WPA2 Auth802.1X + CCKM) Logs from WLC (Cisco Controller) debug>*apfMsConnTask_0: Jan 03 08:26

  • Query and Device Collection by Department

    Hi all,   I am trying to figure out how to build a query and a device collection that is by department. In the administration of sccm 2012 sp1 I added the attribute "department" but I do not see a way to build a query that shows: user name/computer n

  • MAX corrupt? error -88302, odd DAQmx device list

    My ATE stopped working Sunday morning with an error (I didn't witness it) that led me to a corrupt NI-DMM driver.  I've had this happen a few times before so I repaired it (in MAX).  This didn't fix my ATE.  The sequence of events gets fuzzy here, bu

  • Word 2011 crashes when open file. No issue when creating new document.

    I can open word file and can create a new document. But I could not open a word sent from other people. Here is what I already did: - reinstall Office 2011 - Fixing the duplicate fonts. - Run the fix permission Here is the error I got.Could you pleas

  • Information Search Program on the Internet

    Hi all, Do you know any program written in Java that go on the internet and search for data that we specify. What kinda of java package am I supposed to look at if I want to write one. Thanks, TC