Determine whether the instance of the object is of a specific object class.

I was not able to find the answer in the documentation or in the forum. My terminology is perhaps a bit off (Java and c# background back to PL/SQL programming).

The general question is: given an object instance how to determine if the type of the instance is of the same kind as a specific object class.

In particular, I do a unit test and examine the returned object instance. The effective yield is described as follows

-This data structure contains a pointer to an LDAP session
SESSION OF SUBTYPE IS RAW (32);

I expect an instance of DBMS_LDAP. SESSION. To confirm this, I propose that the returned pointer DEREF and see if it's a type of DBMS_LDAP. SESSION. When this is confirmed, then I can further the return of reference.

Draft code is

BEGIN
IF DEREF ({RETURN$}) some_operator_which_compares_object_types DBMS_LDAP. SESSION
THEN
RETURN TRUE;
ON THE OTHER
RETURN FALSE;
END IF;
END;

where some_operator_which_compares_object_types is what I need to know.

Thank you for your help. And of course, the other way to do business and/or links to the correct location in the documentation are appreciated.

Kind regards
Bill

I think you are looking for [IS OF | http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions014.htm] condition.

SQL> create or replace type mytype as object(a number);
  2  /

Tipo creato.

SQL> declare
  2  x mytype := mytype(1);
  3  begin
  4  if x is of (mytype)  then
  5  dbms_output.put_line('OK');
  6  end if;
  7  end;
  8  /
OK

Procedura PL/SQL completata correttamente.

Max
[My Italian blog Oracle | http://oracleitalia.wordpress.com/2009/12/29/estrarre-i-dati-in-formato-xml-da-sql/]

Tags: Database

Similar Questions

  • Determine whether the application is running

    Hello

    I'm developing an application that will provide a background thread that calls a UIApplication.

    Is there anyway that I can determine this background thread if the UIApplication is already running?

    I tried to use Application.isAlive or isForeground, but I don't have this UIApplication instance in the background thread.

    In short, can anyone suggest how to determine whether the application is running from outside the application? (excuse the sentence wrong-box )

    Thanks in advance

    Bell

    Why do you not use DURATION for this store. Take a look at this article from BB that does something similar.

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800783/How_To _...

    Kind regards

    yosoh

  • EventID: 1206 Event Source: Active Directory Web Services ADWS failed to determine whether the computer is a global catalog server. What will be the solution for this.

    EventID: 1206 Event Source: Active Directory Web Services ADWS failed to determine whether the computer is a global catalog server. What will be the solution for this.

    Hi K jtm,.

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the TechNet Forum. You can follow the link to your question:
    http://social.technet.Microsoft.com/forums/en/category/WindowsServer/

  • How to determine whether the current operating system is windows, or MAC?

    How to determine whether the current operating system is windows, or MAC?

    CSparrow wrote:

    operatingSystem var = $.getenv ("OS");

    operatingSystem = operatingSystem.toString ();

    alert (operatingSystem);

    It gives me Windows NT Windows 10

    With the help of:

    alert($.os);
    

    works for me.

    (result: Windows/64 10.0)

    and the Silly-V code

    Folder.FS

    gives you the name of the operating system

  • Attention impossible to bind to property 'somevar' on the 'Object' class object is not an IEventDispatcher?'

    Hi all

    How to fix under WARNING:

    Attention impossible to bind to property 'somevar' on the 'Object' class object is not an IEventDispatcher

    Thank you

    Sunil Rana

    Hi Paul,.

    I found the solution on the net & here's news

    Cast the data in your itemrenderer as an objectProxy.

    itemRender.mxml

    http://www.Adobe.com/2006/mxml '.

    verticalScrollPolicy = "off".

    horizontalScrollPolicy = "off".

    creationComplete = "init (); » >

    Import mx.utils.ObjectProxy;

    [Bindable]
    public var dataProxy:ObjectProxy;

    private function init (): void {}
    dataProxy = new ObjectProxy (data);
    }
    ]]>
        

    Thank you

    Sunil Rana

  • Determine whether the host is virtual in the groovy script

    Hello

    I am writing a groovy script to extract data from our monitored SQL Server instances.  I would like to be able to differentiate between the n & b physical and virtual hosts.  I know that this should be possible since the database dashboard displays a different icon for both.  However, I can find what data item or property I'd look for his determination.

    I use the following code:

    dataSrv = server. DataService

    querySvc = server. QueryService

    topologyQuery = «!» DBSS_Instance ".

    objects = querySvc.queryTopologyObjects (topologyQuery)

    Need a way to determine whether each object is located on a physical or virtual host

    //...........

    Thank you.

    Thank you.  That pointed me in the right direction.  For those looking for the code, I use:

    ...

    topologyQuery = «!» DBSS_Instance ".

    objects = querySvc.queryTopologyObjects (topologyQuery)

    Objects.each {object->

    instance_name = object.name

    instance_host_name = object.real_mon_instance_name

    VM = 'physical '.

    vmQuery = «!» «VMWVirtualMachine where $host.name = ' "+ instance_host_name +»»»

    VM = querySvc.queryTopologyObjects (, vmQuery)

    If (vms.size () > 0) {}

    VM = "VM".

    }

    ...

  • Whether the object is a table, view, or synonym

    In our database, there are a lot of tables/views which have similar fields. I get confused about which is which. In addition, there a lot of synonyms. Are there sql commands to check where an object is a table, view, or synonym for a table/view? If it's a view created from a view, I would like to trace through the hierarchy and find root tables which provide the data.

    Thank you very much.

    Check DBA_OBJECTS to the name of the object type. For synonyms, you can check DBA_SYNONYMS and point of view, you can see DBA_VIEWS.

  • Test whether the object is Assigned() which means... not null

    In Delphi using the Windows SDK, I can use the Assigned() function to determine if an object has been instantiated... IOW, not null.  How this is done in ActionScript?  I've been going around in circles in the documentation.  I can find every keyword and the operator, but I can't find how to test a null object variable.

    If (MyDataGrid.selectedItem is not null) {.. my... code...}

    Thanks in advance.

    If (MyDataGrid.selectedItem! = null) {.. my... code...}

    or

    If (!.) MyDataGrid.selectedItem) {.. my... code...}

  • Unable to upgrade Windows Vista to 7, error: implementation could not determine whether the BitLocker Drive encryption is in use.

    Original title: Upgrade Vista - 7 and issue of Bitlocker.

    I'm upgrading stops priocess Vista-32 to Windows 7 family 32-bit and upgrade when checking report of compatibility as a result of the error message following: "implementation could not determine if BitLocker Drive Encryption is in use.

    I have established that my Vista is not only encryption, so I can't turn it OFF... it's weird I had myself far enough in before upgrading... always new problems affecting it right back

    Hello

    I suggest you try the steps suggested by Andre Da Costa replied on March 27, 2010. From the following link:
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-windows_install/Setup-was-unable-to-determine-if-BitLocker-Drive/7be7ac98-5e73-49e5-9636-179cf7b11b23

    See also: What is the difference between disabling BitLocker Drive encryption and decrypt the volume?

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-is-the-difference-between-disabling-BitLocker-Drive-encryption-and-decrypting-the-volume

  • Determine whether the application has permission to camera?

    I want to inform the user that the camera is not available until they turn on the camera permission.  However, the only permissions I don't see in the API is BBM and is not related.

    How do I know this?

    Have you tried to check the indicator of allCamerasAccessible: https://developer.blackberry.com/cascades/reference/bb__cascades__multimedia__camera.html#allcameras...

  • Statement of the object as the type

    Hello

    I just discovered a very basic thing on the statements of the subject and references after half a year of learning:
    It does not compile:
    Object o = new Dog(); 
    o.grrrr(); 
    Could someone point me to an article where it is explained in detail?

    I'm in the dark here, but I try a few questions:
    -What can and cannot be done with a typed object reference as an ancestor of the class of the object, it refers?
    -What are the advantages and disadvantages of do?
    -J' tried with an interface as type and I can't use the fields for the object being referenced there either, so this will only make good reference to all the?

    -I don't see why we can declare an object such as an interface type or ancestor if ultimately we cannot use this reference to reach the fields of the object.
    It is only in that way we can iterate over objects whose type can vary? But even in this case, we cannot use the fields throughout the iteration.

    Thank you very much in advance for any commments on this.

    lemonboston wrote:
    Hello

    I just discovered a very basic thing on the statements of the subject and references after half a year of learning:
    It does not compile:

    Object o = new Dog();
    o.grrrr(); 
    

    Could someone point me to an article where it is explained in detail?

    Varialbe o type is reference-object. Which is determined by the object o, at compile time. That's all the compiler cares when decide how o may be used.

    I'm in the dark here, but I try a few questions:
    -What can and cannot be done with a typed object reference as an ancestor of the class of the object, it refers?

    You can use a reference in a way that is consistent with its type of compilation. Note that you can get o the dog and then use the reference obtained as a reference-to-dog expression, but you generally won't go up if you don't have to.

    -What are the advantages and disadvantages of do?
    -J' tried with an interface as type and I can't use the fields for the object being referenced there either, so this will only make good reference to all the?

    Glasses for the coding of the interface. The general idea is, roughly speaking, 'all I care is that I have the list. I don't like which particular implementation of list is (ArrayList, LinkedList, etc.), so he does these things that promises to the interface of the to do list. The details of how it does are not important to me. "This gives you the flexibility and, for example, allows the provider from the list on the RIGHT side of the = to give you different implementations according to what is appropriate at this time here during execution.

    -I don't see why we can declare an object such as an interface type or ancestor if ultimately we cannot use this reference to reach the fields of the object.

    Each object of dog IS - YEAR and each ArrayList IS - A list and IS - AN object and Collection of IS - A, etc. Google for oriented object is a relationship and the liskov substitution principle

    This is really more general stuff OO Java stuff, even if of course Java, like other OO languages, has its own details as to how it supports these concepts.

  • Call the method of the object, the view object entity

    Hi all
    I use jdeveloper 11.2.1.0, and I need to call the method in the object class to view object entity class.
    Someone knows how to do?

    Thank you.

    http://andrejusb.blogspot.in/2009/11/calling-custom-entity-method-from-view.html

  • Superclass of the object

    Hello

    All java classes are a subclass of the object. Consider this scenario,
    class A {
    }
    class B extends A {
    }
    Now what of class B? Is also a subclass of the object?

    Thank you
    RAM

    RAM wrote:

    Kayaman wrote:

    RAM wrote:
    I mean

    Object     A
    \    /
    B
    

    Isn't multiple inheritance?

    No matter what it is, it is something that cannot be done in Java.

    Can you tell the difference between the two great classes?

    The difference is: this particular case can be done in Java.

    So, in this case, can we say class B is not a subclass of the Object class?

    It seems that you were not attentive at all.

    Once again:

    Multiple inheritance (of implementation):
    NOT supported by Java
    -----------------------------------------
    class A {}
    class B {}
    class C extends A, B {}
    
      A   B
       \ /
        C
    
    NOT Multiple inheritance
    Supported by Java
    -----------------------------------------
    class A{}
    class B extends A{}
    class C extends B{}
    
     A
     |
     B
     |
     C
    

    In both cases, C is a subclass of A, and C is also a subclass of B.

    In addition, in both cases, A, B, and C are all subclasses of object. As we have already said in the other thread, which prompted to create this thread (but still somehow apparently ignored by you), every class is a subclass of the object.

  • Actual mechanism of object class as the superclass for all classes

    Hi all

    We know that all the classes of the java platform are the descendants of the object class. Even if we write a new class, in the absence of any explicit superclass, each class is implicitly a subclass of the object. As we expand it, not directly the object class, then how is the methods of the object are inherited from the class Sub that we wrote? How the java to maintain this hierarchy?

    Can you please explain this carefully?

    Thanks in advance,
    Uday

    Udaya Shankara Gandhi wrote:
    Hi all

    We know that all the classes of the java platform are the descendants of the object class. Even if we write a new class, in the absence of any explicit superclass, each class is implicitly a subclass of the object. As we expand it, not directly the object class, then how is the methods of the object are inherited from the class Sub that we wrote? How the java to maintain this hierarchy?

    Because the language is defined in this way. Compilers implement the language according to the rules of the DG JLS. Exactly how they do it is not defined. It is each compiler. As long as it respects the rules defined in the JLS to the code analysis and generate the .class file, that's all that matters. However, somewhere in the compiler's code which is about:

    if (class has an extends clause) {
      generate corresponding bytes for extends in .class file
    }
    else {
      generate bytes for extends java.lang.Object in .class file
    }
    

    No great mystery, or philosophical question.

  • Why the method clone() in object class as a "protected"?

    Hello

    Why in the object class's clone() method declared as a 'protected access modifier '? What is a reason for this? Why not she declared as a 'public' as equals() and hashCode() method?

    Thanks in advance
    Rishi

    RishiM wrote:
    If it is declared public in the object class then what happens? is no difference?

    Read my previous post. If the object has a public clone() method, then each class has it, and it will be public for each of them.

    Winstoon

Maybe you are looking for

  • 0X007C9C98 error code

    Hi, I get the 0X007C9C98 error code and the printer does not respond to what either. Start-up. Removal of power. Always the same code. What can I do? Thank you

  • Can I transfer my data TEMP and TMP with a RAMDisk?

    Hello I have a virtual drive on my computer Setup and want to know if I'll run any problems if I move my windows TEMP directory to it?

  • Invalid password error on Webex Cloud Connector

    HelloI talked with support, but it has been a slow process, hoping that someone encountered the same issue.I'm cloud webex connector configuration.  When you connect to the charger, I get an error "invalid password." The user name and password are co

  • Question about lane change InDesign need help

    Hi experts,I want to find and reject the lane change, changeType.DELETED_TEXT., and reject it.How can I do that.How to make the script below work?Respect ofJohnindesign #targetmyDocument var = app.documents.item (0);var myDocument.stories.item = mona

  • RAID 0 worth it?

    HelloI have a question for raid 0 and Lightroom (and some light photoshop).  I foresee moving my photo to a disk external usb 3 and now, I was wondering if I purchase only a single drive or two drives in raid 0. You should know that the catalog and t