Using inherited methods (Quick Question)

If I have a subclass that extends a parent class, do I have to use the methods that are inherited from the parent class or can they be ignored? For example, I inherit getArea and getVolume, but I am only interested in using getArea in my subclass, can I just ignore getVolume and not do anything with it? Or is there something I have to do to block its use? Also, does the same go for the attributes that are inherited via the constructor when autogenerate the inherited constructor? Thanks!

NPP83 wrote:
If I have a subclass that extends a parent class, do I have to use the methods that are inherited from the parent class or can they be ignored? For example, I inherit getArea and getVolume, but I am only interested in using getArea in my subclass, can I just ignore getVolume and not do anything with it?I think the more pertinent question is: are they correct? You might be able to subclass a cube with a square (they both only require a side length), but the getVolume method would be patently incorrect for a square.
Or is there something I have to do to block its use?UnsupportedOperationException is the most normal.
Also, does the same go for the attributes that are inherited via the constructor when autogenerate the inherited constructor?Erm....???? If you mean, do you inherit attributes, the answer is: yes(***), unless they're private.
Winston
(***) Actually 'maybe', if they're default-visibility.

Similar Messages

  • Can't use inherited method with JButton

    I am trying to use the getActionListeners() method on a JButton. The method is inherited from the AbstractButton class. However, when I try to compile with this line...
    ActionListener CurrentListeners[] = OKButton.getActionListeners();I get the following error:
    Method getActionListeners() not found in class javax.swing.JButton.
    I am also using the removeActionListener() method, which is inherited from the same object, and the compiler has no problem with that!

    Okay, then does anyone know how I can change the
    ActionListener for a JButton? I want to use the
    removeActionListener(ActionListener l) method and then
    addActionListener(...). However, since I can't get
    the current ActionListener, I have nothing to pass
    into the remove method.It's my belief that's this is why this method was added to AbstractButton in JDK 1.4. It makes life so much easier. Why don't you download the JDK 1.4 and install it into your IDE?
    Otherwise, you should subclass JButton as someone else suggested and provide an accessor method for the listener.

  • Overriding Methods quick  question

    If you override a method from a parent class by creating a method in a derived class, would it be possible to call the overridden method from the parent class?
    I don't think it can be done. However I'm also thinking that you can use super() while specifying the correct arguments. I'm stuck and I'm not sure which one is right???

    Are you looking for super.method(...)? Because that works.
    super(...) is a super-class constructor.

  • Quick Question: When to use ( ) and when to use [ ] and why the ( *)

    Hi all,
    A quick question that i'm sure is very simple but is slightly confusing me. I've just started trying to learn Objective-C and am a little confused by ( ) and [ ].
    I get that you use the [ ] brackets when you want something specific from an object, i.e.
    [ textField textColor ]
    and that you use ( ) brackets for things like:
    if ( x == y) {
    But I get confused when I see things like:
    NSLog(@"some text here");
    Why does that get ( ) brackets and why is it not [ ].
    Also another point of confusion, creating methods... Why are some methods done like:
    - (void)awakeFromNib
    And others done like (with the additional "*" added):
    - (NSString *)stringvalue
    As I said, I'm sure this is very simple and obvious, but it is confusing me slightly.
    Thanks in advance!

    Adam:
    As you already know, square brackets are used to send a message to an object, so if a object like myObject implements the method -doSomething, you can call it with:
    \[myObject doSomething\];
    The other use square for brackets have is to index C-style arrays, such as:
    aValue = anArray\[10\]; // Get the 10-element of an array
    However, because C-style arrays are rarely used in Cocoa applications (use NSArray instead) you will not see this situation often.
    Parenthesis in expressions are used to group and prioritize, such as:
    x = 10 * (3 + 5); // x = 80
    If () statements use it to delimit the test expression. Same with while (). for () uses it to enclose the limits and increment statements, etc.
    The other important use of parenthesis is in calling a C function:
    result = foo(3);
    means that you are calling the function named foo with the argument 3, and storing the the return value in the variable 'result'. This is different from a message because a C function is not a method of an object. They exist independently of any objects. NSLog() is a function defined within Cocoa but it is not a method. So, you call it with the traditional C function call syntax. Cocoa defines other functions like NSStringFromRect(), which takes an NSRect as argument and returns a pointer to an NSString.
    And that leads me to your last question. Some methods return simple types, like int, float, or void (i.e. returns no value). These methods will have prototypes like:
    \- \(void\)returnNothing;
    \- (int)returnInteger;
    Other methods return pointers to types, like:
    \- (int \*)returnPointerToInteger;
    \- (void \*)returnPointerToAnything; // In obj-C one typically uses id instead of void*
    Returning whole objects from methods has problems and it is better to just return a pointer (the address in memory) instead:
    \- (NSString *)makeAString;
    The method above returns a pointer to an NSString rather than the entire object.
    Good luck with your learning,
    Juan-Pablo
    Message was edited by: Juan Pablo Claude

  • Hi, I have quick question about use of USEBEAN tag in SP2. When I specify a scope of SESSION for the java bean, it does not keep the values that I set for variable in the bean persistent.Thanks,Sonny

     

    Make sure that your bean is implementing the serializable interface and that
    you are accessing the bean from the session with the same name.
    Bryan
    "Sandeep Suri" <[email protected]> wrote in message
    news:[email protected]..
    Hi, I have quick question about use of USEBEAN tag in SP2. When I
    specify a scope of SESSION for the java bean, it does not keep the
    values that I set for variable in the bean persistent.Thanks,Sonny
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • [svn:fx-trunk] 10891: Fix for ASDoc throws error when using getter methods for pseudo-inheritance of static constants

    Revision: 10891
    Author:   [email protected]
    Date:     2009-10-06 09:46:47 -0700 (Tue, 06 Oct 2009)
    Log Message:
    Fix for ASDoc throws error when using getter methods for pseudo-inheritance of static constants
    QE notes: None.
    Doc notes: None
    Bugs: SDK-22676
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22676
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocUtil.java

    Have you tried using com.adobe.air.crypto.EncryptionKeyGenerator instead?

  • Hi guys. Just a quick question. My wife has a Mac Book Pro and when she is browsing the web she can use a two fingered gesture to go back to her previous page (by swiping from right to left). Is there any way to set that up on my iPad Mini. Many thanks.

    Hi guys. Just a quick question. My wife has a Mac Book Pro and when she is browsing the web she can use a two fingered gesture to go back to her previous page (by swiping from right to left). Is there any way to set that up on my iPad Mini. Many thanks.

    Not in the Safari browser she can't. That is not supported on the iPad. There are other mobile browsers that do have that functionality - one is iCab Mobile.
    https://itunes.apple.com/us/app/icab-mobile-web-browser/id308111628?mt=8

  • Redefinition / Overwriting of inherited method using class-builder

    Hi,
    I have a class which inherits some methods from it's baseclass. I want so overwrite ( re-define ) some of the methods from the baseclass using se80 / se24.
    How can this be done ?
    Best Regards,
    Frank

    Hi,
    <b>go se80</b> 1) enter the class name which u have inherited from the base class
    2) in the herarchy ...methods---->Inherited Methods
    3) right click on the method which u have to redifine.
    4) select redifine option.
    5) ur method will be placed under redifination list.
    6) go write the code
    note :- U cannot redifine final Method...Appropriate message will be shown
    save and activate.
    Mark Helpful answers
    Message was edited by: Manoj Gupta

  • Interface/Method question (how to use the method insert_table)

    Hi people!
    I'm working with DOI (desktop office integration).
    So far I've been able to reflect flat variables from my ABAP program into a Word Doc, but when it comes to internal tables I'm not sure how to achieve this.....
    I find out in the interface i_oi_word_processor_document the method insert_table, but I can't find a single simple example on how to use it....
    If no one knows how to use this method, does anyone know how to reflect an internal table fron my program into a Word Doc by another mean?
    Thanks in advance!!!
    Regards,
    Laura

    Hi Laura
    If you want you can use direct OLE calls. For this, you can refer to the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c1d54348-0601-0010-3e98-bd2a2dcd9e6c">"An Easy Reference For OLE Automation"</a> published at SDN.
    Kind Regards
    *--Serdar
    [email protected]

  • BUG? @Transactional doesn't work on inherited methods

    Hi all,
    I have to state an odd behaviour:
    I have a DAO interface :
    public interface UserDAO
    ..public User save(User user);
    In my application I have to use this UserDAO interface to rebuild the DAO layer with a Toplink database access. The new UserDAO implementation is injected into the original ServiceLayer. The according UserService looks like :
    public interface UserService
    ..public User save(User user);
    And the implementation :
    public class UserServiceImpl
    ..protected UserDAO userDAO;
    ..public User save(User user)
    ....userDAO.save(user);
    ..public setUserDAO(UserDAO userDAO)
    ....this.userDAO = userDAO;
    However, until I can save my user objects with Toplink I have to annotade the UserService as transactional. Therefore I would write a new UserService class, exending from the original one, like this :
    import org.springframework.transaction.annotation.Transactional;
    @Transactional
    public class TransactionalUserService extends UserServiceImpl
    And thats all, since I can inject my JPA UserDAO into this TransactionalUserService and everything will work right.
    --> BUT NO ! In this case nothing happens transactional. It only works, when I rewrite the UserService. Then I have :
    @Transactional
    public class TransactionalUserService implements UserService
    ..private UserDAO userDAO;
    ..public User save(User user)
    ....userDAO.save(user);
    ..public setUserDAO(UserDAO userDAO)
    ....this.userDAO = userDAO;
    Now my user objects are stored into the database. But why only in this case and not with inherited methods ?

    Spring is the one managing your transactions and @Transactional is a Spring annotation so you might get a quick answer to your question on the Spring Data Access Forum.
    That being said, instead of subclassing UserServiceImpl just to add @Transactional you could instead use <tx:advice> in your Spring XML configuration to make UserServiceImpl transactional.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Two quick questions about Library after moving beginning on a new computer

    Hi there,
    I just moved from Windows to Mac, meaning I had to move my iTunes library from the old PC to my new MBA.
    Just a couple of quick questions.
    1. When I started iTunes on my new Mac, in the preferences I directed the media folder to the folder with all my itunes music/podcasts etc, and then I imported the Library XML file.  Is this incorrect? Should I have imported a different file? Should I have used the itl file instead? 
    If so, should I delete the library and start again?  (if this is the case, please suggest the best way of doing this without affecting my media)
    - a kind of sub-question to this one:  some of the media files arent showing up in the iTunes library, but they are in the media folder on the ext HDD.  Is there a way I can find out which ones havent been recognized by iTunes?  Whats the best way of getting them in to my library?
    2. Pretty much half of my podcasts have not been loaded in the new iTunes.  The ones that havent were ones that I subscribed to on my iPhone, whereas the ones that show up in iTunes were ones I downloaded from iTunes.  When I connect my iPhone and sync it with iTunes, will those podcasts show up in iTunes?  Or is there a risk that they will be deleted from my iPhone?
    Cheers,

    The .xml is lacking some information such as ratings, date added, and play count.  Using the .itl includes this information but cannot be imported using the method you did.
    A complete library is everything in the iTunes folder.  By using the method you did you left the artwork behind in the artwork folder on the other machine.
    Selecting the media folder in preferences does not get iTunes to recognize the media.  All it does is tell iTunes to start storing new media in that location.
    Using the method I outlined nothing will be missed (with the exception of WMA) because you aren't rebuilding your library, you are using the one that already exists.
    You don't have to re-copy everything as long as you get the stuff you missed and re-assemble it all as it was before except not on the Mac.
    What are the iTunes library files? - http://support.apple.com/kb/HT1660
    More on iTunes library files and what they do - http://en.wikipedia.org/wiki/ITunes#Media_management
    What are all those iTunes files? - http://www.macworld.com/article/139974/2009/04/itunes_files.html
    Where are my iTunes files located? - http://support.apple.com/kb/ht1391

  • Window inheritance problem, implementation question

    This is a multi-part message in MIME format.
    --------------F5AF60803BB8EFA34C8D4288
    Content-Type: multipart/alternative;
    boundary="------------24CDBE5DFBEC0C4205C15C80"
    --------------24CDBE5DFBEC0C4205C15C80
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Hi!
    I have a window inheritance and implementation question. I'm using
    Forte 3.0.J.1.
    I have a super (base) window with a PushButton on it. I want to
    handle the Click event of the button in this super window therefore
    I create an event handler.
    <MyBtn> : PushButton
    I create a sub window inheriting from the previous super window.
    I put some data widgets on it and group all of them (the inherited
    button as well) into a GridField. When I set the mapped type of the grid
    the name of the inherited PushButton widget changes:
    <MainGrid.MyBtn> : PushButton
    When I run the application I get a SystemException with the
    message:
    Attempt to register an event on a NIL object (qqds_C_FieldWidget, 10).
    Traceback:
    SuperWindow.EH at line 0
    SubWindow.Display at line 5
    C++ Method(s)
    UserApp.Run at offset 105
    It is quite understandable that in runtime there is no widget called
    <MyBtn>
    and the event handler of the super class fails.
    But what I don't know : after specifing a mapped type of a GridField why
    changes
    the name of those widgets that haven't got mapped type e.g.: PushButton,
    PictureButton etc.
    How to solve this situation?
    I made a sall example which i send in attachment.
    Thanks for any help and advice in advance...
    Attila Racz Lufthansa Systems
    Hungary
    BUD LSYH
    E-mail: [email protected] .-``'.
    Tel.: (36 1) 431-2910 .` .' Mazsa ter 2-6.
    Fax : (36 1) 431-2977 _.-' '._ H-1107 Budapest,
    Hungary
    --------------24CDBE5DFBEC0C4205C15C80
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>
    <tt>    Hi!</tt><tt></tt>
    <p><tt>I have a window inheritance and implementation question. I'm using</tt>
    <br><tt>Forte 3.0.J.1.</tt><tt></tt>
    <p><tt>I have a super (base) window with a PushButton on it. I want to</tt>
    <br><tt>handle the Click event of the button in this super window therefore</tt>
    <br><tt>I create an event handler.</tt><tt></tt>
    <p><tt>&lt;MyBtn> : PushButton</tt><tt></tt>
    <p><tt>I create a sub window inheriting from the previous super window.</tt>
    <br><tt>I put some data widgets on it and group all of them (the inherited</tt>
    <br><tt>button as well) into a GridField. When I set the mapped type of
    the grid</tt>
    <br><tt>the name of the inherited PushButton widget changes:</tt><tt></tt>
    <p><tt>&lt;MainGrid.MyBtn> : PushButton</tt><tt></tt>
    <p><tt>When I run the application I get a SystemException with the</tt>
    <br><tt>message:</tt><tt></tt>
    <p><tt>Attempt to register an event on a NIL object  (qqds_C_FieldWidget,
    10).</tt>
    <br><tt>      Traceback:</tt>
    <br><tt>          SuperWindow.EH
    at line 0</tt>
    <br><tt>          SubWindow.Display
    at line 5</tt>
    <br><tt>          C++ Method(s)</tt>
    <br><tt>          UserApp.Run
    at offset 105</tt><tt></tt>
    <p><tt>It is quite understandable that in runtime there is no widget called
    &lt;MyBtn></tt>
    <br><tt>and the event handler of the super class fails.</tt><tt></tt>
    <p><tt>But what I don't know : after specifing a mapped type of a GridField
    why changes</tt>
    <br><tt>the name of those widgets that haven't got mapped type e.g.: PushButton,</tt>
    <br><tt>PictureButton etc.</tt><tt></tt>
    <p><tt>How to solve this situation?</tt>
    <br><tt>I made a sall example which i send in attachment.</tt><tt></tt>
    <p><tt>Thanks for any help and advice in advance...</tt><tt></tt>
    <p><tt>---------------------------------------------------------------------------</tt>
    <br><tt> Attila Racz                                    
    Lufthansa Systems Hungary</tt>
    <br><tt>                                                
    BUD LSYH</tt>
    <br><tt>E-mail: [email protected]      
    .-``'.</tt>
    <br><tt>Tel.: (36 1) 431-2910               
    .`   .'     Mazsa ter 2-6.</tt>
    <br><tt>Fax : (36 1) 431-2977           
    _.-'     '._    H-1107 Budapest, Hungary</tt>
    <br><tt>---------------------------------------------------------------------------</tt>
    <br><tt></tt> </html>
    --------------24CDBE5DFBEC0C4205C15C80--
    --------------F5AF60803BB8EFA34C8D4288
    Content-Type: application/x-zip-compressed;
    name="Inh.zip"
    Content-Transfer-Encoding: base64
    Content-Disposition: inline;
    filename="Inh.zip"
    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
    --------------F5AF60803BB8EFA34C8D4288--

    import javax.swing.JOptionPane;
    public class Test{
         public static void main(String[] args)
              String newItem = "Item";
              float newSerial = 4234;
              float newCode = 3424;
              int newBase = 1000;
              boolean YesWarranty = true;
              boolean NoWarranty = true;
              Machinery test1 = new Machinery(newItem, newCode, newSerial, newBase, YesWarranty, NoWarranty);
              JOptionPane.showMessageDialog(null, "Item: " + test1.getItem() + " Serial: " + test1.getSerial() + " Code: " + test1.getCode()
              + " Warranty: " + test1.IncludeWarranty() + " No Warranty: " + test1.ExcludeWarranty()+ " Base: " + test1.getPrice());
    }Tested with this and it seems to be ok?
    Changed my final code too because it seemed to always add the 10% whether YesWarranty was true or false, so made it
              if (TrueWarranty==true) //There is a warranty, it returns the base price plus 10%
                   return (base+((base/100)*10));May have posted here too early if it does work, but there is another part so if ive trouble with that il be back :P
    Edited by: dave_the_bear on 16-Nov-2010 07:17
    Changed base to double and used the *0.1 method

  • How can I access the protected inherited method

    Hi guys:
    I know I can use getDeclaredMethod to get some methods,but my question how can I get a protected inherited method? for example
    class A{
    protected void test(){}
    class B extends A{
    public String getValue(){}
    class C{
    public static void main(Strin[] args){
    //at here I want to access "test" method by reflection,but I dont know how?
    thanks advance!

    Indeed it does. If you want to find the declared methods of the superclass then you should be able to figure out how to do that: find the superclass, find its declared methods.

  • Quick Question **PLEASE HELP** .jar file?

    Hey everyone, im pretty new to the java scene but I have a really quick question that hopefully someone can help me with.
    I'm really interested in making a .jar file out of my code. And basically I just want to make one. but i understand there are certain things like main class's, etc. that need to be made in order to make a .jar file.
    So basically Say I opened up a new project in blueJ. I made 1 new class called "main." Inside of it I had nothing for conductors and no variables declaired untill the bottom part where i write my code.
    say i write...
    System.out.println("hello");
    and that is it.
    What steps from there do i do to make a jar file and have it be able to be executed and SEE the "hello" printed somewhere NOT in blueJ??
    (I understand there is something about a "static" method? Im not really sure but if somoene could enlighten me on how to make a .jar file that would be great.)
    Thanks a lot everyone!
    Tom

    I don't know anything about BlueJ, but this section of Sun's tutorial explains how to
    write a program that outputs a single line of text to the console:
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
    Deploying an application as an executable .jar file is covered here:
    http://java.sun.com/docs/books/tutorial/deployment/jar/index.html
    The first two sections - "Using JAR Files: The Basics" and "Working with Manifest
    Files: The Basics" - contain the information you need to understand this process.

  • Quick question on how CBO determines hows to access table partitions

    Hey all,
    I have a large table that is range partitioned on a "code" within the table (about 23 unique values). I'm able to query it very quickly and easily when I specify the code in a query... ie:
    select *
    from large_table
    where code = 'X'
    However, I am looking to calculate the code based on a reference table that I have. I can easily re-create the performance drop doing:
    select *
    from large_table
    where code = (Select 'X' from dual)
    When running the 2nd SQL, my query takes a very long time. I think I understand why (CBO can't "guess" the results of the subquery) and I understand that the easiest to fix this would be to just run the subquery first and pass its results to a second query.
    My question is if anyone knows of a way to provide the CBO a hint or any other trick that would allow Oracle to scan a single partition instead of the whole table using a method like this?

    Thanks Tubby, that link at least helps confirm my original reasoning for the degraded performance and appears to be for similar reasons
    As for the explain plans, here they are:
    (Slow Query -- Object names have been changed)
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 413 | 219K| | 18794 (1)| 00:03:46 | | | | | |
    | 1 | PX COORDINATOR | | | | | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10013 | 413 | 219K| | 18794 (1)| 00:03:46 | | | Q1,13 | P->S | QC (RAND) |
    |* 3 | HASH JOIN RIGHT SEMI BUFFERED | | 413 | 219K| | 18794 (1)| 00:03:46 | | | Q1,13 | PCWP | |
    | 4 | BUFFER SORT | | | | | | | | | Q1,13 | PCWC | |
    | 5 | PX RECEIVE | | 2 | 8 | | 15 (7)| 00:00:01 | | | Q1,13 | PCWP | |
    | 6 | PX SEND HASH | :TQ10003 | 2 | 8 | | 15 (7)| 00:00:01 | | | | S->P | HASH |
    | 7 | VIEW | VW_NSO_1 | 2 | 8 | | 15 (7)| 00:00:01 | | | | | |
    | 8 | VIEW | view_ref_table | 2 | 26 | | 15 (7)| 00:00:01 | | | | | |
    |* 9 | TABLE ACCESS FULL | ref_table | 2 | 22 | | 15 (7)| 00:00:01 | | | | | |
    | 10 | PX RECEIVE | | 4543 | 2391K| | 18779 (1)| 00:03:46 | | | Q1,13 | PCWP | |
    | 11 | PX SEND HASH | :TQ10012 | 4543 | 2391K| | 18779 (1)| 00:03:46 | | | Q1,12 | P->P | HASH |
    |* 12 | HASH JOIN | | 4543 | 2391K| | 18779 (1)| 00:03:46 | | | Q1,12 | PCWP | |
    | 13 | BUFFER SORT | | | | | | | | | Q1,12 | PCWC | |
    | 14 | PX RECEIVE | | 11 | 187 | | 5 (0)| 00:00:01 | | | Q1,12 | PCWP | |
    | 15 | PX SEND BROADCAST | :TQ10002 | 11 | 187 | | 5 (0)| 00:00:01 | | | | S->P | BROADCAST |
    |* 16 | TABLE ACCESS FULL | threshold_table | 11 | 187 | | 5 (0)| 00:00:01 | | | | | |
    |* 17 | VIEW | | 430K| 214M| | 18774 (1)| 00:03:46 | | | Q1,12 | PCWP | |
    | 18 | WINDOW SORT | | 430K| 130M| 280M| 18774 (1)| 00:03:46 | | | Q1,12 | PCWP | |
    | 19 | PX RECEIVE | | 430K| 130M| | 18772 (1)| 00:03:46 | | | Q1,12 | PCWP | |
    | 20 | PX SEND HASH | :TQ10011 | 430K| 130M| | 18772 (1)| 00:03:46 | | | Q1,11 | P->P | HASH |
    |* 21 | HASH JOIN BUFFERED | | 430K| 130M| | 18772 (1)| 00:03:46 | | | Q1,11 | PCWP | |
    | 22 | BUFFER SORT | | | | | | | | | Q1,11 | PCWC | |
    | 23 | PX RECEIVE | | 7332 | 157K| | 16 (13)| 00:00:01 | | | Q1,11 | PCWP | |
    | 24 | PX SEND HASH | :TQ10001 | 7332 | 157K| | 16 (13)| 00:00:01 | | | | S->P | HASH |
    | 25 | VIEW | view_ref_table | 7332 | 157K| | 16 (13)| 00:00:01 | | | | | |
    | 26 | WINDOW SORT | | 7332 | 80652 | | 16 (13)| 00:00:01 | | | | | |
    | 27 | TABLE ACCESS FULL | ref_table | 7332 | 80652 | | 14 (0)| 00:00:01 | | | | | |
    | 28 | PX RECEIVE | | 129K| 36M| | 18756 (1)| 00:03:46 | | | Q1,11 | PCWP | |
    | 29 | PX SEND HASH | :TQ10010 | 129K| 36M| | 18756 (1)| 00:03:46 | | | Q1,10 | P->P | HASH |
    | 30 | BUFFER SORT | | 413 | 219K| | | | | | Q1,10 | PCWP | |
    | 31 | NESTED LOOPS | | 129K| 36M| | 18756 (1)| 00:03:46 | | | Q1,10 | PCWP | |
    | 32 | NESTED LOOPS | | 124K| 30M| | 14444 (1)| 00:02:54 | | | Q1,10 | PCWP | |
    | 33 | NESTED LOOPS | | 122K| 25M| | 10173 (1)| 00:02:03 | | | Q1,10 | PCWP | |
    |* 34 | HASH JOIN | | 123K| 23M| | 5893 (1)| 00:01:11 | | | Q1,10 | PCWP | |
    | 35 | PX RECEIVE | | 124K| 22M| | 5629 (1)| 00:01:08 | | | Q1,10 | PCWP | |
    | 36 | PX SEND HASH | :TQ10008 | 124K| 22M| | 5629 (1)| 00:01:08 | | | Q1,08 | P->P | HASH |
    | 37 | BUFFER SORT | | 413 | 219K| | | | | | Q1,08 | PCWP | |
    | 38 | NESTED LOOPS | | 124K| 22M| | 5629 (1)| 00:01:08 | | | Q1,08 | PCWP | |
    |* 39 | HASH JOIN | | 122K| 20M| | 1797 (2)| 00:00:22 | | | Q1,08 | PCWP | |
    | 40 | PX RECEIVE | | 119K| 17M| | 1101 (3)| 00:00:14 | | | Q1,08 | PCWP | |
    | 41 | PX SEND HASH | :TQ10006 | 119K| 17M| | 1101 (3)| 00:00:14 | | | Q1,06 | P->P | HASH |
    |* 42 | HASH JOIN | | 119K| 17M| | 1101 (3)| 00:00:14 | | | Q1,06 | PCWP | |
    | 43 | BUFFER SORT | | | | | | | | | Q1,06 | PCWC | |
    | 44 | PX RECEIVE | | 86 | 602 | | 3 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    | 45 | PX SEND BROADCAST | :TQ10000 | 86 | 602 | | 3 (0)| 00:00:01 | | | | S->P | BROADCAST |
    | 46 | TABLE ACCESS FULL | OFFICE | 86 | 602 | | 3 (0)| 00:00:01 | | | | | |
    |* 47 | HASH JOIN | | 119K| 16M| | 1098 (3)| 00:00:14 | | | Q1,06 | PCWP | |
    | 48 | PX RECEIVE | | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    | 49 | PX SEND BROADCAST | :TQ10004 | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,04 | P->P | BROADCAST |
    | 50 | PX BLOCK ITERATOR | | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,04 | PCWC | |
    |* 51 | TABLE ACCESS FULL | REF | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,04 | PCWP | |
    |* 52 | HASH JOIN | | 701K| 84M| | 1095 (3)| 00:00:14 | | | Q1,06 | PCWP | |
    | 53 | PX RECEIVE | | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    | 54 | PX SEND BROADCAST | :TQ10005 | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,05 | P->P | BROADCAST |
    | 55 | PX BLOCK ITERATOR | | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,05 | PCWC | |
    |* 56 | TABLE ACCESS FULL | REF | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    | 57 | PX BLOCK ITERATOR | | 16M| 1617M| | 1090 (2)| 00:00:14 | 1 | 24 | Q1,06 | PCWC | |
    | 58 | TABLE ACCESS FULL | Fact_Table | 16M| 1617M| | 1090 (2)| 00:00:14 | 1 | 24 | Q1,06 | PCWP | |
    | 59 | PX RECEIVE | | 13M| 323M| | 693 (1)| 00:00:09 | | | Q1,08 | PCWP | |
    | 60 | PX SEND HASH | :TQ10007 | 13M| 323M| | 693 (1)| 00:00:09 | | | Q1,07 | P->P | HASH |
    | 61 | PX BLOCK ITERATOR | | 13M| 323M| | 693 (1)| 00:00:09 | | | Q1,07 | PCWC | |
    | 62 | TABLE ACCESS FULL | Dimension 1 | 13M| 323M| | 693 (1)| 00:00:09 | | | Q1,07 | PCWP | |
    | 63 | TABLE ACCESS BY INDEX ROWID | Dimesnion 2 | 1 | 12 | | 0 (0)| 00:00:01 | | | Q1,08 | PCWP | |
    |* 64 | INDEX UNIQUE SCAN | Dimension 2 Index | 1 | | | 0 (0)| 00:00:01 | | | Q1,08 | PCWP | |
    | 65 | PX RECEIVE | | 15M| 151M| | 261 (2)| 00:00:04 | | | Q1,10 | PCWP | |
    | 66 | PX SEND HASH | :TQ10009 | 15M| 151M| | 261 (2)| 00:00:04 | | | Q1,09 | P->P | HASH |
    | 67 | PX BLOCK ITERATOR | | 15M| 151M| | 261 (2)| 00:00:04 | | | Q1,09 | PCWC | |
    | 68 | INDEX FAST FULL SCAN | Dimension 1 Index | 15M| 151M| | 261 (2)| 00:00:04 | | | Q1,09 | PCWP | |
    | 69 | TABLE ACCESS BY INDEX ROWID | Dimension 3 | 1 | 18 | | 0 (0)| 00:00:01 | | | Q1,10 | PCWP | |
    |* 70 | INDEX UNIQUE SCAN | Dimension 3 Index | 1 | | | 0 (0)| 00:00:01 | | | Q1,10 | PCWP | |
    | 71 | PARTITION HASH ITERATOR | | 1 | 39 | | 0 (0)| 00:00:01 | KEY | KEY | Q1,10 | PCWP | |
    | 72 | TABLE ACCESS BY LOCAL INDEX ROWID| Dimension 4 | 1 | 39 | | 0 (0)| 00:00:01 | KEY | KEY | Q1,10 | PCWP | |
    |* 73 | INDEX UNIQUE SCAN | dimension 6 Index | 1 | | | 0 (0)| 00:00:01 | KEY | KEY | Q1,10 | PCWP | |
    | 74 | TABLE ACCESS BY INDEX ROWID | Dimension 5 | 1 | 38 | | 0 (0)| 00:00:01 | | | Q1,10 | PCWP | |
    |* 75 | INDEX UNIQUE SCAN | Dimension 5 index | 1 | | | 0 (0)| 00:00:01 | | | Q1,10 | PCWP | |
    (Fast Query -- Object Names Changed)
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 107 | 57673 | | 1302 (1)| 00:00:16 | | | | | |
    | 1 | PX COORDINATOR | | | | | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10009 | 107 | 57673 | | 1302 (1)| 00:00:16 | | | Q1,09 | P->S | QC (RAND) |
    |* 3 | HASH JOIN BUFFERED | | 107 | 57673 | | 1302 (1)| 00:00:16 | | | Q1,09 | PCWP | |
    | 4 | BUFFER SORT | | | | | | | | | Q1,09 | PCWC | |
    | 5 | PX RECEIVE | | 11 | 187 | | 5 (0)| 00:00:01 | | | Q1,09 | PCWP | |
    | 6 | PX SEND HASH | :TQ10002 | 11 | 187 | | 5 (0)| 00:00:01 | | | | S->P | HASH |
    |* 7 | TABLE ACCESS FULL | Threshold Table | 11 | 187 | | 5 (0)| 00:00:01 | | | | | |
    | 8 | PX RECEIVE | | 10163 | 5180K| | 1296 (1)| 00:00:16 | | | Q1,09 | PCWP | |
    | 9 | PX SEND HASH | :TQ10008 | 10163 | 5180K| | 1296 (1)| 00:00:16 | | | Q1,08 | P->P | HASH |
    |* 10 | VIEW | | 10163 | 5180K| | 1296 (1)| 00:00:16 | | | Q1,08 | PCWP | |
    | 11 | WINDOW SORT | | 10163 | 3185K| 6792K| 1296 (1)| 00:00:16 | | | Q1,08 | PCWP | |
    | 12 | PX RECEIVE | | 10163 | 3185K| | 1295 (1)| 00:00:16 | | | Q1,08 | PCWP | |
    | 13 | PX SEND HASH | :TQ10007 | 10163 | 3185K| | 1295 (1)| 00:00:16 | | | Q1,07 | P->P | HASH |
    |* 14 | HASH JOIN BUFFERED | | 10163 | 3185K| | 1295 (1)| 00:00:16 | | | Q1,07 | PCWP | |
    | 15 | BUFFER SORT | | | | | | | | | Q1,07 | PCWC | |
    | 16 | PX RECEIVE | | 148 | 3256 | | 15 (7)| 00:00:01 | | | Q1,07 | PCWP | |
    | 17 | PX SEND HASH | :TQ10001 | 148 | 3256 | | 15 (7)| 00:00:01 | | | | S->P | HASH |
    | 18 | VIEW | view_ref table | 148 | 3256 | | 15 (7)| 00:00:01 | | | | | |
    | 19 | WINDOW SORT | | 148 | 2072 | | 15 (7)| 00:00:01 | | | | | |
    |* 20 | TABLE ACCESS FULL | ref table | 148 | 2072 | | 14 (0)| 00:00:01 | | | | | |
    | 21 | PX RECEIVE | | 6867 | 2005K| | 1279 (1)| 00:00:16 | | | Q1,07 | PCWP | |
    | 22 | PX SEND HASH | :TQ10006 | 6867 | 2005K| | 1279 (1)| 00:00:16 | | | Q1,06 | P->P | HASH |
    | 23 | BUFFER SORT | | 107 | 57673 | | | | | | Q1,06 | PCWP | |
    | 24 | NESTED LOOPS | | 6867 | 2005K| | 1279 (1)| 00:00:16 | | | Q1,06 | PCWP | |
    | 25 | NESTED LOOPS | | 6591 | 1679K| | 1050 (1)| 00:00:13 | | | Q1,06 | PCWP | |
    |* 26 | HASH JOIN | | 6604 | 1567K| | 821 (1)| 00:00:10 | | | Q1,06 | PCWP | |
    | 27 | BUFFER SORT | | | | | | | | | Q1,06 | PCWC | |
    | 28 | PX RECEIVE | | 86 | 602 | | 3 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    | 29 | PX SEND HASH | :TQ10000 | 86 | 602 | | 3 (0)| 00:00:01 | | | | S->P | HASH |
    | 30 | TABLE ACCESS FULL | OFFICE | 86 | 602 | | 3 (0)| 00:00:01 | | | | | |
    | 31 | PX RECEIVE | | 6604 | 1522K| | 817 (1)| 00:00:10 | | | Q1,06 | PCWP | |
    | 32 | PX SEND HASH | :TQ10005 | 6604 | 1522K| | 817 (1)| 00:00:10 | | | Q1,05 | P->P | HASH |
    | 33 | NESTED LOOPS | | 6604 | 1522K| | 817 (1)| 00:00:10 | | | Q1,05 | PCWP | |
    | 34 | NESTED LOOPS | | 6541 | 1258K| | 590 (1)| 00:00:08 | | | Q1,05 | PCWP | |
    | 35 | NESTED LOOPS | | 6612 | 1207K| | 475 (1)| 00:00:06 | | | Q1,05 | PCWP | |
    | 36 | NESTED LOOPS | | 6507 | 1112K| | 272 (2)| 00:00:04 | | | Q1,05 | PCWP | |
    |* 37 | HASH JOIN | | 6352 | 924K| | 51 (4)| 00:00:01 | | | Q1,05 | PCWP | |
    | 38 | PX RECEIVE | | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    | 39 | PX SEND BROADCAST | :TQ10003 | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,03 | P->P | BROADCAST |
    | 40 | PX BLOCK ITERATOR | | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,03 | PCWC | |
    |* 41 | TABLE ACCESS FULL | REF | 47 | 940 | | 2 (0)| 00:00:01 | | | Q1,03 | PCWP | |
    |* 42 | HASH JOIN | | 37236 | 4690K| | 48 (3)| 00:00:01 | | | Q1,05 | PCWP | |
    | 43 | PX RECEIVE | | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    | 44 | PX SEND BROADCAST | :TQ10004 | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,04 | P->P | BROADCAST |
    | 45 | PX BLOCK ITERATOR | | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,04 | PCWC | |
    |* 46 | TABLE ACCESS FULL | REF | 12 | 240 | | 2 (0)| 00:00:01 | | | Q1,04 | PCWP | |
    | 47 | PX BLOCK ITERATOR | | 849K| 88M| | 46 (3)| 00:00:01 | KEY | KEY | Q1,05 | PCWC | |
    | 48 | TABLE ACCESS FULL | Fact Table | 849K| 88M| | 46 (3)| 00:00:01 | 5 | 5 | Q1,05 | PCWP | |
    | 49 | TABLE ACCESS BY INDEX ROWID | Dim 1     | 1 | 26 | | 0 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    |* 50 | INDEX UNIQUE SCAN | Dim 1 index | 1 | | | 0 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    | 51 | TABLE ACCESS BY INDEX ROWID | Dim 2 | 1 | 12 | | 0 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    |* 52 | INDEX UNIQUE SCAN | Dim 2 index | 1 | | | 0 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    |* 53 | INDEX UNIQUE SCAN | Dim 3 Index | 1 | 10 | | 0 (0)| 00:00:01 | | | Q1,05 | PCWP | |
    | 54 | PARTITION HASH ITERATOR | | 1 | 39 | | 0 (0)| 00:00:01 | KEY | KEY | Q1,05 | PCWP | |
    | 55 | TABLE ACCESS BY LOCAL INDEX ROWID| Dim 4 | 1 | 39 | | 0 (0)| 00:00:01 | KEY | KEY | Q1,05 | PCWP | |
    |* 56 | INDEX UNIQUE SCAN | Dim 4 Index | 1 | | | 0 (0)| 00:00:01 | KEY | KEY | Q1,05 | PCWP | |
    | 57 | TABLE ACCESS BY INDEX ROWID | Dim 5 | 1 | 18 | | 0 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    |* 58 | INDEX UNIQUE SCAN | Dim 5 Index | 1 | | | 0 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    | 59 | TABLE ACCESS BY INDEX ROWID | Dim 6 | 1 | 38 | | 0 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    |* 60 | INDEX UNIQUE SCAN | Dim 6 Index | 1 | | | 0 (0)| 00:00:01 | | | Q1,06 | PCWP | |
    DB Version is 10g R2:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    "CORE     10.2.0.4.0     Production"
    TNS for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Productio
    NLSRTL Version 10.2.0.4.0 - Production

Maybe you are looking for

  • Mac OS 10.4.11 and Upgrading

    Hi - I have a MacBook and it is operating on OS 10.4.11. Somehow I lost Firefox Mozilla and now I am unable to download either the current version or old version. Only problem is that my uni course is not compatible with Safari and they say to use Fi

  • My pages documents won't restore from iCloud, how to fix?

    I recently did a hard reset of my iPad 2, i thought it would fix a problem that proved to be a hardware problem, rater then a software problem. I got (almost) everything back from iCloud, exept for my document in apple programs (pages, numbers and ke

  • Buy iPhone 6 (A1586) in Japan

    Hi, I will work for a while at Japan. If i'm buying an iPhone 6 (A1586) in Apple Store in Japan, i wonder if it will work in Europe and particular in Switzerland ? What I have to mention to the seller at Apple Store ? Thank you in advance for your he

  • Nokia N9 in India

    Can anybody say if Nokia is going to launch N9 in India? If it is, then I will wait; else I will order it from Singapore. Please shed some light on it.

  • What does chromeappsstore.sqlite in the profile do?

    I just noticed an unfamiliar file in my Firefox 6 profile, chromeappsstore.sqlite. What is that for?